Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the cfl_violation parameter #2522

Merged
merged 3 commits into from
Jul 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Source/driver/Castro.H
Original file line number Diff line number Diff line change
Expand Up @@ -1337,11 +1337,6 @@ protected:
#endif


///
/// Did we trigger a CFL violation?
///
int cfl_violation;


///
/// State data to hold if we want to do a retry.
Expand Down
14 changes: 0 additions & 14 deletions Source/driver/Castro_advance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,6 @@ Castro::advance (Real time,
#endif //MHD
}

// Optionally kill the job at this point, if we've detected a violation.

if (cfl_violation == 1 && use_retry != 0) {
amrex::Abort("CFL is too high at this level; go back to a checkpoint and restart with lower CFL number, or set castro.use_retry = 1");
}

// If we didn't kill the job, reset the violation counter.

cfl_violation = 0;

// If the user requests, indicate that we want a regrid at the end of the step.

if (use_post_step_regrid == 1) {
Expand Down Expand Up @@ -137,10 +127,6 @@ Castro::initialize_do_advance (Real time, Real dt)

advance_status status {};

// Reset the CFL violation flag.

cfl_violation = 0;

#ifdef RADIATION
// make sure these are filled to avoid check/plot file errors:
if (do_radiation) {
Expand Down
6 changes: 0 additions & 6 deletions Source/driver/Castro_advance_ctu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,6 @@ Castro::subcycle_advance_ctu(const Real time, const Real dt, int amr_iteration,

sdc_iters = sdc_iters_old;

// If we have hit a CFL violation during this subcycle, we must abort.

if (cfl_violation && !use_retry) {
amrex::Abort("CFL is too high at this level; go back to a checkpoint and restart with lower CFL number, or set castro.use_retry = 1");
}

// If we're allowing for retries, check for that here.

if (use_retry) {
Expand Down
4 changes: 0 additions & 4 deletions Source/driver/Castro_advance_sdc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,6 @@ Castro::do_advance_sdc (Real time,
if (do_hydro) {
// Check for CFL violations.
check_for_cfl_violation(S_old, dt);

// If we detect one, return immediately.
if (cfl_violation)
return dt;
}

// construct the update for the current stage -- this fills
Expand Down
7 changes: 6 additions & 1 deletion Source/hydro/Castro_hydro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,10 @@ Castro::cons_to_prim_fourth(const Real time)
void
Castro::check_for_cfl_violation(const MultiFab& State, const Real dt)
{

BL_PROFILE("Castro::check_for_cfl_violation()");

int cfl_violation = 0;

auto dx = geom.CellSizeArray();

Real dtdx = dt / dx[0];
Expand Down Expand Up @@ -390,4 +391,8 @@ Castro::check_for_cfl_violation(const MultiFab& State, const Real dt)
cfl_violation = 1;
}

// If we detect a CFL violation, abort.
if (cfl_violation) {
amrex::Abort("CFL is too high at this level; go back to a checkpoint and restart with lower CFL number");
}
}
Loading