Skip to content

Commit

Permalink
fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
zhichen3 committed Oct 7, 2024
1 parent f352634 commit 89325c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/driver/Castro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,12 @@ Castro::read_params ()
#elif (AMREX_SPACEDIM == 2)
if ( dgeom.IsSPHERICAL() )
{
if ( (dgeom.ProbLo(1) >= 0.0_rt) && (dgeom.ProbHi(1) <= 3.14159265359_rt) )
if ( (dgeom.ProbLo(1) < 0.0_rt) && (dgeom.ProbHi(1) > 3.14159265359_rt) )
{
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) )
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");
}
Expand Down

0 comments on commit 89325c3

Please sign in to comment.