| 1070 | } |
| 1071 | |
| 1072 | PyObject *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 | |
| 1100 | PyObject *ops_setLoadConst(PyObject *self, PyObject *args) |
| 1101 | { |
nothing calls this directly
no test coverage detected