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

Function eleType

SRC/runtime/commands/domain/element.cpp:369–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367}
368
369int
370eleType(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char ** const argv)
371{
372 assert(clientData != nullptr);
373 Domain *the_domain = (Domain*)clientData;
374
375 if (argc < 2) {
376 opserr << OpenSees::PromptValueError << "want - eleType eleTag?\n";
377 return TCL_ERROR;
378 }
379
380 int tag;
381 if (Tcl_GetInt(interp, argv[1], &tag) != TCL_OK) {
382 opserr << OpenSees::PromptValueError << "eleType eleTag? \n";
383 return TCL_ERROR;
384 }
385
386 Element *theElement = the_domain->getElement(tag);
387
388 if (theElement == nullptr) {
389 opserr << OpenSees::PromptValueError << "eleType ele " << tag << " not found" << "\n";
390 return TCL_ERROR;
391 }
392 const char *type = theElement->getClassType();
393
394 Tcl_AppendResult(interp, type, NULL);
395
396 return TCL_OK;
397}
398
399
400int

Callers

nothing calls this directly

Calls 2

getElementMethod · 0.45
getClassTypeMethod · 0.45

Tested by

no test coverage detected