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

Function nodeDOFs

SRC/tcl/commands.cpp:7323–7359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7321}
7322
7323int
7324nodeDOFs(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv)
7325{
7326 if (argc < 2) {
7327 opserr << "WARNING want - nodeDOFs nodeTag?\n";
7328 return TCL_ERROR;
7329 }
7330
7331 int tag;
7332
7333 if (Tcl_GetInt(interp, argv[1], &tag) != TCL_OK) {
7334 opserr << "WARNING nodeDOFs nodeTag? nodeDOF? \n";
7335 return TCL_ERROR;
7336 }
7337
7338 char buffer[40];
7339
7340 Node *theNode = theDomain.getNode(tag);
7341 if (theNode == 0) {
7342 opserr << "WARNING nodeDOFs node " << tag << " not found" << endln;
7343 return TCL_ERROR;
7344 }
7345 int numDOF = theNode->getNumberDOF();
7346
7347 DOF_Group *theDOFgroup = theNode->getDOF_GroupPtr();
7348 if (theDOFgroup == 0) {
7349 opserr << "WARNING nodeDOFs DOF group null" << endln;
7350 return -1;
7351 }
7352 const ID &eqnNumbers = theDOFgroup->getID();
7353 for (int i = 0; i < numDOF; i++) {
7354 sprintf(buffer, "%d ", eqnNumbers(i));
7355 Tcl_AppendResult(interp, buffer, NULL);
7356 }
7357
7358 return TCL_OK;
7359}
7360
7361int
7362nodeMass(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv)

Callers

nothing calls this directly

Calls 4

getIDMethod · 0.80
getNodeMethod · 0.45
getNumberDOFMethod · 0.45
getDOF_GroupPtrMethod · 0.45

Tested by

no test coverage detected