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 2d spherical geometry abort and add some asserts for 2d spherical geometry setup. #2973

Merged
merged 5 commits into from
Oct 7, 2024
Merged
Changes from 3 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
10 changes: 9 additions & 1 deletion Source/driver/Castro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,15 @@ Castro::read_params ()
#elif (AMREX_SPACEDIM == 2)
if ( dgeom.IsSPHERICAL() )
{
amrex::Abort("We don't support spherical coordinate systems in 2D");
if ( (dgeom.ProbLo(1) < 0.0_rt) && (dgeom.ProbHi(1) > 3.14159265359_rt) )
{
zingale marked this conversation as resolved.
Show resolved Hide resolved
amrex::Abort("Theta must be within [0, Pi] for spherical coordinate system in 2D");
}

if ( dgeom.ProbLo(0) < static_cast<Real>(NUM_GROW) * dgeom.CellSize(0) )
{
amrex::Abort("R-min must be large enough so ghost cells doesn't extend to negative R");
}
}
#elif (AMREX_SPACEDIM == 3)
if ( dgeom.IsRZ() )
Expand Down
Loading