| 1754 | |
| 1755 | |
| 1756 | void MultiYieldSurfaceClay::updateActiveSurface(void) |
| 1757 | { |
| 1758 | int numOfSurfaces = numOfSurfacesx[matN]; |
| 1759 | |
| 1760 | if (activeSurfaceNum == numOfSurfaces) return; |
| 1761 | |
| 1762 | double A, B, C, X; |
| 1763 | static T2Vector direction; |
| 1764 | static Vector t1(6); |
| 1765 | static Vector t2(6); |
| 1766 | // static Vector temp(6); |
| 1767 | static Vector center(6); |
| 1768 | center = theSurfaces[activeSurfaceNum].center(); |
| 1769 | double size = theSurfaces[activeSurfaceNum].size(); |
| 1770 | static Vector outcenter(6); |
| 1771 | outcenter= theSurfaces[activeSurfaceNum+1].center(); |
| 1772 | double outsize = theSurfaces[activeSurfaceNum+1].size(); |
| 1773 | |
| 1774 | |
| 1775 | //t1 = trialStress.deviator() - center; |
| 1776 | //t2 = center - outcenter; |
| 1777 | t1 = trialStress.deviator(); |
| 1778 | t1 -= center; |
| 1779 | t2 = center; |
| 1780 | t2 -= outcenter; |
| 1781 | |
| 1782 | A = t1 && t1; |
| 1783 | B = 2. * (t1 && t2); |
| 1784 | C = (t2 && t2) - 2./3.* outsize * outsize; |
| 1785 | X = secondOrderEqn(A,B,C,0); |
| 1786 | if ( fabs(X-1.) < LOW_LIMIT ) X = 1.; |
| 1787 | if (X < 1.){ |
| 1788 | opserr << "FATAL:MultiYieldSurfaceClay::updateActiveSurface(): error in Direction of surface motion." |
| 1789 | << endln; |
| 1790 | exit(-1); |
| 1791 | } |
| 1792 | |
| 1793 | //temp = (t1 * X + center) * (1. - size / outsize) - (center - outcenter * size / outsize); |
| 1794 | temp = center; |
| 1795 | temp.addVector(1.0, t1, X); |
| 1796 | temp *= (1.0 - size/outsize); |
| 1797 | t2 = center; |
| 1798 | t2.addVector(1.0, outcenter, -size/outsize); |
| 1799 | temp -= t2; |
| 1800 | |
| 1801 | direction.setData(temp); |
| 1802 | |
| 1803 | if (direction.deviatorLength() < LOW_LIMIT) return; |
| 1804 | |
| 1805 | temp = direction.deviator(); |
| 1806 | A = temp && temp; |
| 1807 | B = - 2 * (t1 && temp); |
| 1808 | if (fabs(B) < LOW_LIMIT) B = 0.; |
| 1809 | C = (t1 && t1) - 2./3.* size * size; |
| 1810 | if ( fabs(C) < LOW_LIMIT || fabs(C)/(t1 && t1) < LOW_LIMIT ) return; |
| 1811 | |
| 1812 | // guquan 2005 Apr. 21 |
| 1813 | // opserr<<"Low_limit is " << LOW_LIMIT << endln; |
nothing calls this directly
no test coverage detected