fixed: avoid deprecated function for newer PETSc versions

This commit is contained in:
Arne Morten Kvarving
2018-11-23 12:16:33 +01:00
parent 59ad507d3a
commit 6c28cfc27c

View File

@@ -245,7 +245,11 @@ void PETScSolParams::setupCoarseSolver(PC& pc, const std::string& prefix, const
PCMGGetCoarseSolve(pc,&cksp);
KSPGetPC(cksp,&cpc);
PCSetType(cpc,PCLU);
#if PETSC_VERSION_MINOR >= 9
PCFactorSetMatSolverType(cpc,coarsePackage.c_str());
#else
PCFactorSetMatSolverPackage(cpc,coarsePackage.c_str());
#endif
PCSetUp(cpc);
}
}