| 1354 | } |
| 1355 | |
| 1356 | int |
| 1357 | ElasticForceBeamColumn3d::getResponse(int responseID, Information &eleInfo) |
| 1358 | { |
| 1359 | static Vector vp(NEBD); |
| 1360 | static Matrix fe(NEBD,NEBD); |
| 1361 | static Vector Se(NEBD); |
| 1362 | this->computeBasicForces(Se); |
| 1363 | |
| 1364 | double p0[NEBD]; |
| 1365 | Vector p0Vec(p0, NEBD); |
| 1366 | p0Vec.Zero(); |
| 1367 | |
| 1368 | if (responseID == 1) |
| 1369 | return eleInfo.setVector(this->getResistingForce()); |
| 1370 | |
| 1371 | else if (responseID == 2) { |
| 1372 | // Axial |
| 1373 | double N = Se(0); |
| 1374 | theVector(6) = N; |
| 1375 | theVector(0) = -N+p0[0]; |
| 1376 | |
| 1377 | // Torsion |
| 1378 | double T = Se(5); |
| 1379 | theVector(9) = T; |
| 1380 | theVector(3) = -T; |
| 1381 | |
| 1382 | // Moments about z and shears along y |
| 1383 | double M1 = Se(1); |
| 1384 | double M2 = Se(2); |
| 1385 | theVector(5) = M1; |
| 1386 | theVector(11) = M2; |
| 1387 | double L = crdTransf->getInitialLength(); |
| 1388 | double V = (M1+M2)/L; |
| 1389 | theVector(1) = V+p0[1]; |
| 1390 | theVector(7) = -V+p0[2]; |
| 1391 | |
| 1392 | // Moments about y and shears along z |
| 1393 | M1 = Se(3); |
| 1394 | M2 = Se(4); |
| 1395 | theVector(4) = M1; |
| 1396 | theVector(10) = M2; |
| 1397 | V = (M1+M2)/L; |
| 1398 | theVector(2) = -V+p0[3]; |
| 1399 | theVector(8) = V+p0[4]; |
| 1400 | |
| 1401 | return eleInfo.setVector(theVector); |
| 1402 | |
| 1403 | } |
| 1404 | |
| 1405 | // Chord rotation |
| 1406 | else if (responseID == 3) { |
| 1407 | vp = crdTransf->getBasicTrialDisp(); |
| 1408 | return eleInfo.setVector(vp); |
| 1409 | } |
| 1410 | |
| 1411 | // Plastic rotation |
| 1412 | else if (responseID == 4) { |
| 1413 | this->getInitialFlexibility(fe); |
nothing calls this directly
no test coverage detected