Index: ../trunk-jpl/src/c/classes/Elements/Penta.cpp =================================================================== --- ../trunk-jpl/src/c/classes/Elements/Penta.cpp (revision 27293) +++ ../trunk-jpl/src/c/classes/Elements/Penta.cpp (revision 27294) @@ -3900,11 +3900,13 @@ IssmDouble Penta::TimeAdapt(void){/*{{{*/ /*intermediary: */ + bool ishydro; IssmDouble C; IssmDouble xyz_list[NUMVERTICES][3]; /*get CFL coefficient:*/ this->parameters->FindParam(&C,TimesteppingCflCoefficientEnum); + this->parameters->FindParam(&ishydro,TransientIshydrologyEnum); /*Get for Vx and Vy, the max of abs value: */ Input* vx_input = this->GetInput(VxEnum); _assert_(vx_input); @@ -3939,6 +3941,20 @@ /*CFL criterion: */ IssmDouble dt = C/(maxabsvx/dx+maxabsvy/dy+maxabsvz/dz + 1.e-18); + /*Check hydro timestep also and take the minimum*/ + if(ishydro){ + if(IsOnBase()){ + Input* vx_input = this->GetInput(HydrologyWaterVxEnum); _assert_(vx_input); + Input* vy_input = this->GetInput(HydrologyWaterVyEnum); _assert_(vy_input); + IssmDouble maxabsvx = vx_input->GetInputMaxAbs(); + IssmDouble maxabsvy = vy_input->GetInputMaxAbs(); + + /*CFL criterion: */ + IssmDouble dt2 = C/(maxabsvx/dx+maxabsvy/dy + 1.e-18); + if(dt2