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

Method setTranLocalBasic

SRC/element/twoNodeLink/TwoNodeLinkSection.cpp:1305–1343  ·  view source on GitHub ↗

set transformation matrix from local to basic system

Source from the content-addressed store, hash-verified

1303
1304// set transformation matrix from local to basic system
1305void 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
1345int TwoNodeLinkSection::getDirID(int sectionCode)
1346{

Callers 1

setDomainMethod · 0.95

Calls 6

getDirIDMethod · 0.95
typeEnum · 0.50
getOrderMethod · 0.45
getTypeMethod · 0.45
resizeMethod · 0.45
ZeroMethod · 0.45

Tested by

no test coverage detected