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

Method getResponse

SRC/element/forceBeamColumn/ForceBeamColumnCBDI2d.cpp:3063–3296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3061}
3062
3063int
3064ForceBeamColumnCBDI2d::getResponse(int responseID, Information &eleInfo)
3065{
3066 static Vector vp(3);
3067 static Matrix fe(3,3);
3068
3069 if (responseID == 1)
3070 return eleInfo.setVector(this->getResistingForce());
3071
3072 else if (responseID == 2) {
3073 double p0[3]; p0[0] = 0.0; p0[1] = 0.0; p0[2] = 0.0;
3074 if (numEleLoads > 0)
3075 this->computeReactions(p0);
3076 theVector(3) = Se(0);
3077 theVector(0) = -Se(0)+p0[0];
3078 theVector(2) = Se(1);
3079 theVector(5) = Se(2);
3080 double V = (Se(1)+Se(2))/crdTransf->getInitialLength();
3081 theVector(1) = V+p0[1];
3082 theVector(4) = -V+p0[2];
3083 return eleInfo.setVector(theVector);
3084 }
3085
3086 // Chord rotation
3087 else if (responseID == 7) {
3088 return eleInfo.setVector(Se);
3089 }
3090
3091 // Chord rotation
3092 else if (responseID == 3) {
3093 vp = crdTransf->getBasicTrialDisp();
3094 return eleInfo.setVector(vp);
3095 }
3096
3097 // Plastic rotation
3098 else if (responseID == 4) {
3099 this->getInitialFlexibility(fe);
3100 vp = crdTransf->getBasicTrialDisp();
3101 vp.addMatrixVector(1.0, fe, Se, -1.0);
3102 static Vector v0(3);
3103 this->getInitialDeformations(v0);
3104 vp.addVector(1.0, v0, -1.0);
3105 return eleInfo.setVector(vp);
3106 }
3107
3108 // Point of inflection
3109 else if (responseID == 5) {
3110 double LI = 0.0;
3111
3112 if (fabs(Se(1)+Se(2)) > DBL_EPSILON) {
3113 double L = crdTransf->getInitialLength();
3114
3115 LI = Se(1)/(Se(1)+Se(2))*L;
3116 }
3117
3118 return eleInfo.setDouble(LI);
3119 }
3120

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