| 360 | |
| 361 | |
| 362 | int |
| 363 | getParamValue(ClientData clientData, Tcl_Interp *interp, Tcl_Size argc, |
| 364 | TCL_Char ** const argv) |
| 365 | { |
| 366 | assert(clientData != nullptr); |
| 367 | Domain* the_domain = (Domain*)clientData; |
| 368 | |
| 369 | if (argc < 2) { |
| 370 | opserr << "Insufficient arguments to getParamValue" << endln; |
| 371 | return TCL_ERROR; |
| 372 | } |
| 373 | |
| 374 | int paramTag; |
| 375 | |
| 376 | if (Tcl_GetInt(interp, argv[1], ¶mTag) != TCL_OK) { |
| 377 | opserr << OpenSees::PromptValueError << "getParamValue -- could not read paramTag \n"; |
| 378 | return TCL_ERROR; |
| 379 | } |
| 380 | |
| 381 | Parameter *theEle = the_domain->getParameter(paramTag); |
| 382 | |
| 383 | char buffer[40]; |
| 384 | |
| 385 | sprintf(buffer, "%35.20f", theEle->getValue()); |
| 386 | Tcl_SetResult(interp, buffer, TCL_VOLATILE); |
| 387 | |
| 388 | return TCL_OK; |
| 389 | } |
| 390 | |
| 391 | |
| 392 | int |
nothing calls this directly
no test coverage detected