Skip to content

Commit

Permalink
Adjust linop maxorder for hypre and petsc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Jan 18, 2025
1 parent 7250bdf commit a1a04ec
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Tests/LinearSolvers/CellEB/MyTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 8 additions & 0 deletions Tests/LinearSolvers/CellEB2/MyTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit a1a04ec

Please sign in to comment.