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

Method getResponse

SRC/element/mixedBeamColumn/MixedBeamColumn2d.cpp:1384–1516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1382
1383
1384int MixedBeamColumn2d::getResponse(int responseID, Information &eleInfo) {
1385 if (responseID == 1) { // global forces
1386 return eleInfo.setVector(this->getResistingForce());
1387
1388 } else if (responseID == 2) { // local forces
1389 // Axial
1390 double N = internalForce(0);
1391 theVector(3) = N;
1392 theVector(0) = -N+p0[0];
1393
1394 // Moments about z and shears along y
1395 double M1 = internalForce(1);
1396 double M2 = internalForce(2);
1397 theVector(2) = M1;
1398 theVector(5) = M2;
1399 double L = crdTransf->getInitialLength();
1400 double V = (M1+M2)/L;
1401 theVector(1) = V+p0[1];
1402 theVector(4) = -V+p0[2];
1403
1404 return eleInfo.setVector(theVector);
1405
1406 } else if (responseID == 3) { // basic forces
1407 return eleInfo.setVector(internalForce);
1408
1409 } else if (responseID == 4) { // section deformation (from forces)
1410
1411 int i;
1412 Vector tempVector(2*numSections);
1413 tempVector.Zero();
1414 for ( i = 0; i < numSections; i++ ){
1415 tempVector(2*i) = sectionDefFibers[i](0);
1416 tempVector(2*i+1) = sectionDefFibers[i](1);
1417 }
1418
1419 return eleInfo.setVector(tempVector);
1420
1421 } else if (responseID == 5) { // plastic section deformation (from forces)
1422
1423 int i;
1424 Vector tempVector(2*numSections);
1425 Vector sectionForce(NDM_SECTION);
1426 Vector plasticSectionDef(NDM_SECTION);
1427 tempVector.Zero();
1428 for ( i = 0; i < numSections; i++ ){
1429
1430 getSectionStress(i,sectionForce);
1431 getSectionTangent(i,2,ks);
1432 invertMatrix(NDM_SECTION,ks,fs);
1433
1434 plasticSectionDef = sectionDefFibers[i] - fs*sectionForce;
1435
1436 tempVector(2*i) = plasticSectionDef(0);
1437 tempVector(2*i+1) = plasticSectionDef(1);
1438 }
1439
1440 return eleInfo.setVector(tempVector);
1441

Callers

nothing calls this directly

Calls 13

invertMatrixFunction · 0.85
getResistingForceMethod · 0.80
typeEnum · 0.50
setVectorMethod · 0.45
getInitialLengthMethod · 0.45
ZeroMethod · 0.45
setMatrixMethod · 0.45
getSectionLocationsMethod · 0.45
getSectionWeightsMethod · 0.45
getTagMethod · 0.45
setIDMethod · 0.45
getOrderMethod · 0.45

Tested by

no test coverage detected