Skip to content

Commit

Permalink
re adding all bug fixes, since reverting to last successful integrate…
Browse files Browse the repository at this point in the history
…d test did not make the integrated tests pass
  • Loading branch information
Peter La Follette authored and Peter La Follette committed Apr 23, 2024
1 parent fc76647 commit b310d18
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/lgar.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2440,6 +2440,17 @@ extern void lgar_dzdt_calc(bool use_closed_form_G, int nint, double h_p, int *so
dzdt = 0.0;
}

if ((dzdt == 0.0) && (current->to_bottom==FALSE)){
//in lgar_move, we have: "if (current->dzdt_cm_per_h == 0.0 && current->to_bottom == FALSE) { // a new front was just created, so don't update it."
//the issue here is that when theta approaches theta_r, then dzdt can in some cases numerically evaluate to 0, even if the wetting front has to_bottom==FALSE.
//so, there are cases where a WF should be moving very slowly, but not being completely still.
dzdt = 1e-9;
}

if (dzdt>1e4){//insanity check
dzdt = 1e4;
}

current->dzdt_cm_per_h = dzdt;

current = current->next; // point to the next link
Expand Down

0 comments on commit b310d18

Please sign in to comment.