| 880 | } |
| 881 | |
| 882 | PyObject *ops_specifyAnalysis(PyObject *self, PyObject *args) |
| 883 | { |
| 884 | OPS_ResetCommandLine(PyTuple_Size(args), 0, args); |
| 885 | |
| 886 | if(OPS_GetNumRemainingInputArgs() < 1) { |
| 887 | PyErr_SetString(PyExc_RuntimeError,"must specify analysis name "); |
| 888 | return NULL; |
| 889 | } |
| 890 | |
| 891 | // analysis type |
| 892 | std::string type = OPS_GetString(); |
| 893 | |
| 894 | // create analysis |
| 895 | if(type == "Static") { |
| 896 | anaBuilder.newStaticAnalysis(); |
| 897 | } else if(type == "Transient") { |
| 898 | anaBuilder.newTransientAnalysis(); |
| 899 | } else if(type == "PFEM") { |
| 900 | int numData = OPS_GetNumRemainingInputArgs(); |
| 901 | if(numData < 2) { |
| 902 | PyErr_SetString(PyExc_RuntimeError,"must specify dtmax and dtmin for PFEM analysis"); |
| 903 | return NULL; |
| 904 | } |
| 905 | |
| 906 | double data[3] = {0,0,0.5}; |
| 907 | if(numData > 3) numData = 3; |
| 908 | if(OPS_GetDoubleInput(&numData,&data[0]) < 0) return 0; |
| 909 | |
| 910 | anaBuilder.newPFEMAnalysis(data[0],data[1],data[2]); |
| 911 | } |
| 912 | |
| 913 | Py_INCREF(Py_None); |
| 914 | return Py_None; |
| 915 | } |
| 916 | |
| 917 | PyObject *ops_specifyCTest(PyObject *self, PyObject *args) |
| 918 | { |
nothing calls this directly
no test coverage detected