Changeset 25854
- Timestamp:
- 12/11/20 11:58:04 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/AdjointHorizAnalysis.cpp
r25439 r25854 1661 1661 /*Intermediaries*/ 1662 1662 int domaintype,dim; 1663 int frictionlaw;1664 1663 Element* basalelement; 1665 1664 … … 1702 1701 1703 1702 /* get the friction law: if 2-Weertman, 11-Schoof, use a special name for the coefficient*/ 1704 element->FindParam(&frictionlaw, FrictionLawEnum);1703 int frictionlaw; element->FindParam(&frictionlaw, FrictionLawEnum); 1705 1704 Input* dragcoefficient_input; 1706 1705 switch(frictionlaw) { … … 1790 1789 adjointz_input = element->GetInput(AdjointzEnum); _assert_(adjointz_input); 1791 1790 } 1792 Input* dragcoeff_input = element->GetInput(FrictionCoefficientEnum); _assert_(dragcoeff_input); 1791 /* get the friction law: 1- Budd, 11-Schoof*/ 1792 int frictionlaw; element->FindParam(&frictionlaw, FrictionLawEnum); 1793 Input* dragcoeff_input = NULL; 1794 switch(frictionlaw) { 1795 case 1: 1796 dragcoeff_input = element->GetInput(FrictionCoefficientEnum); _assert_(dragcoeff_input); 1797 break; 1798 case 2: 1799 case 11: 1800 dragcoeff_input = element->GetInput(FrictionCEnum); _assert_(dragcoeff_input); 1801 break; 1802 default: 1803 _error_("Friction law "<< frictionlaw <<" not supported in the inversion."); 1804 } 1793 1805 1794 1806 /* Start looping on the number of gaussian points: */ … … 1882 1894 Input* adjointx_input = element->GetInput(AdjointxEnum); _assert_(adjointx_input); 1883 1895 Input* adjointy_input = NULL; 1884 Input* dragcoeff_input = element->GetInput(FrictionCoefficientEnum); _assert_(dragcoeff_input);1885 1896 if(domaintype!=Domain2DverticalEnum){ 1886 1897 vy_input = element->GetInput(VyEnum); _assert_(vy_input); 1887 1898 adjointy_input = element->GetInput(AdjointyEnum); _assert_(adjointy_input); 1888 1899 } 1900 /* get the friction law: 1- Budd, 11-Schoof*/ 1901 int frictionlaw; element->FindParam(&frictionlaw, FrictionLawEnum); 1902 Input* dragcoeff_input = NULL; 1903 switch(frictionlaw) { 1904 case 1: 1905 dragcoeff_input = element->GetInput(FrictionCoefficientEnum); _assert_(dragcoeff_input); 1906 break; 1907 case 2: 1908 case 11: 1909 dragcoeff_input = element->GetInput(FrictionCEnum); _assert_(dragcoeff_input); 1910 break; 1911 default: 1912 _error_("Friction law "<< frictionlaw <<" not supported in the inversion."); 1913 } 1914 1889 1915 /* Start looping on the number of gaussian points: */ 1890 1916 Gauss* gauss=element->NewGaussBase(4); … … 1958 1984 /*Fetch number of vertices for this finite element*/ 1959 1985 int numvertices = basalelement->GetNumberOfVertices(); 1960 int frictionlaw;1961 1986 1962 1987 /*Initialize some vectors*/ … … 1977 2002 1978 2003 /* get the friction law: 1- Budd, 11-Schoof*/ 1979 element->FindParam(&frictionlaw, FrictionLawEnum);1980 Input* dragcoeff_input ;2004 int frictionlaw;element->FindParam(&frictionlaw, FrictionLawEnum); 2005 Input* dragcoeff_input = NULL; 1981 2006 switch(frictionlaw) { 1982 2007 case 1:
Note:
See TracChangeset
for help on using the changeset viewer.