| 7188 | } |
| 7189 | |
| 7190 | int |
| 7191 | getNDM(ClientData clientData, Tcl_Interp* interp, int argc, TCL_Char** argv) |
| 7192 | { |
| 7193 | int ndm; |
| 7194 | |
| 7195 | if (argc > 1) { |
| 7196 | int tag; |
| 7197 | if (Tcl_GetInt(interp, argv[1], &tag) != TCL_OK) { |
| 7198 | opserr << "WARNING getNDM nodeTag? \n"; |
| 7199 | return TCL_ERROR; |
| 7200 | } |
| 7201 | Node* theNode = theDomain.getNode(tag); |
| 7202 | if (theNode == 0) { |
| 7203 | opserr << "WARNING nodeTag " << tag << " does not exist \n"; |
| 7204 | return TCL_ERROR; |
| 7205 | } |
| 7206 | const Vector& coords = theNode->getCrds(); |
| 7207 | ndm = coords.Size(); |
| 7208 | } else { |
| 7209 | if (theBuilder == 0) { |
| 7210 | return TCL_OK; |
| 7211 | } |
| 7212 | else { |
| 7213 | ndm = OPS_GetNDM(); |
| 7214 | } |
| 7215 | } |
| 7216 | |
| 7217 | char buffer[20]; |
| 7218 | sprintf(buffer, "%d", ndm); |
| 7219 | Tcl_AppendResult(interp, buffer, NULL); |
| 7220 | |
| 7221 | return TCL_OK; |
| 7222 | } |
| 7223 | |
| 7224 | int |
| 7225 | getNDF(ClientData clientData, Tcl_Interp* interp, int argc, TCL_Char** argv) |
nothing calls this directly
no test coverage detected