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

Method setID

SRC/analysis/fe_ele/lagrange/LagrangeSP_FE.cpp:103–131  ·  view source on GitHub ↗

void setID(int index, int value); Method to set the correSPonding index of the ID to value.

Source from the content-addressed store, hash-verified

101// void setID(int index, int value);
102// Method to set the correSPonding index of the ID to value.
103int
104LagrangeSP_FE::setID(void)
105{
106 int result = 0;
107
108 // first determine the IDs in myID for those DOFs marked
109 // as constrained DOFs, this is obtained from the DOF_Group
110 // associated with the constrained node
111 DOF_Group *theNodesDOFs = theNode->getDOF_GroupPtr();
112 if (theNodesDOFs == 0) {
113 opserr << "WARNING LagrangeSP_FE::setID(void)";
114 opserr << " - no DOF_Group with Constrained Node\n";
115 return -1;
116 }
117
118 int restrainedDOF = theSP->getDOF_Number();
119 const ID &theNodesID = theNodesDOFs->getID();
120
121 if (restrainedDOF < 0 || restrainedDOF >= theNodesID.Size()) {
122 opserr << "WARNING LagrangeSP_FE::setID(void)";
123 opserr << " - restrained DOF invalid\n";
124 return -2;
125 }
126
127 myID(0) = theNodesID(restrainedDOF);
128 myID(1) = (theDofGroup->getID())(0);
129
130 return result;
131}
132
133const Matrix &
134LagrangeSP_FE::getTangent(Integrator *theIntegrator)

Callers

nothing calls this directly

Calls 4

getIDMethod · 0.80
getDOF_GroupPtrMethod · 0.45
getDOF_NumberMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected