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

Method setResponse

DEVELOPER/core/FrictionModel.cpp:91–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89
90
91Response* FrictionModel::setResponse(const char **argv, int argc,
92 OPS_Stream &theOutputStream)
93{
94 Response *theResponse = 0;
95
96 theOutputStream.tag("FrictionModelOutput");
97 theOutputStream.attr("frnMdlType", this->getClassType());
98 theOutputStream.attr("frnMdlTag", this->getTag());
99
100 // normal force
101 if (strcmp(argv[0],"normalForce") == 0 || strcmp(argv[0],"N") == 0 ||
102 strcmp(argv[0],"normalFrc") == 0) {
103 theOutputStream.tag("ResponseType", "N");
104 return new FrictionResponse(this, 1, this->getNormalForce());
105 }
106 // velocity
107 else if (strcmp(argv[0],"velocity") == 0 || strcmp(argv[0],"vel") == 0) {
108 theOutputStream.tag("ResponseType", "vel");
109 return new FrictionResponse(this, 2, this->getVelocity());
110 }
111 // friction force
112 else if (strcmp(argv[0],"frictionForce") == 0 || strcmp(argv[0],"Ff") == 0 ||
113 strcmp(argv[0],"frnForce") == 0 || strcmp(argv[0],"frnFrc") == 0) {
114 theOutputStream.tag("ResponseType", "frnFrc");
115 return new FrictionResponse(this, 3, this->getFrictionForce());
116 }
117 // coefficient of friction
118 else if (strcmp(argv[0],"frictionCoeff") == 0 || strcmp(argv[0],"mu") == 0 ||
119 strcmp(argv[0],"frnCoeff") == 0 || strcmp(argv[0],"COF") == 0) {
120 theOutputStream.tag("ResponseType", "COF");
121 return new FrictionResponse(this, 4, this->getFrictionCoeff());
122 }
123
124 theOutputStream.endTag();
125 return theResponse;
126}
127
128
129int FrictionModel::getResponse(int responseID, Information &info)

Callers

nothing calls this directly

Calls 9

getNormalForceMethod · 0.95
getVelocityMethod · 0.95
tagMethod · 0.45
attrMethod · 0.45
getClassTypeMethod · 0.45
getTagMethod · 0.45
getFrictionForceMethod · 0.45
getFrictionCoeffMethod · 0.45
endTagMethod · 0.45

Tested by

no test coverage detected