FedeasBond1Material.cpp

Go to the documentation of this file.
00001 /* ****************************************************************** **
00002 **    OpenSees - Open System for Earthquake Engineering Simulation    **
00003 **          Pacific Earthquake Engineering Research Center            **
00004 **                                                                    **
00005 **                                                                    **
00006 ** (C) Copyright 1999, The Regents of the University of California    **
00007 ** All Rights Reserved.                                               **
00008 **                                                                    **
00009 ** Commercial use of this program without express permission of the   **
00010 ** University of California, Berkeley, is strictly prohibited.  See   **
00011 ** file 'COPYRIGHT'  in main directory for information on usage and   **
00012 ** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
00013 **                                                                    **
00014 ** Developed by:                                                      **
00015 **   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
00016 **   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
00017 **   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
00018 **                                                                    **
00019 ** ****************************************************************** */
00020                                                                         
00021 // $Revision: 1.5 $
00022 // $Date: 2004/07/15 21:36:46 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/fedeas/FedeasBond1Material.cpp,v $
00024                                                                       
00025 // Written: MHS
00026 // Created: Jan 2001
00027 //
00028 // Description: This file contains the class definition for 
00029 // FedeasBond1Material. FedeasBond1Material wraps the FEDEAS
00030 // 1d material subroutine Bond_1.
00031 
00032 #include <stdlib.h>
00033 
00034 #include <FedeasBond1Material.h>
00035 
00036 FedeasBond1Material::FedeasBond1Material(int tag,
00037         double u1p, double q1p, double u2p, double u3p, double q3p,
00038         double u1n, double q1n, double u2n, double u3n, double q3n,
00039         double s0, double bb):
00040 // 6 history variables and 12 material parameters
00041 FedeasMaterial(tag, MAT_TAG_FedeasBond1, 6, 12)
00042 {
00043   // Fill in material parameters
00044   data[0]  = u1p;
00045   data[1]  = q1p;
00046   data[2]  = u2p;
00047   data[3]  = u3p;
00048   data[4]  = q3p;
00049   data[5]  = u1n;
00050   data[6]  = q1n;
00051   data[7]  = u2n;
00052   data[8]  = u3n;
00053   data[9]  = q3n;
00054   data[10] = s0;
00055   data[11] = bb;
00056   
00057   tangent =  q1p/u1p;
00058   tangentP = tangent;
00059 }
00060 
00061 FedeasBond1Material::FedeasBond1Material(int tag, const Vector &d):
00062 // 6 history variables and 12 material parameters
00063 FedeasMaterial(tag, MAT_TAG_FedeasBond1, 6, 12)
00064 {
00065   if (d.Size() != numData) {
00066     opserr << "FedeasBond1Material::FedeasBond1Material -- not enough input arguments\n";
00067     exit(-1);
00068   }
00069                 
00070   for (int i = 0; i < numData; i++)
00071     data[i] = d(i);
00072 
00073   tangent =  data[1]/data[0];
00074   tangentP = tangent;
00075 }
00076 
00077 FedeasBond1Material::FedeasBond1Material(void):
00078 FedeasMaterial(0, MAT_TAG_FedeasBond1, 6, 12)
00079 {
00080         // Does nothing
00081 }
00082 
00083 FedeasBond1Material::~FedeasBond1Material(void)
00084 {
00085         // Does nothing
00086 }
00087 
00088 UniaxialMaterial*
00089 FedeasBond1Material::getCopy(void)
00090 {
00091   Vector d(data, numData);
00092 
00093   FedeasBond1Material *theCopy = new FedeasBond1Material(this->getTag(), d);
00094   
00095   // Copy history variables
00096   for (int i = 0; i < 2*numHstv; i++)
00097     theCopy->hstv[i] = hstv[i];
00098   
00099   theCopy->epsilonP = epsilonP;
00100   theCopy->sigmaP   = sigmaP;
00101   theCopy->tangentP = tangentP;
00102 
00103   theCopy->epsilon = epsilonP;
00104   theCopy->sigma = sigmaP;
00105   theCopy->tangent = tangentP;  
00106   
00107   return theCopy;
00108 }
00109 
00110 double
00111 FedeasBond1Material::getInitialTangent(void)
00112 {
00113   //return q1p/u1p;
00114   return data[1]/data[0];
00115 }

Generated on Mon Oct 23 15:05:20 2006 for OpenSees by doxygen 1.5.0