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

Function ops_testUniaxialMaterial

SRC/interpreter/OpenSeesCommandsPython.cpp:62–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62static PyObject *ops_testUniaxialMaterial(PyObject *self, PyObject *args)
63{
64 OPS_ResetCommandLine(PyTuple_Size(args), 0, args);
65 int numberArgs = OPS_GetNumRemainingInputArgs();
66
67 if (numberArgs != 1) {
68 PyErr_SetString(PyExc_RuntimeError, "testUniaxialMaterial - You must provide a material tag.");
69 return NULL;
70 }
71
72 int tag;
73 int numData = 1;
74 OPS_GetIntInput(&numData, &tag);
75
76 // if (theTestingUniaxialMaterial != 0)
77 // delete theTestingUniaxialMaterial;
78
79 theTestingUniaxialMaterial=OPS_getUniaxialMaterial(tag);
80
81 if (theTestingUniaxialMaterial == 0) {
82 PyErr_SetString(PyExc_ValueError,"testUniaxialMaterial - Material Not Found.");
83 return NULL;
84 }
85 PyObject *ret = Py_BuildValue("d", 0.0);
86 return ret;
87}
88
89
90static PyObject *ops_setStrain(PyObject *self, PyObject *args)

Callers

nothing calls this directly

Calls 4

OPS_ResetCommandLineFunction · 0.85
OPS_GetIntInputFunction · 0.70
OPS_getUniaxialMaterialFunction · 0.50

Tested by

no test coverage detected