From f3514e408aaa05fc9cc14a3215dfcfbf61e5e7fe Mon Sep 17 00:00:00 2001 From: Ann Almgren Date: Wed, 2 Oct 2024 21:16:59 -0700 Subject: [PATCH] =?UTF-8?q?modify/remove=20the=20assertions=20about=20no?= =?UTF-8?q?=20hidden=20dimension=20since=20this=20cas=E2=80=A6=20(#4180)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …e is working in ERF ## Summary ## Additional background ## Checklist The proposed changes: - [ ] fix a bug or incorrect behavior in AMReX - [ ] add new capabilities to AMReX - [ ] changes answers in the test suite to more than roundoff level - [ ] are likely to significantly affect the results of downstream AMReX users - [ ] include documentation in the code and/or rst files, if appropriate --- Src/LinearSolvers/MLMG/AMReX_MLCellLinOp.H | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Src/LinearSolvers/MLMG/AMReX_MLCellLinOp.H b/Src/LinearSolvers/MLMG/AMReX_MLCellLinOp.H index f8b09789d4..b318b318eb 100644 --- a/Src/LinearSolvers/MLMG/AMReX_MLCellLinOp.H +++ b/Src/LinearSolvers/MLMG/AMReX_MLCellLinOp.H @@ -536,7 +536,11 @@ MLCellLinOpT::setLevelBC (int amrlev, const MF* a_levelbcdata, const MF* rob { if (this->needsCoarseDataForBC()) { - AMREX_ALWAYS_ASSERT(!this->hasHiddenDimension()); + // AMREX_ALWAYS_ASSERT(!this->hasHiddenDimension()); + if (this->hasHiddenDimension()) { + int hidden_dir = this->hiddenDirection(); + AMREX_ALWAYS_ASSERT(this->m_coarse_data_crse_ratio[hidden_dir] == 1); + } br_ref_ratio = this->m_coarse_data_crse_ratio.allGT(0) ? this->m_coarse_data_crse_ratio : IntVect(2); if (m_crse_sol_br[amrlev] == nullptr && br_ref_ratio.allGT(0)) { @@ -1946,8 +1950,6 @@ MLCellLinOpT::computeVolInv () const m_volinv[amrlev].resize(this->NMGLevels(amrlev)); } - AMREX_ASSERT(this->m_coarse_fine_bc_type == LinOpBCType::Dirichlet || ! this->hasHiddenDimension()); - // We don't need to compute for every level auto f = [&] (int amrlev, int mglev) {