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

Method getResponse

SRC/element/forceBeamColumn/ForceBeamColumn3d.cpp:3228–3680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3226}
3227
3228int
3229ForceBeamColumn3d::getResponse(int responseID, Information &eleInfo)
3230{
3231 static Vector vp(6);
3232 static Matrix fe(6,6);
3233
3234 if (responseID == 1)
3235 return eleInfo.setVector(this->getResistingForce());
3236
3237 else if (responseID == 2) {
3238 double p0[5]; p0[0] = p0[1] = p0[2] = p0[3] = p0[4] = 0.0;
3239 if (numEleLoads > 0)
3240 this->computeReactions(p0);
3241 // Axial
3242 double N = Se(0);
3243 theVector(6) = N;
3244 theVector(0) = -N+p0[0];
3245
3246 // Torsion
3247 double T = Se(5);
3248 theVector(9) = T;
3249 theVector(3) = -T;
3250
3251 // Moments about z and shears along y
3252 double M1 = Se(1);
3253 double M2 = Se(2);
3254 theVector(5) = M1;
3255 theVector(11) = M2;
3256 double L = crdTransf->getInitialLength();
3257 double V = (M1+M2)/L;
3258 theVector(1) = V+p0[1];
3259 theVector(7) = -V+p0[2];
3260
3261 // Moments about y and shears along z
3262 M1 = Se(3);
3263 M2 = Se(4);
3264 theVector(4) = M1;
3265 theVector(10) = M2;
3266 V = (M1+M2)/L;
3267 theVector(2) = -V+p0[3];
3268 theVector(8) = V+p0[4];
3269
3270 return eleInfo.setVector(theVector);
3271
3272 }
3273
3274 else if (responseID == 21)
3275 return eleInfo.setVector(this->getDampingForce());
3276
3277 else if (responseID == 22) {
3278 Vector Sd(NEBD);
3279 Sd = theDamping->getDampingForce();
3280 // Axial
3281 double N = Sd(0);
3282 theVector(6) = N;
3283 theVector(0) = -N;
3284
3285 // Torsion

Callers

nothing calls this directly

Calls 15

computeReactionsMethod · 0.95
getInitialFlexibilityMethod · 0.95
getCBDIinfluenceMatrixFunction · 0.85
getResistingForceMethod · 0.80
getBasicTrialDispMethod · 0.80
getCrdsMethod · 0.80
typeEnum · 0.50
setVectorMethod · 0.45
getInitialLengthMethod · 0.45
setMatrixMethod · 0.45
addMatrixVectorMethod · 0.45

Tested by

no test coverage detected