Changeset 25201
- Timestamp:
- 07/03/20 06:23:13 (5 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/AdjointHorizAnalysis.cpp
r24933 r25201 1103 1103 if(control_type!=MaterialsRheologyBbarEnum && 1104 1104 control_type!=FrictionCoefficientEnum && 1105 control_type!=FrictionCEnum && 1105 1106 control_type!=FrictionAsEnum && 1106 1107 control_type!=DamageDbarEnum && … … 1126 1127 switch(control_type){ 1127 1128 case FrictionCoefficientEnum: 1129 case FrictionCEnum: 1128 1130 switch(approximation){ 1129 1131 case SSAApproximationEnum: GradientJDragSSA(element,gradient,control_index); break; … … 1652 1654 /*Intermediaries*/ 1653 1655 int domaintype,dim; 1656 int frictionlaw; 1654 1657 Element* basalelement; 1655 1658 … … 1690 1693 basalelement->GetVerticesCoordinates(&xyz_list); 1691 1694 basalelement->GradientIndexing(&vertexpidlist[0],control_index); 1692 Input2* dragcoefficient_input = basalelement->GetInput2(FrictionCoefficientEnum); _assert_(dragcoefficient_input); 1695 1696 /* get the friction law: if 11-Schoof, use a special name for the coefficient*/ 1697 element->FindParam(&frictionlaw, FrictionLawEnum); 1698 Input2* dragcoefficient_input; 1699 switch(frictionlaw) { 1700 case 11: 1701 dragcoefficient_input = basalelement->GetInput2(FrictionCEnum); _assert_(dragcoefficient_input); 1702 break; 1703 default: 1704 dragcoefficient_input = basalelement->GetInput2(FrictionCoefficientEnum); _assert_(dragcoefficient_input); 1705 } 1706 1693 1707 DatasetInput2* weights_input = basalelement->GetDatasetInput2(InversionCostFunctionsCoefficientsEnum); _assert_(weights_input); 1694 1708 … … 1939 1953 /*Fetch number of vertices for this finite element*/ 1940 1954 int numvertices = basalelement->GetNumberOfVertices(); 1955 int frictionlaw; 1941 1956 1942 1957 /*Initialize some vectors*/ … … 1955 1970 Input2* adjointx_input = basalelement->GetInput2(AdjointxEnum); _assert_(adjointx_input); 1956 1971 Input2* adjointy_input = basalelement->GetInput2(AdjointyEnum); _assert_(adjointy_input); 1957 Input2* dragcoeff_input = basalelement->GetInput2(FrictionCoefficientEnum); _assert_(dragcoeff_input); 1972 1973 /* get the friction law: 1- Budd, 11-Schoof*/ 1974 element->FindParam(&frictionlaw, FrictionLawEnum); 1975 Input2* dragcoeff_input; 1976 switch(frictionlaw) { 1977 case 1: 1978 dragcoeff_input = basalelement->GetInput2(FrictionCoefficientEnum); _assert_(dragcoeff_input); 1979 break; 1980 case 11: 1981 dragcoeff_input = basalelement->GetInput2(FrictionCEnum); _assert_(dragcoeff_input); 1982 break; 1983 default: 1984 _error_("Friction law "<< frictionlaw <<" not supported in the inversion."); 1985 } 1958 1986 1959 1987 /* Start looping on the number of gaussian points: */ -
issm/trunk-jpl/src/c/classes/Loads/Friction.cpp
r24669 r25201 52 52 GetAlphaTempComplement(palpha_complement,gauss); 53 53 break; 54 case 11: 55 GetAlphaSchoofComplement(palpha_complement,gauss); 56 break; 54 57 default: 55 58 _error_("not supported"); … … 162 165 } 163 166 /*}}}*/ 167 void Friction::GetAlphaSchoofComplement(IssmDouble* palpha_complement, Gauss* gauss){/*{{{*/ 168 169 /* Compute the complement of Schoof's law for inversion 170 * d alpha2 171 * -------- = |u_b|^(m-1) *(1+ (C/(Cmax N))^(1/m)|u_b|)^(-m-1) 172 * dC 173 */ 174 /*diverse: */ 175 IssmDouble m,Cmax; 176 IssmDouble C, coeff; 177 IssmDouble alpha_complement; 178 179 /*Recover parameters: */ 180 element->GetInputValue(&m,gauss,FrictionMEnum); 181 element->GetInputValue(&Cmax,gauss,FrictionCmaxEnum); 182 element->GetInputValue(&coeff, gauss,FrictionCEnum); 183 184 C = coeff*coeff; 185 /*Get effective pressure*/ 186 IssmDouble Neff = EffectivePressure(gauss); 187 IssmDouble vmag = VelMag(gauss); 188 189 /*Check to prevent dividing by zero if vmag==0*/ 190 if((vmag==0.) || (Neff == 0.)) { 191 alpha_complement=0.; 192 } 193 else { 194 alpha_complement= pow(vmag, m-1.)*pow((1 + pow(C/(Cmax*Neff),1./m)*vmag), -m-1.); 195 } 196 /*Assign output pointers:*/ 197 *palpha_complement=alpha_complement; 198 }/*}}}*/ 164 199 void Friction::GetAlpha2(IssmDouble* palpha2, Gauss* gauss){/*{{{*/ 165 200 … … 619 654 620 655 /*diverse: */ 621 IssmDouble C, Cmax,m,alpha2;656 IssmDouble C,coeff,Cmax,m,alpha2; 622 657 623 658 /*Recover parameters: */ 624 659 element->GetInputValue(&Cmax,gauss,FrictionCmaxEnum); 625 element->GetInputValue(& C,gauss,FrictionCEnum);660 element->GetInputValue(&coeff,gauss,FrictionCEnum); 626 661 element->GetInputValue(&m,gauss,FrictionMEnum); 662 663 /* scale C for a better inversion */ 664 C = coeff*coeff; 627 665 628 666 /*Get effective pressure and velocity magnitude*/ -
issm/trunk-jpl/src/c/classes/Loads/Friction.h
r23959 r25201 28 28 void GetAlphaTempComplement(IssmDouble* alpha_complement,Gauss* gauss); 29 29 void GetAlphaViscousComplement(IssmDouble* alpha_complement,Gauss* gauss); 30 void GetAlphaSchoofComplement(IssmDouble* alpha_complement,Gauss* gauss); 30 31 void GetAlpha2(IssmDouble* palpha2,Gauss* gauss); 31 32 void GetAlpha2Coulomb(IssmDouble* palpha2,Gauss* gauss); -
issm/trunk-jpl/src/c/modules/DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.cpp
r24335 r25201 33 33 34 34 int domaintype,numcomponents; 35 int frictionlaw; 35 36 IssmDouble Jelem=0.; 36 37 IssmDouble misfit,Jdet; … … 61 62 /*Retrieve all inputs we will be needing: */ 62 63 DatasetInput2* weights_input=basalelement->GetDatasetInput2(InversionCostFunctionsCoefficientsEnum); _assert_(weights_input); 63 Input2* drag_input =basalelement->GetInput2(FrictionCoefficientEnum); _assert_(drag_input); 64 65 /* get the friction law: if 11-Schoof, which has a different name of C */ 66 element->FindParam(&frictionlaw, FrictionLawEnum); 67 Input2* drag_input; 68 switch(frictionlaw) { 69 case 11: 70 drag_input = basalelement->GetInput2(FrictionCEnum); _assert_(drag_input); 71 break; 72 default: 73 drag_input = basalelement->GetInput2(FrictionCoefficientEnum); _assert_(drag_input); 74 } 64 75 65 76 /* Start looping on the number of gaussian points: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp
r24335 r25201 122 122 case ThicknessEnum: iomodel->FetchData(&independent,&M,&N,"md.geometry.thickness"); break; 123 123 case FrictionCoefficientEnum: iomodel->FetchData(&independent,&M,&N,"md.friction.coefficient"); break; 124 case FrictionCEnum: iomodel->FetchData(&independent,&M,&N,"md.friction.C"); break; 124 125 case FrictionAsEnum: iomodel->FetchData(&independent,&M,&N,"md.friction.As"); break; 125 126 case BalancethicknessApparentMassbalanceEnum: iomodel->FetchData(&independent,&M,&N,"md.balancethickness.apparent_massbalance"); break; … … 160 161 case ThicknessEnum: iomodel->DeleteData(1,"md.geometry.thickness"); break; 161 162 case FrictionCoefficientEnum: iomodel->DeleteData(1,"md.friction.coefficient"); break; 163 case FrictionCEnum: iomodel->DeleteData(1,"md.friction.C"); break; 162 164 case FrictionAsEnum: iomodel->DeleteData(1,"md.friction.As"); break; 163 165 case BalancethicknessApparentMassbalanceEnum: iomodel->DeleteData(1,"md.balancethickness.apparent_massbalance"); break; -
issm/trunk-jpl/src/m/inversions/supportedcontrols.m
r23108 r25201 4 4 'BalancethicknessThickeningRate',... 5 5 'FrictionCoefficient',... 6 'FrictionC',... 6 7 'FrictionAs',... 7 8 'MaterialsRheologyBbar',... -
issm/trunk-jpl/test/NightlyRun/test481.m
r24671 r25201 7 7 md.transient.isthermal = 0; 8 8 md.friction=frictionschoof(md.friction); 9 md.friction.C = 20.e4*ones(md.mesh.numberofvertices,1);9 md.friction.C = (20.e4)^0.5*ones(md.mesh.numberofvertices,1); 10 10 md.friction.Cmax = 0.5*ones(md.mesh.numberofvertices,1); 11 11 md.friction.m = 1./3.*ones(md.mesh.numberofelements,1);
Note:
See TracChangeset
for help on using the changeset viewer.