Changeset 18715
- Timestamp:
- 10/30/14 15:05:10 (10 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/AdjointBalancethickness2Analysis.cpp
r18604 r18715 149 149 150 150 /*Intermediaries*/ 151 IssmDouble dlambda[2],ds[2],D0, Jdet;151 IssmDouble dlambda[2],ds[2],D0,omega,Jdet; 152 152 IssmDouble *xyz_list= NULL; 153 153 … … 166 166 Input* s_input = element->GetInput(SurfaceEnum); _assert_(s_input); 167 167 Input* D0_input = element->GetInput(BalancethicknessD0Enum); _assert_(D0_input); 168 Input* omega_input = element->GetInput(BalancethicknessOmegaEnum); _assert_(omega_input); 168 169 169 170 Gauss* gauss=element->NewGauss(2); … … 175 176 176 177 D0_input->GetInputValue(&D0,gauss); 178 omega_input->GetInputValue(&omega,gauss); 177 179 adjoint_input->GetInputDerivativeValue(&dlambda[0],xyz_list,gauss); 178 180 s_input->GetInputDerivativeValue(&ds[0],xyz_list,gauss); … … 180 182 /*Build gradient vector (actually -dJ/da): */ 181 183 for(int i=0;i<numvertices;i++){ 182 ge[i]+= -Jdet*gauss->weight*basis[i]* D0*(ds[0]*dlambda[0] + ds[1]*dlambda[1]);184 ge[i]+= -Jdet*gauss->weight*basis[i]*exp(omega)*D0*(ds[0]*dlambda[0] + ds[1]*dlambda[1]); 183 185 _assert_(!xIsNan<IssmDouble>(ge[i])); 184 186 } -
issm/trunk-jpl/src/c/analyses/Balancethickness2Analysis.cpp
r18650 r18715 98 98 for(int i=0;i<numnodes;i++){ 99 99 for(int j=0;j<numnodes;j++){ 100 Ke->values[i*numnodes+j] += D0* omega*gauss->weight*Jdet*(dbasis[0*numnodes+i]*dbasis[0*numnodes+j] + dbasis[1*numnodes+i]*dbasis[1*numnodes+j]);100 Ke->values[i*numnodes+j] += D0*exp(omega)*gauss->weight*Jdet*(dbasis[0*numnodes+i]*dbasis[0*numnodes+j] + dbasis[1*numnodes+i]*dbasis[1*numnodes+j]); 101 101 } 102 102 } -
issm/trunk-jpl/src/c/classes/FemModel.cpp
r18675 r18715 483 483 484 484 case Balancethickness2SolutionEnum: 485 analyses_temp[numanalyses++]=L2ProjectionBaseAnalysisEnum; 485 486 analyses_temp[numanalyses++]=SmoothAnalysisEnum; 486 487 analyses_temp[numanalyses++]=Balancethickness2AnalysisEnum; -
issm/trunk-jpl/src/c/cores/balancethickness2_core.cpp
r18608 r18715 14 14 /*parameters: */ 15 15 bool save_results; 16 IssmDouble l = 8.;16 IssmDouble l = 3.; 17 17 18 18 /*recover parameters: */ … … 20 20 21 21 if(VerboseSolution()) _printf0_("computing smooth surface slopes:\n"); 22 femmodel->parameters->SetParam(l,SmoothThicknessMultiplierEnum); 23 femmodel->SetCurrentConfiguration(SmoothAnalysisEnum); 24 femmodel->parameters->SetParam(SurfaceSlopeXEnum,InputToSmoothEnum); 25 solutionsequence_linear(femmodel); 26 femmodel->parameters->SetParam(SurfaceSlopeYEnum,InputToSmoothEnum); 27 solutionsequence_linear(femmodel); 22 //femmodel->parameters->SetParam(l,SmoothThicknessMultiplierEnum); 23 //femmodel->SetCurrentConfiguration(SmoothAnalysisEnum); 24 //femmodel->parameters->SetParam(SurfaceSlopeXEnum,InputToSmoothEnum); 25 //solutionsequence_linear(femmodel); 26 //femmodel->parameters->SetParam(SurfaceSlopeYEnum,InputToSmoothEnum); 27 //solutionsequence_linear(femmodel); 28 surfaceslope_core(femmodel); 28 29 29 30 if(VerboseSolution()) _printf0_("call computational core:\n");
Note:
See TracChangeset
for help on using the changeset viewer.