source:
issm/oecreview/Archive/27230-27343/ISSM-27293-27294.diff@
27344
Last change on this file since 27344 was 27344, checked in by , 2 years ago | |
---|---|
File size: 2.6 KB |
-
../trunk-jpl/src/c/classes/Elements/Penta.cpp
3900 3900 IssmDouble Penta::TimeAdapt(void){/*{{{*/ 3901 3901 3902 3902 /*intermediary: */ 3903 bool ishydro; 3903 3904 IssmDouble C; 3904 3905 IssmDouble xyz_list[NUMVERTICES][3]; 3905 3906 3906 3907 /*get CFL coefficient:*/ 3907 3908 this->parameters->FindParam(&C,TimesteppingCflCoefficientEnum); 3909 this->parameters->FindParam(&ishydro,TransientIshydrologyEnum); 3908 3910 3909 3911 /*Get for Vx and Vy, the max of abs value: */ 3910 3912 Input* vx_input = this->GetInput(VxEnum); _assert_(vx_input); … … 3939 3941 /*CFL criterion: */ 3940 3942 IssmDouble dt = C/(maxabsvx/dx+maxabsvy/dy+maxabsvz/dz + 1.e-18); 3941 3943 3944 /*Check hydro timestep also and take the minimum*/ 3945 if(ishydro){ 3946 if(IsOnBase()){ 3947 Input* vx_input = this->GetInput(HydrologyWaterVxEnum); _assert_(vx_input); 3948 Input* vy_input = this->GetInput(HydrologyWaterVyEnum); _assert_(vy_input); 3949 IssmDouble maxabsvx = vx_input->GetInputMaxAbs(); 3950 IssmDouble maxabsvy = vy_input->GetInputMaxAbs(); 3951 3952 /*CFL criterion: */ 3953 IssmDouble dt2 = C/(maxabsvx/dx+maxabsvy/dy + 1.e-18); 3954 if(dt2<dt) dt = dt2; 3955 } 3956 } 3957 3942 3958 return dt; 3943 3959 }/*}}}*/ 3944 3960 IssmDouble Penta::TotalCalvingFluxLevelset(bool scaled){/*{{{*/ -
../trunk-jpl/src/c/classes/Elements/Tria.cpp
5252 5252 IssmDouble Tria::TimeAdapt(void){/*{{{*/ 5253 5253 5254 5254 /*intermediary: */ 5255 bool ishydro; 5255 5256 IssmDouble C; 5256 5257 IssmDouble xyz_list[NUMVERTICES][3]; 5257 5258 5258 5259 /*get CFL coefficient:*/ 5259 5260 this->parameters->FindParam(&C,TimesteppingCflCoefficientEnum); 5261 this->parameters->FindParam(&ishydro,TransientIshydrologyEnum); 5260 5262 5261 5263 /*Get for Vx and Vy, the max of abs value: */ 5262 5264 Input* vx_input = this->GetInput(VxEnum); _assert_(vx_input); … … 5284 5286 /*CFL criterion: */ 5285 5287 IssmDouble dt = C/(maxabsvx/dx+maxabsvy/dy + 1.e-18); 5286 5288 5289 /*Check hydro timestep also and take the minimum*/ 5290 if(ishydro){ 5291 Input* vx_input = this->GetInput(HydrologyWaterVxEnum); _assert_(vx_input); 5292 Input* vy_input = this->GetInput(HydrologyWaterVyEnum); _assert_(vy_input); 5293 IssmDouble maxabsvx = vx_input->GetInputMaxAbs(); 5294 IssmDouble maxabsvy = vy_input->GetInputMaxAbs(); 5295 5296 /*CFL criterion: */ 5297 IssmDouble dt2 = C/(maxabsvx/dx+maxabsvy/dy + 1.e-18); 5298 if(dt2<dt) dt = dt2; 5299 } 5300 5287 5301 return dt; 5288 5302 } 5289 5303 /*}}}*/
Note:
See TracBrowser
for help on using the repository browser.