From a1a04ecf4c752e47c2ba485e33dd915b5c7286d6 Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Sat, 18 Jan 2025 12:32:09 -0800 Subject: [PATCH] Adjust linop maxorder for hypre and petsc tests --- Tests/LinearSolvers/CellEB/MyTest.cpp | 7 +++++++ Tests/LinearSolvers/CellEB2/MyTest.cpp | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/Tests/LinearSolvers/CellEB/MyTest.cpp b/Tests/LinearSolvers/CellEB/MyTest.cpp index b895c09c986..c4bf86d18a4 100644 --- a/Tests/LinearSolvers/CellEB/MyTest.cpp +++ b/Tests/LinearSolvers/CellEB/MyTest.cpp @@ -51,6 +51,13 @@ MyTest::solve () info.setMaxCoarseningLevel(max_coarsening_level); MLEBABecLap mleb (geom, grids, dmap, info, amrex::GetVecOfConstPtrs(factory)); + if (use_hypre || use_petsc) { + if (factory[0]->isAllRegular()) { + linop_maxorder = std::min(3,linop_maxorder); + } else { + linop_maxorder = 2; + } + } mleb.setMaxOrder(linop_maxorder); mleb.setDomainBC(mlmg_lobc, mlmg_hibc); diff --git a/Tests/LinearSolvers/CellEB2/MyTest.cpp b/Tests/LinearSolvers/CellEB2/MyTest.cpp index 4f9701b11d7..8b9bb19d38b 100644 --- a/Tests/LinearSolvers/CellEB2/MyTest.cpp +++ b/Tests/LinearSolvers/CellEB2/MyTest.cpp @@ -28,6 +28,14 @@ MyTest::MyTest () void MyTest::solve () { + if (use_hypre || use_petsc) { + if (factory[0]->isAllRegular()) { + linop_maxorder = std::min(3,linop_maxorder); + } else { + linop_maxorder = 2; + } + } + if (verbose > 0) { for (int ilev = 0; ilev <= max_level; ++ilev) { const MultiFab& vfrc = factory[ilev]->getVolFrac();