fixed: set the package in petsc pc blocks
This commit is contained in:
parent
dc2c682e25
commit
e7bb2bb509
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user