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

Method setID

SRC/analysis/fe_ele/penalty/PenaltySP_FE.cpp:84–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82// Method to set the corresponding index of the ID to value.
83
84int
85PenaltySP_FE::setID(void)
86{
87 DOF_Group *theNodesDOFs = theNode->getDOF_GroupPtr();
88 if (theNodesDOFs == 0) {
89 opserr << "WARNING PenaltySP_FE::setID(void) - no DOF_Group with Node\n";
90 return -2;
91 }
92 myDOF_Groups(0) = theNodesDOFs->getTag();
93
94 int restrainedDOF = theSP->getDOF_Number();
95 if (restrainedDOF < 0 || restrainedDOF >= theNode->getNumberDOF()) {
96 opserr << "WARNING PenaltySP_FE::setID(void) - unknown DOF ";
97 opserr << restrainedDOF << " at Node\n";
98 return -3;
99 }
100 const ID &theNodesID = theNodesDOFs->getID();
101 if (restrainedDOF >= theNodesID.Size()) {
102 opserr << "WARNING PenaltySP_FE::setID(void) - ";
103 opserr << " Nodes DOF_Group too small\n";
104 return -4;
105 }
106
107 myID(0) = theNodesID(restrainedDOF);
108
109 return 0;
110}
111
112
113const Matrix &

Callers

nothing calls this directly

Calls 6

getIDMethod · 0.80
getDOF_GroupPtrMethod · 0.45
getTagMethod · 0.45
getDOF_NumberMethod · 0.45
getNumberDOFMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected