From 57b6ab1946ad429d8db3bbf250d13bbda5819be9 Mon Sep 17 00:00:00 2001 From: cgilet Date: Fri, 29 May 2026 13:45:41 -0400 Subject: [PATCH] Allow delp or pressure inflow/outflow with orthogonal gravity. --- src/setup/set_background_pressure.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/setup/set_background_pressure.cpp b/src/setup/set_background_pressure.cpp index e80218c59..cee653a73 100644 --- a/src/setup/set_background_pressure.cpp +++ b/src/setup/set_background_pressure.cpp @@ -24,7 +24,7 @@ void incflo::set_background_pressure () delp_dir = dir; m_gp0[dir] = -m_delp[dir] / problen[dir]; } else { - amrex::Abort("set_background_pressure: how did this happen?"); + amrex::Abort("set_background_pressure: only one dimension can have delp"); } } } @@ -40,7 +40,7 @@ void incflo::set_background_pressure () m_gp0[dir] = (m_bc_pressure[Orientation(dir,Orientation::high)] - m_bc_pressure[Orientation(dir,Orientation::low)]) / problen[dir]; } else { - amrex::Abort("set_background_pressure: how did this happen?"); + amrex::Abort("set_background_pressure: only one dimension can be pressure inflow/outflow"); } } } @@ -51,8 +51,10 @@ void incflo::set_background_pressure () if (delp_dir == -1) { delp_dir = dir; m_gp0[dir] = dpdx; + } else if (delp_dir != dir) { + m_gp0[dir] = dpdx; } else { - amrex::Abort("set_background_pressure: how did this happen?"); + amrex::Abort("set_background_pressure: check gravity"); } } }