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

Method getResponse

SRC/element/forceBeamColumn/ForceBeamColumn2d.cpp:3181–3447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3179}
3180
3181int
3182ForceBeamColumn2d::getResponse(int responseID, Information &eleInfo)
3183{
3184 static Vector vp(3);
3185 static Matrix fe(3,3);
3186
3187 if (responseID == 1)
3188 return eleInfo.setVector(this->getResistingForce());
3189
3190 else if (responseID == 13)
3191 return eleInfo.setVector(this->getRayleighDampingForces());
3192
3193 else if (responseID == 2) {
3194 double p0[3]; p0[0] = 0.0; p0[1] = 0.0; p0[2] = 0.0;
3195 if (numEleLoads > 0)
3196 this->computeReactions(p0);
3197 theVector(3) = Se(0);
3198 theVector(0) = -Se(0)+p0[0];
3199 theVector(2) = Se(1);
3200 theVector(5) = Se(2);
3201 double V = (Se(1)+Se(2))/crdTransf->getInitialLength();
3202 theVector(1) = V+p0[1];
3203 theVector(4) = -V+p0[2];
3204 return eleInfo.setVector(theVector);
3205 }
3206
3207 // Chord rotation
3208 else if (responseID == 3) {
3209 vp = crdTransf->getBasicTrialDisp();
3210 return eleInfo.setVector(vp);
3211 }
3212
3213 // Plastic rotation
3214 else if (responseID == 4) {
3215 this->getInitialFlexibility(fe);
3216 vp = crdTransf->getBasicTrialDisp();
3217 vp.addMatrixVector(1.0, fe, Se, -1.0);
3218 static Vector v0(3);
3219 this->getInitialDeformations(v0);
3220 vp.addVector(1.0, v0, -1.0);
3221 return eleInfo.setVector(vp);
3222 }
3223
3224 // Point of inflection
3225 else if (responseID == 5) {
3226 double LI = 0.0;
3227
3228 if (fabs(Se(1)+Se(2)) > DBL_EPSILON) {
3229 double L = crdTransf->getInitialLength();
3230
3231 LI = Se(1)/(Se(1)+Se(2))*L;
3232 }
3233
3234 return eleInfo.setDouble(LI);
3235 }
3236
3237 // Tangent drift
3238 else if (responseID == 6) {

Callers

nothing calls this directly

Calls 15

computeReactionsMethod · 0.95
getInitialFlexibilityMethod · 0.95
getCBDIinfluenceMatrixFunction · 0.85
getResistingForceMethod · 0.80
getBasicTrialDispMethod · 0.80
typeEnum · 0.50
setVectorMethod · 0.45
getInitialLengthMethod · 0.45
addMatrixVectorMethod · 0.45
addVectorMethod · 0.45
setDoubleMethod · 0.45

Tested by

no test coverage detected