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

Function ops_getLoadFactor

SRC/interpreter/PythonAnalysisBuilder.cpp:1072–1098  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1070}
1071
1072PyObject *ops_getLoadFactor(PyObject *self, PyObject *args)
1073{
1074 OPS_ResetCommandLine(PyTuple_Size(args), 0, args);
1075
1076 int numData = OPS_GetNumRemainingInputArgs();
1077 if(numData < 1) {
1078 PyErr_SetString(PyExc_RuntimeError,"want patternTag");
1079 return NULL;
1080 }
1081
1082 // get inputs
1083 int patternTag;
1084 numData = 1;
1085 if(OPS_GetIntInput(&numData,&patternTag) < 0) return NULL;
1086
1087 // get load pattern
1088 Domain& theDomain = *(OPS_GetDomain());
1089 LoadPattern* thePattern = theDomain.getLoadPattern(patternTag);
1090 if(thePattern == 0) {
1091 PyErr_SetString(PyExc_RuntimeError,"the load pattern is not found");
1092 return NULL;
1093 }
1094
1095 // get load factor
1096 double value = thePattern->getLoadFactor();
1097 return Py_BuildValue("d", value);
1098}
1099
1100PyObject *ops_setLoadConst(PyObject *self, PyObject *args)
1101{

Callers

nothing calls this directly

Calls 6

OPS_ResetCommandLineFunction · 0.85
OPS_GetIntInputFunction · 0.70
OPS_GetDomainFunction · 0.70
getLoadPatternMethod · 0.45
getLoadFactorMethod · 0.45

Tested by

no test coverage detected