| 6739 | |
| 6740 | |
| 6741 | int |
| 6742 | findID(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv) |
| 6743 | { |
| 6744 | // make sure at least one other argument to contain type of system |
| 6745 | if (argc < 2) { |
| 6746 | opserr << "WARNING want - findNodesWithID ?id\n"; |
| 6747 | return TCL_ERROR; |
| 6748 | } |
| 6749 | |
| 6750 | int tag; |
| 6751 | |
| 6752 | if (Tcl_GetInt(interp, argv[1], &tag) != TCL_OK) { |
| 6753 | opserr << "WARNING eleForce eleTag? dof? - could not read nodeTag? \n"; |
| 6754 | return TCL_ERROR; |
| 6755 | } |
| 6756 | |
| 6757 | NodeIter &theNodes = theDomain.getNodes(); |
| 6758 | Node *theNode; |
| 6759 | char buffer[20] ={0}; |
| 6760 | |
| 6761 | |
| 6762 | while ((theNode = theNodes()) != 0) { |
| 6763 | DOF_Group *theGroup = theNode->getDOF_GroupPtr(); |
| 6764 | if (theGroup != 0) { |
| 6765 | const ID &nodeID = theGroup->getID(); |
| 6766 | for (int i=0; i<nodeID.Size(); i++) { |
| 6767 | if (nodeID(i) == tag) { |
| 6768 | sprintf(buffer, "%d ", theNode->getTag()); |
| 6769 | Tcl_AppendResult(interp, buffer, NULL); |
| 6770 | break; |
| 6771 | } |
| 6772 | } |
| 6773 | } |
| 6774 | } |
| 6775 | |
| 6776 | return TCL_OK; |
| 6777 | } |
| 6778 | |
| 6779 | int |
| 6780 | nodeCoord(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv) |
nothing calls this directly
no test coverage detected