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

Method getCopy

SRC/element/dispBeamColumnInt/FiberSection2dInt.cpp:1989–2229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1987
1988
1989SectionForceDeformation*
1990
1991FiberSection2dInt::getCopy(void)
1992
1993{
1994
1995 FiberSection2dInt *theCopy = new FiberSection2dInt ();
1996
1997 theCopy->setTag(this->getTag());
1998
1999
2000
2001 theCopy->numFibers = numFibers;
2002
2003
2004
2005 if (numFibers != 0) {
2006
2007 theCopy->theMaterials1 = new UniaxialMaterial *[numFibers];
2008
2009 theCopy->theMaterials2 = new UniaxialMaterial *[numFibers];
2010
2011
2012
2013 if (theCopy->theMaterials1 == 0) {
2014
2015 opserr <<"FiberSection2dInt::getCopy -- failed to allocate Material pointers\n";
2016
2017 exit(-1);
2018
2019 }
2020
2021
2022
2023 theCopy->matData = new double [numFibers*2];
2024
2025
2026
2027 if (theCopy->matData == 0) {
2028
2029 opserr << "FiberSection2dInt::getCopy -- failed to allocate double array for material data\n";
2030
2031 exit(-1);
2032
2033 }
2034
2035
2036
2037 for (int i = 0; i < numFibers; i++) {
2038
2039 theCopy->matData[i*2] = matData[i*2];
2040
2041 theCopy->matData[i*2+1] = matData[i*2+1];
2042
2043 theCopy->theMaterials1[i] = theMaterials1[i]->getCopy();
2044
2045 theCopy->theMaterials2[i] = theMaterials2[i]->getCopy();
2046

Callers 15

MEFIMethod · 0.45
ComponentElement2dMethod · 0.45
ComponentElement3dMethod · 0.45
SSPquadUPMethod · 0.45
SSPbrickMethod · 0.45
SimpleContact2DMethod · 0.45
SSPquadMethod · 0.45
BeamContact2DpMethod · 0.45
Brick8FiberOverlayMethod · 0.45
BeamContact2DMethod · 0.45
BeamContact3DMethod · 0.45

Calls 3

exitFunction · 0.85
setTagMethod · 0.45
getTagMethod · 0.45

Tested by

no test coverage detected