const Matrix & SectionAggregator::getSectionFlexibility(void) { int i = 0; int theSectionOrder = 0; // Zero before assembly fs->Zero(); if (theSection) { const Matrix &fSec = theSection->getSectionFlexibility(); theSectionOrder = theSection->getOrder(); for (i = 0; i < theSectionOrder; i++) for (int j = 0; j < theSectionOrder; j++) (*fs)(i,j) = fSec(i,j); } int order = theSectionOrder + numMats; for ( ; i < order; i++) { double k = theAdditions[i-theSectionOrder]->getTangent(); if (k == 0.0) { opserr << "SectionAggregator::getSectionFlexibility -- singular section stiffness\n"; (*fs)(i,i) = 1.e14; } else (*fs)(i,i) = 1/k; } return *fs; }
const Matrix & SectionAggregator::getInitialFlexibility(void) { int i = 0; int theSectionOrder = 0; // Zero before assembly fs->Zero(); if (theSection) { const Matrix &fSec = theSection->getInitialFlexibility(); theSectionOrder = theSection->getOrder(); for (i = 0; i < theSectionOrder; i++) for (int j = 0; j < theSectionOrder; j++) (*fs)(i,j) = fSec(i,j); } int order = theSectionOrder + numMats; for ( ; i < order; i++) { double k = theAdditions[i-theSectionOrder]->getInitialTangent(); (*fs)(i,i) = 1.0/k; } return *fs; }
//! @brief Returns the flexibility matrix. const XC::Matrix &XC::SectionAggregator::getSectionFlexibility(void) const { int theSectionOrder= 0; // Zero before assembly fs->Zero(); if(theSection) { const XC::Matrix &fSec= theSection->getSectionFlexibility(); theSectionOrder= theSection->getOrder(); for(register int i= 0; i < theSectionOrder; i++) for(register int j= 0; j < theSectionOrder; j++) (*fs)(i,j)= fSec(i,j); } theAdditions.getFlexibility(*fs,theSectionOrder); return *fs; }
int ElasticForceBeamColumn2d::getInitialFlexibility(Matrix &fe) { fe.Zero(); double L = crdTransf->getInitialLength(); double oneOverL = 1.0/L; // Flexibility from elastic interior beamIntegr->addElasticFlexibility(L, fe); double xi[maxNumSections]; beamIntegr->getSectionLocations(numSections, L, xi); double wt[maxNumSections]; beamIntegr->getSectionWeights(numSections, L, wt); for (int i = 0; i < numSections; i++) { int order = sections[i]->getOrder(); const ID &code = sections[i]->getType(); Matrix fb(workArea, order, NEBD); double xL = xi[i]; double xL1 = xL-1.0; double wtL = wt[i]*L; const Matrix &fSec = sections[i]->getInitialFlexibility(); fb.Zero(); double tmp; int ii, jj; for (ii = 0; ii < order; ii++) { switch(code(ii)) { case SECTION_RESPONSE_P: for (jj = 0; jj < order; jj++) fb(jj,0) += fSec(jj,ii)*wtL; break; case SECTION_RESPONSE_MZ: for (jj = 0; jj < order; jj++) { tmp = fSec(jj,ii)*wtL; fb(jj,1) += xL1*tmp; fb(jj,2) += xL*tmp; } break; case SECTION_RESPONSE_VY: for (jj = 0; jj < order; jj++) { tmp = oneOverL*fSec(jj,ii)*wtL; fb(jj,1) += tmp; fb(jj,2) += tmp; } break; default: break; } } for (ii = 0; ii < order; ii++) { switch (code(ii)) { case SECTION_RESPONSE_P: for (jj = 0; jj < NEBD; jj++) fe(0,jj) += fb(ii,jj); break; case SECTION_RESPONSE_MZ: for (jj = 0; jj < NEBD; jj++) { tmp = fb(ii,jj); fe(1,jj) += xL1*tmp; fe(2,jj) += xL*tmp; } break; case SECTION_RESPONSE_VY: for (jj = 0; jj < NEBD; jj++) { tmp = oneOverL*fb(ii,jj); fe(1,jj) += tmp; fe(2,jj) += tmp; } break; default: break; } } } return 0; }