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

Method commitSensitivity

SRC/material/section/NDFiberSectionWarping2d.cpp:1763–1826  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1761}
1762
1763int
1764 NDFiberSectionWarping2d::commitSensitivity(const Vector& defSens,
1765 int gradIndex, int numGrads)
1766{
1767 double d0 = defSens(0);
1768 double d1 = defSens(1);
1769 double d2 = defSens(2);
1770 double d3 = defSens(3);
1771 double d4 = defSens(4);
1772
1773 dedh = defSens;
1774
1775 static double fiberLocs[10000];
1776
1777 if (sectionIntegr != 0)
1778 sectionIntegr->getFiberLocations(numFibers, fiberLocs);
1779 else {
1780 for (int i = 0; i < numFibers; i++)
1781 fiberLocs[i] = matData[2*i];
1782 }
1783
1784 static double locsDeriv[10000];
1785 static double areaDeriv[10000];
1786
1787 if (sectionIntegr != 0) {
1788 sectionIntegr->getLocationsDeriv(numFibers, locsDeriv);
1789 sectionIntegr->getWeightsDeriv(numFibers, areaDeriv);
1790 }
1791 else {
1792 for (int i = 0; i < numFibers; i++) {
1793 locsDeriv[i] = 0.0;
1794 areaDeriv[i] = 0.0;
1795 }
1796 }
1797
1798 double y;
1799 double kappa = e(1);
1800 double gamma = e(2);
1801 double phi = e(3);
1802 double phiprime = e(4);
1803
1804 static Vector depsdh(2);
1805
1806 double rootAlpha = 1.0;
1807 if (alpha != 1.0)
1808 rootAlpha = sqrt(alpha);
1809
1810 double drootAlphadh = 0.0;
1811 if (parameterID == 1)
1812 drootAlphadh = 0.5/rootAlpha;
1813
1814 depsdh(1) = rootAlpha*d2 + drootAlphadh*gamma;
1815
1816 for (int i = 0; i < numFibers; i++) {
1817 NDMaterial *theMat = theMaterials[i];
1818 y = fiberLocs[i] - yBar;
1819
1820 // determine material strain and set it

Callers

nothing calls this directly

Calls 3

getFiberLocationsMethod · 0.45
getLocationsDerivMethod · 0.45
getWeightsDerivMethod · 0.45

Tested by

no test coverage detected