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

Function eleType

SRC/tcl/commands.cpp:7257–7283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7255}
7256
7257int
7258eleType(ClientData clientData, Tcl_Interp* interp, int argc, TCL_Char** argv)
7259{
7260 if (argc < 2) {
7261 opserr << "WARNING want - eleType eleTag?\n";
7262 return TCL_ERROR;
7263 }
7264
7265 int tag;
7266
7267 if (Tcl_GetInt(interp, argv[1], &tag) != TCL_OK) {
7268 opserr << "WARNING eleType eleTag? \n";
7269 return TCL_ERROR;
7270 }
7271
7272 char buffer[80];
7273 Element* theElement = theDomain.getElement(tag);
7274 if (theElement == 0) {
7275 opserr << "WARNING eleType ele " << tag << " not found" << endln;
7276 return TCL_ERROR;
7277 }
7278 const char* type = theElement->getClassType();
7279 sprintf(buffer, "%s", type);
7280 Tcl_AppendResult(interp, buffer, NULL);
7281
7282 return TCL_OK;
7283}
7284
7285int
7286eleNodes(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv)

Callers

nothing calls this directly

Calls 2

getElementMethod · 0.45
getClassTypeMethod · 0.45

Tested by

no test coverage detected