MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / getCopy

Method getCopy

SRC/material/nD/ElasticIsotropicMaterial.cpp:117–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117NDMaterial*
118ElasticIsotropicMaterial::getCopy (const char *type)
119{
120 if (strcmp(type,"PlaneStress2D") == 0 || strcmp(type,"PlaneStress") == 0) {
121 ElasticIsotropicPlaneStress2D *theModel;
122 theModel = new ElasticIsotropicPlaneStress2D (this->getTag(), E, v, rho);
123 return theModel;
124 }
125
126 else if (strcmp(type,"PlaneStrain2D") == 0 || strcmp(type,"PlaneStrain") == 0) {
127 ElasticIsotropicPlaneStrain2D *theModel;
128 theModel = new ElasticIsotropicPlaneStrain2D (this->getTag(), E, v, rho);
129 return theModel;
130 }
131
132 else if (strcmp(type,"AxiSymmetric2D") == 0 || strcmp(type,"AxiSymmetric") == 0) {
133 ElasticIsotropicAxiSymm *theModel;
134 theModel = new ElasticIsotropicAxiSymm(this->getTag(), E, v, rho);
135 return theModel;
136 }
137
138 else if (strcmp(type,"ThreeDimensional") == 0 || strcmp(type,"3D") == 0) {
139 ElasticIsotropicThreeDimensional *theModel;
140 theModel = new ElasticIsotropicThreeDimensional (this->getTag(), E, v, rho);
141 return theModel;
142 }
143
144 else if (strcmp(type,"PlateFiber") == 0) {
145 ElasticIsotropicPlateFiber *theModel;
146 theModel = new ElasticIsotropicPlateFiber(this->getTag(), E, v, rho);
147 return theModel;
148 }
149
150 else if (strcmp(type,"BeamFiber") == 0) {
151 ElasticIsotropicBeamFiber *theModel;
152 theModel = new ElasticIsotropicBeamFiber(this->getTag(), E, v, rho);
153 return theModel;
154 }
155
156 else if (strcmp(type,"BeamFiber2d") == 0) {
157 ElasticIsotropicBeamFiber2d *theModel;
158 theModel = new ElasticIsotropicBeamFiber2d(this->getTag(), E, v, rho);
159 return theModel;
160 }
161
162 // Handle other cases
163 else
164 return NDMaterial::getCopy(type);
165}
166
167int
168ElasticIsotropicMaterial::setTrialStrain (const Vector &v)

Callers

nothing calls this directly

Calls 3

getCopyFunction · 0.85
exitFunction · 0.85
getTagMethod · 0.45

Tested by

no test coverage detected