| 3660 | } |
| 3661 | |
| 3662 | int |
| 3663 | ForceBeamColumnCBDI2d::commitSensitivity(int gradNumber, int numGrads) |
| 3664 | { |
| 3665 | int err = 0; |
| 3666 | |
| 3667 | double L = crdTransf->getInitialLength(); |
| 3668 | double oneOverL = 1.0/L; |
| 3669 | |
| 3670 | double pts[maxNumSections]; |
| 3671 | beamIntegr->getSectionLocations(numSections, L, pts); |
| 3672 | |
| 3673 | double wts[maxNumSections]; |
| 3674 | beamIntegr->getSectionWeights(numSections, L, wts); |
| 3675 | |
| 3676 | double dLdh = crdTransf->getdLdh(); |
| 3677 | |
| 3678 | double dptsdh[maxNumSections]; |
| 3679 | beamIntegr->getLocationsDeriv(numSections, L, dLdh, dptsdh); |
| 3680 | |
| 3681 | double d1oLdh = crdTransf->getd1overLdh(); |
| 3682 | |
| 3683 | static Vector dqdh(3); |
| 3684 | dqdh = this->computedqdh(gradNumber); |
| 3685 | |
| 3686 | // dvdh = A dudh + dAdh u |
| 3687 | const Vector &dvdh = crdTransf->getBasicDisplSensitivity(gradNumber); |
| 3688 | dqdh.addMatrixVector(1.0, kv, dvdh, 1.0); // A dudh |
| 3689 | |
| 3690 | if (crdTransf->isShapeSensitivity()) { |
| 3691 | //const Vector &dAdh_u = crdTransf->getBasicTrialDispShapeSensitivity(); |
| 3692 | //dqdh.addMatrixVector(1.0, kv, dAdh_u, 1.0); // dAdh u |
| 3693 | } |
| 3694 | |
| 3695 | bool isGamma = false; |
| 3696 | |
| 3697 | Vector kappa(numSections); |
| 3698 | Vector gamma(numSections); |
| 3699 | for (int i = 0; i < numSections; i++) { |
| 3700 | int order = sections[i]->getOrder(); |
| 3701 | const ID &code = sections[i]->getType(); |
| 3702 | for (int j = 0; j < order; j++) { |
| 3703 | if (code(j) == SECTION_RESPONSE_MZ) |
| 3704 | kappa(i) += (vs[i])(j); |
| 3705 | if (code(j) == SECTION_RESPONSE_VY) { |
| 3706 | gamma(i) += (vs[i])(j); |
| 3707 | isGamma = true; |
| 3708 | } |
| 3709 | } |
| 3710 | } |
| 3711 | isGamma = CSBDI && isGamma; |
| 3712 | |
| 3713 | double wi[maxNumSections]; |
| 3714 | Vector w(wi, numSections); |
| 3715 | double wpi[maxNumSections]; |
| 3716 | Vector wp(wpi, numSections); |
| 3717 | wp.Zero(); |
| 3718 | this->computew(w, wp, pts, kappa, gamma); |
| 3719 |
nothing calls this directly
no test coverage detected