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

Method commitSensitivity

SRC/element/XMUelements/AC3D8HexWithSensitivity.cpp:1762–1838  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1760
1761
1762int
1763AC3D8HexWithSensitivity::commitSensitivity(int gradNumber, int numGrads)
1764{
1765 double r = 0.0;
1766 double rw = 0.0;
1767 double s = 0.0;
1768 double sw = 0.0;
1769 double t = 0.0;
1770 double tw = 0.0;
1771 double weight = 0.0;
1772 double det_of_Jacobian = 0.0;
1773 static const int nstress = 3 ;
1774 int success;
1775
1776 static Vector stress (nstress);
1777 short where = 0;
1778
1779 Matrix sigma(1,3);
1780 Matrix NF(1,nodes_in_elem);
1781
1782 this->computeDiff();
1783 NF.Zero();
1784
1785 static Matrix ul(1,3);
1786
1787 for(short GP_c_r = 1; GP_c_r <= r_integration_order; GP_c_r++) {
1788 r = get_Gauss_p_c(r_integration_order, GP_c_r);
1789 rw = get_Gauss_p_w(r_integration_order, GP_c_r);
1790 for( short GP_c_s = 1; GP_c_s <= s_integration_order; GP_c_s++ ) {
1791 s = get_Gauss_p_c(s_integration_order, GP_c_s);
1792 sw = get_Gauss_p_w(s_integration_order, GP_c_s);
1793 for(short GP_c_t = 1; GP_c_t <= t_integration_order; GP_c_t++) {
1794 t = get_Gauss_p_c(t_integration_order, GP_c_t);
1795 tw = get_Gauss_p_w(t_integration_order, GP_c_t);
1796
1797 det_of_Jacobian = detJ[where];
1798 Matrix &dhGlobal = *L[where];
1799
1800 weight = sw * rw * tw * det_of_Jacobian;
1801
1802 where++;
1803
1804 }
1805 }
1806 }
1807
1808
1809 int i;
1810
1811 Vector epsilon(3);
1812 Matrix sstrain(3,1);
1813
1814 ul(0,0)= theNodes[0]->getDispSensitivity(1,gradNumber);
1815 ul(0,1)= theNodes[1]->getDispSensitivity(2,gradNumber);
1816 ul(0,2)= theNodes[2]->getDispSensitivity(3,gradNumber);
1817 // opserr<<"ul"<<ul<<endln;
1818
1819 for(i = 0; i < numGP; i++) {

Callers

nothing calls this directly

Calls 4

computeDiffMethod · 0.95
ZeroMethod · 0.45
getDispSensitivityMethod · 0.45
addMatrixProductMethod · 0.45

Tested by

no test coverage detected