Skip to content

Commit

Permalink
Protect against use_post_step_regrid when not subcycling
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpkatz committed Oct 17, 2023
1 parent 466e5a5 commit a67d06c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Source/driver/Castro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ Castro::read_params ()
initialize_cpp_runparams();

ParmParse pp("castro");
ParmParse ppa("amr");

using namespace castro;

Expand Down Expand Up @@ -441,6 +442,13 @@ Castro::read_params ()
}
}

// Post-timestep regrids only make sense if we're subcycling.
std::string subcycling_mode;
ppa.query("subcycling_mode", subcycling_mode);
if (use_post_step_regrid == 1 && subcycling_mode == "None") {
amrex::Error("castro.use_post_step_regrid == 1 is not consistent with amr.subcycling_mode = None.");
}

#ifdef AMREX_PARTICLES
read_particle_params();
#endif
Expand Down Expand Up @@ -545,7 +553,6 @@ Castro::read_params ()

}

ParmParse ppa("amr");
ppa.query("probin_file",probin_file);

Vector<int> tilesize(AMREX_SPACEDIM);
Expand Down

0 comments on commit a67d06c

Please sign in to comment.