| 3773 | } |
| 3774 | |
| 3775 | int |
| 3776 | ForceBeamColumn2d::commitSensitivity(int gradNumber, int numGrads) |
| 3777 | { |
| 3778 | int err = 0; |
| 3779 | |
| 3780 | double L = crdTransf->getInitialLength(); |
| 3781 | double oneOverL = 1.0/L; |
| 3782 | |
| 3783 | double pts[maxNumSections]; |
| 3784 | beamIntegr->getSectionLocations(numSections, L, pts); |
| 3785 | |
| 3786 | double wts[maxNumSections]; |
| 3787 | beamIntegr->getSectionWeights(numSections, L, wts); |
| 3788 | |
| 3789 | double dLdh = crdTransf->getdLdh(); |
| 3790 | |
| 3791 | double dptsdh[maxNumSections]; |
| 3792 | beamIntegr->getLocationsDeriv(numSections, L, dLdh, dptsdh); |
| 3793 | |
| 3794 | double d1oLdh = crdTransf->getd1overLdh(); |
| 3795 | |
| 3796 | static Vector dqdh(3); |
| 3797 | dqdh = this->computedqdh(gradNumber); |
| 3798 | |
| 3799 | // dvdh = A dudh + dAdh u |
| 3800 | const Vector &dvdh = crdTransf->getBasicDisplSensitivity(gradNumber); |
| 3801 | dqdh.addMatrixVector(1.0, kv, dvdh, 1.0); // A dudh |
| 3802 | |
| 3803 | if (crdTransf->isShapeSensitivity()) { |
| 3804 | //const Vector &dAdh_u = crdTransf->getBasicTrialDispShapeSensitivity(); |
| 3805 | //dqdh.addMatrixVector(1.0, kv, dAdh_u, 1.0); // dAdh u |
| 3806 | } |
| 3807 | |
| 3808 | // Loop over integration points |
| 3809 | for (int i = 0; i < numSections; i++) { |
| 3810 | |
| 3811 | int order = sections[i]->getOrder(); |
| 3812 | const ID &code = sections[i]->getType(); |
| 3813 | |
| 3814 | double xL = pts[i]; |
| 3815 | double xL1 = xL-1.0; |
| 3816 | |
| 3817 | double dxLdh = dptsdh[i]; |
| 3818 | |
| 3819 | Vector ds(workArea, order); |
| 3820 | ds.Zero(); |
| 3821 | |
| 3822 | // Add sensitivity wrt element loads |
| 3823 | if (numEleLoads > 0) { |
| 3824 | this->computeSectionForceSensitivity(ds, i, gradNumber); |
| 3825 | } |
| 3826 | |
| 3827 | int j; |
| 3828 | for (j = 0; j < order; j++) { |
| 3829 | switch(code(j)) { |
| 3830 | case SECTION_RESPONSE_P: |
| 3831 | ds(j) += dqdh(0); |
| 3832 | break; |
nothing calls this directly
no test coverage detected