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

Method getInitialDeformations

SRC/element/forceBeamColumn/ForceBeamColumn3d.cpp:2545–2611  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2543 }
2544
2545int
2546ForceBeamColumn3d::getInitialDeformations(Vector &v0)
2547{
2548 v0.Zero();
2549 if (numEleLoads < 1)
2550 return 0;
2551
2552 double L = crdTransf->getInitialLength();
2553 double oneOverL = 1.0 / L;
2554
2555 double xi[maxNumSections];
2556 beamIntegr->getSectionLocations(numSections, L, xi);
2557
2558 double wt[maxNumSections];
2559 beamIntegr->getSectionWeights(numSections, L, wt);
2560
2561 for (int i = 0; i < numSections; i++) {
2562
2563 int order = sections[i]->getOrder();
2564 const ID &code = sections[i]->getType();
2565
2566 double xL = xi[i];
2567 double xL1 = xL - 1.0;
2568 double wtL = wt[i] * L;
2569
2570 static Vector sp;
2571 sp.setData(workArea, order);
2572 sp.Zero();
2573
2574 this->computeSectionForces(sp, i);
2575
2576 const Matrix &fse = sections[i]->getInitialFlexibility();
2577
2578 static Vector e;
2579 e.setData(&workArea[order], order);
2580
2581 e.addMatrixVector(0.0, fse, sp, 1.0);
2582
2583 double dei, tmp;
2584 for (int ii = 0; ii < order; ii++) {
2585 dei = e(ii)*wtL;
2586 switch (code(ii)) {
2587 case SECTION_RESPONSE_P:
2588 v0(0) += dei;
2589 break;
2590 case SECTION_RESPONSE_MZ:
2591 v0(1) += xL1*dei; v0(2) += xL*dei;
2592 break;
2593 case SECTION_RESPONSE_VY:
2594 tmp = oneOverL*dei;
2595 v0(1) += tmp; v0(2) += tmp;
2596 break;
2597 case SECTION_RESPONSE_MY:
2598 v0(3) += xL1*dei; v0(4) += xL*dei;
2599 break;
2600 case SECTION_RESPONSE_VZ:
2601 tmp = oneOverL*dei;
2602 v0(3) += tmp; v0(4) += tmp;

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