MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / ~DOF_Group

Method ~DOF_Group

SRC/analysis/dof_grp/DOF_Group.cpp:222–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220// destructor.
221
222DOF_Group::~DOF_Group()
223{
224 numDOFs--;
225
226 int numDOF = unbalance->Size();
227
228 // set the pointer in the associated Node to 0, to stop
229 // segmentation fault if node tries to use this object after destroyed
230 if (myNode != 0)
231 myNode->setDOF_GroupPtr(0);
232
233 // delete tangent and residual if created specially
234 if (numDOF > MAX_NUM_DOF) {
235 if (tangent != 0) delete tangent;
236 if (unbalance != 0) delete unbalance;
237 }
238
239 // if this is the last FE_Element, clean up the
240 // storage for the matrix and vector objects
241 if (numDOFs == 0) {
242 for (int i=0; i<MAX_NUM_DOF; i++) {
243 if (theVectors[i] != 0)
244 delete theVectors[i];
245 if (theMatrices[i] != 0)
246 delete theMatrices[i];
247 }
248 delete [] theMatrices;
249 delete [] theVectors;
250 }
251}
252
253// void setID(int index, int value);
254// Method to set the corresponding index of the ID to value.

Callers

nothing calls this directly

Calls 2

SizeMethod · 0.45
setDOF_GroupPtrMethod · 0.45

Tested by

no test coverage detected