| 1056 | |
| 1057 | |
| 1058 | int TwoNodeLinkSection::getResponse(int responseID, Information &eleInfo) |
| 1059 | { |
| 1060 | int numDIR = theSection->getOrder(); |
| 1061 | |
| 1062 | Vector defoAndForce(numDIR*2); |
| 1063 | Vector &theVec = *(eleInfo.theVector); |
| 1064 | ID &theID = *(eleInfo.theID); |
| 1065 | |
| 1066 | switch (responseID) { |
| 1067 | case 1: // global forces |
| 1068 | return eleInfo.setVector(this->getResistingForce()); |
| 1069 | |
| 1070 | case 2: // local forces |
| 1071 | theVector->Zero(); |
| 1072 | // determine resisting forces in local system |
| 1073 | theVector->addMatrixTransposeVector(0.0, Tlb, qb, 1.0); |
| 1074 | // add P-Delta effects to local forces |
| 1075 | if (Mratio.Size() == 4) |
| 1076 | this->addPDeltaForces(*theVector, qb); |
| 1077 | |
| 1078 | return eleInfo.setVector(*theVector); |
| 1079 | |
| 1080 | case 3: // basic forces |
| 1081 | return eleInfo.setVector(qb); |
| 1082 | |
| 1083 | case 4: // local displacements |
| 1084 | return eleInfo.setVector(ul); |
| 1085 | |
| 1086 | case 5: // basic displacements |
| 1087 | return eleInfo.setVector(ub); |
| 1088 | |
| 1089 | case 6: // basic deformations and basic forces |
| 1090 | defoAndForce.Zero(); |
| 1091 | defoAndForce.Assemble(ub,0); |
| 1092 | defoAndForce.Assemble(qb,numDIR); |
| 1093 | |
| 1094 | return eleInfo.setVector(defoAndForce); |
| 1095 | |
| 1096 | case 20: |
| 1097 | theVec(0) = trans(0,0); |
| 1098 | theVec(1) = trans(0,1); |
| 1099 | theVec(2) = trans(0,2); |
| 1100 | return 0; |
| 1101 | case 21: |
| 1102 | theVec(0) = trans(1,0); |
| 1103 | theVec(1) = trans(1,1); |
| 1104 | theVec(2) = trans(1,2); |
| 1105 | return 0; |
| 1106 | case 22: |
| 1107 | theVec(0) = trans(2,0); |
| 1108 | theVec(1) = trans(2,1); |
| 1109 | theVec(2) = trans(2,2); |
| 1110 | return 0; |
| 1111 | |
| 1112 | default: |
| 1113 | return -1; |
| 1114 | } |
| 1115 | } |
nothing calls this directly
no test coverage detected