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

Function getStress

SRC/runtime/python/OpenSeesPyRT.cpp:91–159  ·  view source on GitHub ↗

Trampoline (need one for each virtual function) */

Source from the content-addressed store, hash-verified

89 }
90 /* Trampoline (need one for each virtual function) */
91 double getStress() override {
92 PYBIND11_OVERRIDE_PURE(
93 double,
94 UniaxialMaterial,
95 getStress,
96 );
97 }
98 int sendSelf(int commitTag, Channel &theChannel) override {
99 return 0;
100 }
101 int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker& broker) override {
102 return 0;
103 }
104 double getStrain() override {
105 PYBIND11_OVERRIDE_PURE(double, UniaxialMaterial, getStrain);
106 }
107 double getTangent() override {
108 PYBIND11_OVERRIDE_PURE(double,UniaxialMaterial, getTangent);
109 }
110 double getInitialTangent() override {
111 PYBIND11_OVERRIDE_PURE(double, UniaxialMaterial, getInitialTangent);
112 }
113 int commitState() override {
114 PYBIND11_OVERRIDE_PURE(
115 int, // Return type
116 UniaxialMaterial, // Parent class
117 commitState // Name of function in C++ (must match Python name)
118 );
119 }
120 int revertToLastCommit() override {
121 PYBIND11_OVERRIDE_PURE(
122 int, /* Return type */
123 UniaxialMaterial, /* Parent class */
124 revertToLastCommit /* Name of function in C++ (must match Python name) */
125 );
126 }
127 int revertToStart() override {
128 PYBIND11_OVERRIDE_PURE(int, UniaxialMaterial, revertToStart);
129 }
130 UniaxialMaterial *getCopy() override {
131 py::gil_scoped_acquire acquire;
132
133 auto self = py::cast(this);
134 auto cloned = self.attr("getCopy")();
135
136 auto keep_python_state_alive = std::make_shared<py::object>(cloned);
137 // auto ptr = cloned.cast<UniaxialMaterial*>();
138 auto ptr = py::cast<PyUniaxialMaterial*>(cloned.release());
139
140 py::gil_scoped_release release;
141 return ptr;
142 // return std::shared_ptr<UniaxialMaterial>(keep_python_state_alive, ptr);
143 // PYBIND11_OVERRIDE_PURE(UniaxialMaterial*, UniaxialMaterial, getCopy);
144 // return this->clone();
145 }
146
147 int setTrialStrain(double strain, double strainRate=0) override {
148 PYBIND11_OVERRIDE_PURE(

Callers 15

getResponseMethod · 0.85
getResponseMethod · 0.85
SAniSandMS3D.cppFile · 0.85
getResponseMethod · 0.85
getResponseMethod · 0.85
getResponseMethod · 0.85
getResponseMethod · 0.85
getResponseMethod · 0.85
getResponseMethod · 0.85
getResponseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected