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

Method getResponse

SRC/element/UWelements/SimpleContact2D.cpp:804–835  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

802
803
804int
805SimpleContact2D::getResponse(int responseID, Information &eleInfo)
806{
807#ifdef DEBUG
808 opserr << "SimpleContact2D::getResponse(...): " << MyTag << endln;
809#endif
810
811 Vector force(2);
812
813 // get contact stresse/forces
814 Vector stress = theMaterial->getStress();
815
816 if (responseID == 1) {
817
818 force = stress(0)*n + stress(1)*T;
819 return eleInfo.setVector(force);
820
821 } else if (responseID == 2) {
822
823 force = stress(1)*T;
824 return eleInfo.setVector(force);
825
826 } else if (responseID == 3) {
827
828 force(0) = stress(0);
829 force(1) = stress(1);
830 return eleInfo.setVector(force);
831
832 } else {
833 return -1;
834 }
835}
836
837int
838SimpleContact2D::setParameter(const char **argv, int argc, Parameter &param)

Callers

nothing calls this directly

Calls 2

getStressMethod · 0.45
setVectorMethod · 0.45

Tested by

no test coverage detected