NewUniaxialMaterial.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.6 $
00022 // $Date: 2006/08/15 00:41:05 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/NewUniaxialMaterial.cpp,v $
00024 
00025 // Written: MHS
00026 // Created: Aug 2001
00027 //
00028 // Description: This file contains the class implementation for 
00029 // NewUniaxialMaterial.
00030 
00031 #include <NewUniaxialMaterial.h>
00032 #include <Vector.h>
00033 #include <Channel.h>
00034 #include <math.h>
00035 #include <float.h>
00036 
00037 NewUniaxialMaterial::NewUniaxialMaterial(int tag)
00038   :UniaxialMaterial(tag,MAT_TAG_NewUniaxialMaterial),
00039    trialStrain(0.0), trialStress(0.0), trialTangent(0.0),
00040    commitStrain(0.0), commitStress(0.0), commitTangent(0.0)
00041 {
00042 
00043 }
00044 
00045 NewUniaxialMaterial::NewUniaxialMaterial()
00046   :UniaxialMaterial(0,MAT_TAG_NewUniaxialMaterial),
00047    trialStrain(0.0), trialStress(0.0), trialTangent(0.0),
00048    commitStrain(0.0), commitStress(0.0), commitTangent(0.0)
00049 {
00050 
00051 }
00052 
00053 NewUniaxialMaterial::~NewUniaxialMaterial()
00054 {
00055 
00056 }
00057 
00058 int 
00059 NewUniaxialMaterial::setTrialStrain(double strain, double strainRate)
00060 {
00061   // set the trial strain
00062   trialStrain = strain;
00063 
00064   // determine trial stress and tangent
00065   trialStress = 0.0;
00066   trialTangent = 0.0;
00067 
00068   return 0;
00069 }
00070 
00071 double 
00072 NewUniaxialMaterial::getStress(void)
00073 {
00074   return trialStress;
00075 }
00076 
00077 double 
00078 NewUniaxialMaterial::getTangent(void)
00079 {
00080   return trialTangent;
00081 }
00082 
00083 double 
00084 NewUniaxialMaterial::getInitialTangent(void)
00085 {
00086   // return the initial tangent
00087   return 0.0;
00088 }
00089 
00090 double 
00091 NewUniaxialMaterial::getStrain(void)
00092 {
00093   return trialStrain;
00094 }
00095 
00096 int 
00097 NewUniaxialMaterial::commitState(void)
00098 {
00099   commitStrain  = trialStrain;
00100   commitStress  = trialStress;
00101   commitTangent = trialTangent;
00102 
00103   return 0;
00104 }
00105 
00106 int 
00107 NewUniaxialMaterial::revertToLastCommit(void)
00108 {
00109   trialStrain = commitStrain;
00110   trialStress = commitStress;
00111   trialTangent = commitTangent;
00112 
00113   return 0;
00114 }
00115 
00116 int 
00117 NewUniaxialMaterial::revertToStart(void)
00118 {
00119   trialStrain = 0.;
00120   trialStress = 0.0;
00121   trialTangent = 0.0;
00122   commitStrain = 0.;
00123   commitStress = 0.0;
00124   commitTangent = 0.0;
00125 
00126   return 0;
00127 }
00128 
00129 UniaxialMaterial *
00130 NewUniaxialMaterial::getCopy(void)
00131 {
00132   NewUniaxialMaterial *theCopy = new NewUniaxialMaterial(this->getTag());
00133 
00134   return theCopy;
00135 }
00136 
00137 int 
00138 NewUniaxialMaterial::sendSelf(int cTag, Channel &theChannel)
00139 {
00140   return -1;
00141 }
00142 
00143 int 
00144 NewUniaxialMaterial::recvSelf(int cTag, Channel &theChannel, 
00145                               FEM_ObjectBroker &theBroker)
00146 {
00147   return -1;
00148 }
00149 
00150 void 
00151 NewUniaxialMaterial::Print(OPS_Stream &s, int flag)
00152 {
00153   s << "NewUniaxialMaterial : " << this->getTag();
00154 
00155   return;
00156 }
00157 
00158 

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