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

Function getLoadFactor

SRC/tcl/commands.cpp:1716–1745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1714}
1715
1716int
1717getLoadFactor(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv)
1718{
1719 if (argc < 2) {
1720 opserr << "WARNING no load pattern supplied -- getLoadFactor\n";
1721 return TCL_ERROR;
1722 }
1723
1724 int pattern;
1725 if (Tcl_GetInt(interp, argv[1], &pattern) != TCL_OK) {
1726 opserr << "ERROR reading load pattern tag -- getLoadFactor\n";
1727 return TCL_ERROR;
1728 }
1729
1730 LoadPattern *thePattern = theDomain.getLoadPattern(pattern);
1731 if (thePattern == 0) {
1732 opserr << "ERROR load pattern with tag " << pattern << " not found in domain -- getLoadFactor\n";
1733 return TCL_ERROR;
1734 }
1735
1736 double factor = thePattern->getLoadFactor();
1737
1738 // sprintf(interp->result,"%f",factor);
1739
1740 char buffer [40];
1741 sprintf(buffer,"%35.20f", factor);
1742 Tcl_SetResult(interp, buffer, TCL_VOLATILE);
1743
1744 return TCL_OK;
1745}
1746
1747////////////////////////////////////////////////Abbas//////////////////////////////
1748

Callers

nothing calls this directly

Calls 2

getLoadPatternMethod · 0.45
getLoadFactorMethod · 0.45

Tested by

no test coverage detected