38{
40 {
41
43
46
47
51
52
53
54 LibmeshPetscCallA(
57
58
59
64 NULL));
65
66
68
69 LibmeshPetscCallA(
71 EPSMonitorSet(
73 }
74
75
76
79 const char * prefix = nullptr;
80 LibmeshPetscCallA(comm, EPSGetOptionsPrefix(eps, &prefix));
81 PetscBool bv_type_set = PETSC_FALSE;
82 LibmeshPetscCallA(comm, PetscOptionsHasName(nullptr, prefix, "-bv_type", &bv_type_set));
83 if (!bv_type_set)
84 {
85 const auto & solution =
87 PetscBool is_kokkos = PETSC_FALSE;
88 LibmeshPetscCallA(comm,
89 PetscObjectTypeCompareAny(
90 (PetscObject)solution.vec(), &is_kokkos, VECSEQKOKKOS, VECMPIKOKKOS, ""));
91 if (is_kokkos)
92 {
93 BV bv;
94 LibmeshPetscCallA(comm, EPSGetBV(eps, &bv));
95 LibmeshPetscCallA(comm, BVSetType(bv, BVVECS));
96 }
97 }
98}
bool isNonlinearEigenvalueSolver(unsigned int eigen_sys_num) const
virtual void initPetscOutputAndSomeSolverSettings() override
Hook up monitors for SNES and KSP.
SolverParams & solverParams(unsigned int solver_sys_num=0)
Get the solver parameters.
bool _customized_pc_for_eigen
unsigned int number() const
Gets the number of this system.
NumericVector< Number > & solution()
const Parallel::Communicator & comm() const
PetscErrorCode mooseSlepcEPSSNESKSPSetPCSide(FEProblemBase &problem, EPS eps)
Allow users to specify PC side.
PetscErrorCode mooseSlepcEPSSNESSetCustomizePC(EPS eps)
Attach a customized PC.
PetscErrorCode mooseSlepcEPSSNESSetUpOptionPrefix(EPS eps)
Get rid of prefix "-eps_power" for SNES, KSP, PC, etc.
PetscErrorCode mooseSlepcEPSMonitor(EPS eps, PetscInt its, PetscInt nconv, PetscScalar *eigr, PetscScalar *eigi, PetscReal *errest, PetscInt nest, void *mctx)
A customized solver monitor to print out eigenvalue.
PetscErrorCode mooseSlepcStoppingTest(EPS eps, PetscInt its, PetscInt max_it, PetscInt nconv, PetscInt nev, EPSConvergedReason *reason, void *ctx)
A customized convergence checker.
int eps(unsigned int i, unsigned int j)
2D version