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

Method getResponse

SRC/element/forceBeamColumn/ElasticForceBeamColumn2d.cpp:1199–1292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1197}
1198
1199int
1200ElasticForceBeamColumn2d::getResponse(int responseID, Information &eleInfo)
1201{
1202 static Vector Se(NEBD);
1203 static Vector vp(NEBD);
1204 static Matrix fe(NEBD,NEBD);
1205
1206 if (responseID == 1)
1207 return eleInfo.setVector(this->getResistingForce());
1208
1209 else if (responseID == 2) {
1210 double p0[3]; p0[0] = 0.0; p0[1] = 0.0; p0[2] = 0.0;
1211 if (numEleLoads > 0)
1212 this->computeReactions(p0);
1213 this->computeBasicForces(Se);
1214 theVector(3) = Se(0);
1215 theVector(0) = -Se(0)+p0[0];
1216 theVector(2) = Se(1);
1217 theVector(5) = Se(2);
1218 double V = (Se(1)+Se(2))/crdTransf->getInitialLength();
1219 theVector(1) = V+p0[1];
1220 theVector(4) = -V+p0[2];
1221 return eleInfo.setVector(theVector);
1222 }
1223
1224 // Chord rotation
1225 else if (responseID == 7) {
1226 this->computeBasicForces(Se);
1227 return eleInfo.setVector(Se);
1228 }
1229
1230 // Chord rotation
1231 else if (responseID == 3) {
1232 vp = crdTransf->getBasicTrialDisp();
1233 return eleInfo.setVector(vp);
1234 }
1235
1236 // Plastic rotation
1237 else if (responseID == 4) {
1238 this->computeBasicForces(Se);
1239 this->getInitialFlexibility(fe);
1240 vp = crdTransf->getBasicTrialDisp();
1241 vp.addMatrixVector(1.0, fe, Se, -1.0);
1242 return eleInfo.setVector(vp);
1243 }
1244
1245 // Point of inflection
1246 else if (responseID == 5) {
1247 double LI = 0.0;
1248 this->computeBasicForces(Se);
1249 if (fabs(Se(1)+Se(2)) > DBL_EPSILON) {
1250 double L = crdTransf->getInitialLength();
1251
1252 LI = Se(1)/(Se(1)+Se(2))*L;
1253 }
1254
1255 return eleInfo.setDouble(LI);
1256 }

Callers

nothing calls this directly

Calls 13

computeReactionsMethod · 0.95
computeBasicForcesMethod · 0.95
getInitialFlexibilityMethod · 0.95
getResistingForceMethod · 0.80
getBasicTrialDispMethod · 0.80
setVectorMethod · 0.45
getInitialLengthMethod · 0.45
addMatrixVectorMethod · 0.45
setDoubleMethod · 0.45
getSectionLocationsMethod · 0.45
getSectionWeightsMethod · 0.45
InvertMethod · 0.45

Tested by

no test coverage detected