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
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
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) > M_PI) )
{
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
7 changes: 0 additions & 7 deletions Source/gravity/Gravity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,6 @@ Gravity::read_params ()
amrex::Abort("Options are ConstantGrav, PoissonGrav, or MonopoleGrav");
}

if ( gravity::gravity_type == "ConstantGrav")
{
if ( dgeom.IsSPHERICAL() ) {
amrex::Abort("Can't use constant direction gravity with non-Cartesian coordinates");
}
}

#if (AMREX_SPACEDIM == 1)
if (gravity::gravity_type == "PoissonGrav")
{
Expand Down