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

Protect against use_post_step_regrid when not subcycling #2639

Merged
Merged
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
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