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

Method getInitialDeformations

SRC/element/forceBeamColumn/ForceBeamColumn2d.cpp:2615–2674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2613}
2614
2615int
2616ForceBeamColumn2d::getInitialDeformations(Vector &v0)
2617{
2618 v0.Zero();
2619 if (numEleLoads < 1)
2620 return 0;
2621
2622 double L = crdTransf->getInitialLength();
2623 double oneOverL = 1.0/L;
2624
2625 double xi[maxNumSections];
2626 beamIntegr->getSectionLocations(numSections, L, xi);
2627
2628 double wt[maxNumSections];
2629 beamIntegr->getSectionWeights(numSections, L, wt);
2630
2631 for (int i = 0; i < numSections; i++) {
2632
2633 int order = sections[i]->getOrder();
2634 const ID &code = sections[i]->getType();
2635
2636 double xL = xi[i];
2637 double xL1 = xL-1.0;
2638 double wtL = wt[i]*L;
2639
2640 static Vector sp;
2641 sp.setData(workArea, order);
2642 sp.Zero();
2643
2644 this->computeSectionForces(sp, i);
2645
2646 const Matrix &fse = sections[i]->getInitialFlexibility();
2647
2648 static Vector e;
2649 e.setData(&workArea[order], order);
2650
2651 e.addMatrixVector(0.0, fse, sp, 1.0);
2652
2653 double dei, tmp;
2654 for (int ii = 0; ii < order; ii++) {
2655 dei = e(ii)*wtL;
2656 switch(code(ii)) {
2657 case SECTION_RESPONSE_P:
2658 v0(0) += dei;
2659 break;
2660 case SECTION_RESPONSE_MZ:
2661 v0(1) += xL1*dei; v0(2) += xL*dei;
2662 break;
2663 case SECTION_RESPONSE_VY:
2664 tmp = oneOverL*dei;
2665 v0(1) += tmp; v0(2) += tmp;
2666 break;
2667 default:
2668 break;
2669 }
2670 }
2671 }
2672

Callers 1

getResponseMethod · 0.95

Calls 10

computeSectionForcesMethod · 0.95
ZeroMethod · 0.45
getInitialLengthMethod · 0.45
getSectionLocationsMethod · 0.45
getSectionWeightsMethod · 0.45
getOrderMethod · 0.45
getTypeMethod · 0.45
setDataMethod · 0.45
getInitialFlexibilityMethod · 0.45
addMatrixVectorMethod · 0.45

Tested by

no test coverage detected