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

Method getCopy

DEVELOPER/core/NDMaterial.cpp:125–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125NDMaterial*
126NDMaterial::getCopy(const char *type)
127{
128 if (strcmp(type,"PlaneStress") == 0 ||
129 strcmp(type,"PlaneStress2D") == 0) {
130 NDMaterial *copy = this->getCopy("ThreeDimensional");
131 PlaneStressMaterial *clone = new PlaneStressMaterial(this->getTag(),*copy);
132 return clone;
133 }
134 else if (strcmp(type,"BeamFiber") == 0 ||
135 strcmp(type,"TimoshenkoFiber") == 0) {
136 NDMaterial *copy = this->getCopy("ThreeDimensional");
137 BeamFiberMaterial *clone = new BeamFiberMaterial(this->getTag(),*copy);
138 return clone;
139 }
140 else if (strcmp(type,"BeamFiber2d") == 0 ||
141 strcmp(type,"TimoshenkoFiber2d") == 0) {
142 NDMaterial *copy = this->getCopy("ThreeDimensional");
143 BeamFiberMaterial2d *clone = new BeamFiberMaterial2d(this->getTag(),*copy);
144 return clone;
145 }
146 else if (strcmp(type,"PlateFiber") == 0) {
147 NDMaterial *copy = this->getCopy("ThreeDimensional");
148 PlateFiberMaterial *clone = new PlateFiberMaterial(this->getTag(),*copy);
149 return clone;
150 }
151 else
152 return 0;
153}
154
155double
156NDMaterial::getRho(void)

Callers 1

Truss2DMethod · 0.45

Calls 1

getTagMethod · 0.45

Tested by

no test coverage detected