| 367 | } |
| 368 | |
| 369 | int |
| 370 | eleType(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 | |
| 400 | int |
nothing calls this directly
no test coverage detected