fixed: set the package in petsc pc blocks

This commit is contained in:
Arne Morten Kvarving 2021-01-27 13:45:56 +01:00
parent dc2c682e25
commit e7bb2bb509

View File

@ -75,6 +75,16 @@ void PETScSolParams::setupPC(PC& pc,
else if (prec == "ilu")
PCFactorSetLevels(pc,params.getBlock(block).getIntValue("ilu_fill_level"));
std::string package = params.getBlock(block).getStringValue("package");
if (!package.empty()) {
#if PETSC_VERSION_MINOR >= 9
PCFactorSetMatSolverType(pc, package.c_str());
#else
PCFactorSetMatSolverPackage(pc, package.c_str());
#endif
}
PCSetFromOptions(pc);
PCSetUp(pc);