| 2422 | } |
| 2423 | |
| 2424 | int |
| 2425 | ForceBeamColumn3d::getInitialFlexibility(Matrix &fe) |
| 2426 | { |
| 2427 | fe.Zero(); |
| 2428 | |
| 2429 | double L = crdTransf->getInitialLength(); |
| 2430 | double oneOverL = 1.0/L; |
| 2431 | |
| 2432 | double xi[maxNumSections]; |
| 2433 | beamIntegr->getSectionLocations(numSections, L, xi); |
| 2434 | |
| 2435 | double wt[maxNumSections]; |
| 2436 | beamIntegr->getSectionWeights(numSections, L, wt); |
| 2437 | |
| 2438 | for (int i = 0; i < numSections; i++) { |
| 2439 | |
| 2440 | int order = sections[i]->getOrder(); |
| 2441 | const ID &code = sections[i]->getType(); |
| 2442 | |
| 2443 | Matrix fb(workArea, order, NEBD); |
| 2444 | |
| 2445 | double xL = xi[i]; |
| 2446 | double xL1 = xL-1.0; |
| 2447 | double wtL = wt[i]*L; |
| 2448 | |
| 2449 | const Matrix &fSec = sections[i]->getInitialFlexibility(); |
| 2450 | fb.Zero(); |
| 2451 | double tmp; |
| 2452 | int ii, jj; |
| 2453 | for (ii = 0; ii < order; ii++) { |
| 2454 | switch(code(ii)) { |
| 2455 | case SECTION_RESPONSE_P: |
| 2456 | for (jj = 0; jj < order; jj++) |
| 2457 | fb(jj,0) += fSec(jj,ii)*wtL; |
| 2458 | break; |
| 2459 | case SECTION_RESPONSE_MZ: |
| 2460 | for (jj = 0; jj < order; jj++) { |
| 2461 | tmp = fSec(jj,ii)*wtL; |
| 2462 | fb(jj,1) += xL1*tmp; |
| 2463 | fb(jj,2) += xL*tmp; |
| 2464 | } |
| 2465 | break; |
| 2466 | case SECTION_RESPONSE_VY: |
| 2467 | for (jj = 0; jj < order; jj++) { |
| 2468 | tmp = oneOverL*fSec(jj,ii)*wtL; |
| 2469 | fb(jj,1) += tmp; |
| 2470 | fb(jj,2) += tmp; |
| 2471 | } |
| 2472 | break; |
| 2473 | case SECTION_RESPONSE_MY: |
| 2474 | for (jj = 0; jj < order; jj++) { |
| 2475 | tmp = fSec(jj,ii)*wtL; |
| 2476 | fb(jj,3) += xL1*tmp; |
| 2477 | fb(jj,4) += xL*tmp; |
| 2478 | } |
| 2479 | break; |
| 2480 | case SECTION_RESPONSE_VZ: |
| 2481 | for (jj = 0; jj < order; jj++) { |
no test coverage detected