set transformation matrix from local to basic system
| 1303 | |
| 1304 | // set transformation matrix from local to basic system |
| 1305 | void TwoNodeLinkSection::setTranLocalBasic() |
| 1306 | { |
| 1307 | int numDIR = theSection->getOrder(); |
| 1308 | const ID &type = theSection->getType(); |
| 1309 | |
| 1310 | // resize transformation matrix and zero it |
| 1311 | Tlb.resize(numDIR,numDOF); |
| 1312 | Tlb.Zero(); |
| 1313 | |
| 1314 | for (int i=0; i<numDIR; i++) { |
| 1315 | int dirID = this->getDirID(type(i)); |
| 1316 | |
| 1317 | Tlb(i,dirID) = -1.0; |
| 1318 | Tlb(i,dirID+numDOF/2) = 1.0; |
| 1319 | |
| 1320 | // switch on dimensionality of element |
| 1321 | switch (elemType) { |
| 1322 | case D2N6: |
| 1323 | if (dirID == 1) { |
| 1324 | Tlb(i,2) = -shearDistI(0)*L; |
| 1325 | Tlb(i,5) = -(1.0 - shearDistI(0))*L; |
| 1326 | } |
| 1327 | break; |
| 1328 | case D3N12: |
| 1329 | if (dirID == 1) { |
| 1330 | Tlb(i,5) = -shearDistI(0)*L; |
| 1331 | Tlb(i,11) = -(1.0-shearDistI(0))*L; |
| 1332 | } |
| 1333 | else if (dirID == 2) { |
| 1334 | Tlb(i,4) = shearDistI(1)*L; |
| 1335 | Tlb(i,10) = (1.0-shearDistI(1))*L; |
| 1336 | } |
| 1337 | break; |
| 1338 | default : |
| 1339 | // do nothing |
| 1340 | break; |
| 1341 | } |
| 1342 | } |
| 1343 | } |
| 1344 | |
| 1345 | int TwoNodeLinkSection::getDirID(int sectionCode) |
| 1346 | { |