Skip to content

Commit c9c24ab

Browse files
committed
Add check for suitable phiSolver in non-Boussinsq case
phiSolver must support 3D coefficients (i.e. multigrid or naulin).
1 parent 5046339 commit c9c24ab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/hermes-2.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,11 @@ int Hermes::init(bool restarting) {
907907
// Set coefficients for Boussinesq solve
908908
if (boussinesq) {
909909
phiSolver->setCoefC(1. / SQ(coord->Bxy));
910+
} else {
911+
if (not phiSolver.uses3DCoefs()) {
912+
throw BoutException("Non-Boussinesq solve requires phiSolver to support 3D "
913+
"coefficients.")
914+
}
910915
}
911916
}
912917
}

0 commit comments

Comments
 (0)