Changeset 27294
- Timestamp:
- 10/05/22 08:54:44 (2 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/Elements
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r27287 r27294 3901 3901 3902 3902 /*intermediary: */ 3903 bool ishydro; 3903 3904 IssmDouble C; 3904 3905 IssmDouble xyz_list[NUMVERTICES][3]; … … 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: */ … … 3939 3941 /*CFL criterion: */ 3940 3942 IssmDouble dt = C/(maxabsvx/dx+maxabsvy/dy+maxabsvz/dz + 1.e-18); 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 } 3941 3957 3942 3958 return dt; -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r27287 r27294 5253 5253 5254 5254 /*intermediary: */ 5255 bool ishydro; 5255 5256 IssmDouble C; 5256 5257 IssmDouble xyz_list[NUMVERTICES][3]; … … 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: */ … … 5284 5286 /*CFL criterion: */ 5285 5287 IssmDouble dt = C/(maxabsvx/dx+maxabsvy/dy + 1.e-18); 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 } 5286 5300 5287 5301 return dt;
Note:
See TracChangeset
for help on using the changeset viewer.