00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #include <string.h>
00037
00038 #include <ElasticIsotropicMaterial.h>
00039 #include <ElasticIsotropicPlaneStress2D.h>
00040 #include <ElasticIsotropicPlaneStrain2D.h>
00041 #include <ElasticIsotropic3D.h>
00042 #include <ElasticIsotropicPlateFiber.h>
00043
00044 #include <Tensor.h>
00045
00046 #include <G3Globals.h>
00047
00048 ElasticIsotropicMaterial::ElasticIsotropicMaterial
00049 (int tag, int classTag, double e, double nu, double r)
00050 :NDMaterial(tag, classTag), E(e), v(nu), rho(r)
00051 {
00052
00053 }
00054
00055 ElasticIsotropicMaterial::ElasticIsotropicMaterial
00056 (int tag, double e, double nu, double r)
00057 :NDMaterial(tag, ND_TAG_ElasticIsotropic), E(e), v(nu), rho(r)
00058 {
00059
00060 }
00061
00062 ElasticIsotropicMaterial::~ElasticIsotropicMaterial()
00063 {
00064
00065 }
00066
00067 double
00068 ElasticIsotropicMaterial::getRho()
00069 {
00070 return rho ;
00071 }
00072
00073
00074 NDMaterial*
00075 ElasticIsotropicMaterial::getCopy (const char *type)
00076 {
00077 if (strcmp(type,"PlaneStress2D") == 0)
00078 {
00079 ElasticIsotropicPlaneStress2D *theModel;
00080 theModel = new ElasticIsotropicPlaneStress2D (this->getTag(), E, v, rho);
00081
00082
00083
00084
00085 return theModel;
00086 }
00087
00088 else if (strcmp(type,"PlaneStrain2D") == 0)
00089 {
00090 ElasticIsotropicPlaneStrain2D *theModel;
00091 theModel = new ElasticIsotropicPlaneStrain2D (this->getTag(), E, v, rho);
00092
00093
00094
00095
00096 return theModel;
00097 }
00098 else if (strcmp(type,"ThreeDimensional") == 0)
00099 {
00100 ElasticIsotropic3D *theModel;
00101 theModel = new ElasticIsotropic3D (this->getTag(), E, v, 100.0, 0.0);
00102
00103
00104
00105
00106 return theModel;
00107 }
00108 else if (strcmp(type,"PlateFiber") == 0)
00109 {
00110 ElasticIsotropicPlateFiber *theModel;
00111 theModel = new ElasticIsotropicPlateFiber(this->getTag(), E, v, rho);
00112
00113
00114
00115
00116 return theModel;
00117 }
00118
00119
00120
00121 else
00122 {
00123 g3ErrorHandler->fatal("ElasticIsotropicMaterial::getModel failed to get model %s",
00124 type);
00125
00126 return 0;
00127 }
00128 }
00129
00130 int
00131 ElasticIsotropicMaterial::setTrialStrain (const Vector &v)
00132 {
00133 g3ErrorHandler->fatal("ElasticIsotropicMaterial::setTrialStrain -- subclass responsibility");
00134
00135 return 0;
00136 }
00137
00138 int
00139 ElasticIsotropicMaterial::setTrialStrain (const Vector &v, const Vector &rate)
00140 {
00141 g3ErrorHandler->fatal("ElasticIsotropicMaterial::setTrialStrain -- subclass responsibility");
00142
00143 return 0;
00144 }
00145
00146 int
00147 ElasticIsotropicMaterial::setTrialStrainIncr (const Vector &v)
00148 {
00149 g3ErrorHandler->fatal("ElasticIsotropicMaterial::setTrialStrainIncr -- subclass responsibility");
00150
00151 return 0;
00152 }
00153
00154 int
00155 ElasticIsotropicMaterial::setTrialStrainIncr (const Vector &v, const Vector &rate)
00156 {
00157 g3ErrorHandler->fatal("ElasticIsotropicMaterial::setTrialStrainIncr -- subclass responsibility");
00158
00159 return 0;
00160 }
00161
00162 const Matrix&
00163 ElasticIsotropicMaterial::getTangent (void)
00164 {
00165 g3ErrorHandler->fatal("ElasticIsotropicMaterial::getTangent -- subclass responsibility");
00166
00167
00168 Matrix *ret = new Matrix();
00169 return *ret;
00170 }
00171
00172 const Vector&
00173 ElasticIsotropicMaterial::getStress (void)
00174 {
00175 g3ErrorHandler->fatal("ElasticIsotropicMaterial::getStress -- subclass responsibility");
00176
00177
00178 Vector *ret = new Vector();
00179 return *ret;
00180 }
00181
00182 const Vector&
00183 ElasticIsotropicMaterial::getStrain (void)
00184 {
00185 g3ErrorHandler->fatal("ElasticIsotropicMaterial::getStrain -- subclass responsibility");
00186
00187
00188 Vector *ret = new Vector();
00189 return *ret;
00190 }
00191
00192 int
00193 ElasticIsotropicMaterial::setTrialStrain (const Tensor &v)
00194 {
00195 g3ErrorHandler->fatal("ElasticIsotropicMaterial::setTrialStrain -- subclass responsibility");
00196
00197 return 0;
00198 }
00199
00200 int
00201 ElasticIsotropicMaterial::setTrialStrain (const Tensor &v, const Tensor &r)
00202 {
00203 g3ErrorHandler->fatal("ElasticIsotropicMaterial::setTrialStrain -- subclass responsibility");
00204
00205 return 0;
00206 }
00207
00208 int
00209 ElasticIsotropicMaterial::setTrialStrainIncr (const Tensor &v)
00210 {
00211 g3ErrorHandler->fatal("ElasticIsotropicMaterial::setTrialStrainIncr -- subclass responsibility");
00212
00213 return 0;
00214 }
00215
00216 int
00217 ElasticIsotropicMaterial::setTrialStrainIncr (const Tensor &v, const Tensor &r)
00218 {
00219 g3ErrorHandler->fatal("ElasticIsotropicMaterial::setTrialStrainIncr -- subclass responsibility");
00220
00221 return 0;
00222 }
00223
00224 const Tensor&
00225 ElasticIsotropicMaterial::getTangentTensor (void)
00226 {
00227 g3ErrorHandler->fatal("ElasticIsotropicMaterial::getTangent -- subclass responsibility");
00228
00229
00230 Tensor *t = new Tensor;
00231 return *t;
00232 }
00233
00234 const stresstensor ElasticIsotropicMaterial::getStressTensor (void)
00235 {
00236 g3ErrorHandler->fatal("ElasticIsotropicMaterial::getStress -- subclass responsibility");
00237
00238
00239 stresstensor t;
00240 return t;
00241 }
00242
00243 const Tensor&
00244 ElasticIsotropicMaterial::getStrainTensor (void)
00245 {
00246 g3ErrorHandler->fatal("ElasticIsotropicMaterial::getStrain -- subclass responsibility");
00247
00248
00249 Tensor *t = new Tensor;
00250 return *t;
00251 }
00252
00253 int
00254 ElasticIsotropicMaterial::commitState (void)
00255 {
00256 g3ErrorHandler->fatal("ElasticIsotropicMaterial::commitState -- subclass responsibility");
00257
00258 return 0;
00259 }
00260
00261 int
00262 ElasticIsotropicMaterial::revertToLastCommit (void)
00263 {
00264 g3ErrorHandler->fatal("ElasticIsotropicMaterial::revertToLastCommit -- subclass responsibility");
00265
00266 return 0;
00267 }
00268
00269 int
00270 ElasticIsotropicMaterial::revertToStart (void)
00271 {
00272 g3ErrorHandler->fatal("ElasticIsotropicMaterial::revertToStart -- subclass responsibility");
00273
00274 return 0;
00275 }
00276
00277 NDMaterial*
00278 ElasticIsotropicMaterial::getCopy (void)
00279 {
00280 g3ErrorHandler->fatal("ElasticIsotropicMaterial::getCopy -- subclass responsibility");
00281
00282 return 0;
00283 }
00284
00285 const char*
00286 ElasticIsotropicMaterial::getType (void) const
00287 {
00288 g3ErrorHandler->fatal("ElasticIsotropicMaterial::getType -- subclass responsibility");
00289
00290 return 0;
00291 }
00292
00293 int
00294 ElasticIsotropicMaterial::getOrder (void) const
00295 {
00296 g3ErrorHandler->fatal("ElasticIsotropicMaterial::getOrder -- subclass responsibility");
00297
00298 return 0;
00299 }
00300
00301 int
00302 ElasticIsotropicMaterial::sendSelf (int commitTag, Channel &theChannel)
00303 {
00304 g3ErrorHandler->fatal("ElasticIsotropicMaterial::sendSelf -- subclass responsibility");
00305
00306 return 0;
00307 }
00308
00309 int
00310 ElasticIsotropicMaterial::recvSelf (int commitTag, Channel &theChannel,
00311 FEM_ObjectBroker &theBroker)
00312 {
00313 g3ErrorHandler->fatal("ElasticIsotropicMaterial::recvSelf -- subclass responsibility");
00314
00315 return 0;
00316 }
00317
00318 void
00319 ElasticIsotropicMaterial::Print (ostream &s, int flag)
00320 {
00321 s << "Elastic Isotropic Material Model" << endl;
00322 s << "\tE: " << E << endl;
00323 s << "\tv: " << v << endl;
00324 s << "\trho: " << rho << endl;
00325
00326 return;
00327 }
00328
00329 int
00330 ElasticIsotropicMaterial::setParameter(char **argv, int argc, Information &info)
00331 {
00332 return -1;
00333 }
00334
00335 int
00336 ElasticIsotropicMaterial::updateParameter(int parameterID, Information &info)
00337 {
00338 return -1;
00339 }