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

Function getParamValue

SRC/runtime/commands/domain/parameter.cpp:362–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360
361
362int
363getParamValue(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], &paramTag) != 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
392int

Callers

nothing calls this directly

Calls 2

getParameterMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected