Functions | |
InputParameters | getSlepcValidParams (InputParameters ¶ms) |
InputParameters | getSlepcEigenProblemValidParams () |
Retrieve valid params that allow users to specify eigen problem configuration. More... | |
void | storeSolveType (FEProblemBase &fe_problem, const InputParameters ¶ms) |
Set solve type into eigen problem (solverParams) More... | |
void | setEigenProblemSolverParams (EigenProblem &eigen_problem, const InputParameters ¶ms) |
Retrieve eigen problem params from 'params', and then set these params into SolverParams. More... | |
void | slepcSetOptions (EigenProblem &eigen_problem, const InputParameters ¶ms) |
Push all SLEPc/PETSc options into SLEPc/PETSc side. More... | |
void | setSlepcEigenSolverTolerances (EigenProblem &eigen_problem, const InputParameters ¶ms) |
Control eigen solver tolerances via SLEPc options. More... | |
void | setFreeNonlinearPowerIterations (unsigned int free_power_iterations) |
Set SLEPc/PETSc options to trigger free power iteration. More... | |
void | clearFreeNonlinearPowerIterations (const InputParameters ¶ms) |
void | moosePetscSNESFormMatrixTag (SNES snes, Vec x, Mat mat, void *ctx, TagID tag) |
Form matrix according to tag. More... | |
void | moosePetscSNESFormMatricesTags (SNES snes, Vec x, std::vector< Mat > &mats, void *ctx, const std::set< TagID > &tags) |
Form multiple matrices for multiple tags. More... | |
PetscErrorCode | mooseSlepcEigenFormJacobianA (SNES snes, Vec x, Mat jac, Mat pc, void *ctx) |
Form Jacobian matrix A. More... | |
PetscErrorCode | mooseSlepcEigenFormJacobianB (SNES snes, Vec x, Mat jac, Mat pc, void *ctx) |
Form Jacobian matrix B. More... | |
PetscErrorCode | mooseSlepcEigenFormFunctionA (SNES snes, Vec x, Vec r, void *ctx) |
Form function residual Ax. More... | |
PetscErrorCode | mooseSlepcEigenFormFunctionB (SNES snes, Vec x, Vec r, void *ctx) |
Form function residual Bx. More... | |
PetscErrorCode | mooseSlepcEigenFormFunctionAB (SNES snes, Vec x, Vec Ax, Vec Bx, void *ctx) |
Form function residual Ax-Bx. More... | |
PetscErrorCode | mooseSlepcStoppingTest (EPS eps, PetscInt its, PetscInt max_it, PetscInt nconv, PetscInt nev, EPSConvergedReason *reason, void *ctx) |
A customized convergence checker. More... | |
PetscErrorCode | mooseSlepcEPSGetSNES (EPS eps, SNES *snes) |
Retrieve SNES from EPS. More... | |
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. More... | |
PetscErrorCode | mooseSlepcEPSSNESSetUpOptionPrefix (EPS eps) |
Get rid of prefix "-eps_power" for SNES, KSP, PC, etc. More... | |
PetscErrorCode | mooseSlepcEPSSNESSetCustomizePC (EPS eps) |
Attach a customized PC. More... | |
PetscErrorCode | mooseSlepcEPSSNESKSPSetPCSide (FEProblemBase &problem, EPS eps) |
Allow users to specify PC side. More... | |
void | attachCallbacksToMat (EigenProblem &eigen_problem, Mat mat, bool eigen) |
Attach call backs to mat. More... | |
PetscErrorCode | mooseMatMult_Eigen (Mat mat, Vec x, Vec y) |
Implement MatMult via function evaluation for Bx. More... | |
PetscErrorCode | mooseMatMult_NonEigen (Mat mat, Vec x, Vec y) |
Implement MatMult via function evaluation for Ax. More... | |
void | setOperationsForShellMat (EigenProblem &eigen_problem, Mat mat, bool eigen) |
Set operations to shell mat. More... | |
PETSC_EXTERN PetscErrorCode | PCCreate_MoosePC (PC pc) |
Create a preconditioner from moose side. More... | |
PETSC_EXTERN PetscErrorCode | registerPCToPETSc () |
Let PETSc know there is a preconditioner. More... | |
PetscErrorCode | PCDestroy_MoosePC (PC pc) |
Destroy preconditioner. More... | |
PetscErrorCode | PCView_MoosePC (PC pc, PetscViewer viewer) |
View preconditioner. More... | |
PetscErrorCode | PCApply_MoosePC (PC pc, Vec x, Vec y) |
Preconditioner application. More... | |
PetscErrorCode | PCSetUp_MoosePC (PC pc) |
Setup preconditioner. More... | |
PetscErrorCode | mooseSlepcEigenFormFunctionMFFD (void *ctx, Vec x, Vec r) |
Function call for MFFD. More... | |
void | setEigenProblemOptions (SolverParams &solver_params) |
void | setWhichEigenPairsOptions (SolverParams &solver_params) |
void | setNewtonPetscOptions (SolverParams &solver_params, const InputParameters ¶ms) |
void | setNonlinearPowerOptions (SolverParams &solver_params) |
void | setEigenSolverOptions (SolverParams &solver_params, const InputParameters ¶ms) |
PetscErrorCode | mooseEPSFormMatrices (EigenProblem &eigen_problem, EPS eps, Vec x, void *ctx) |
void | moosePetscSNESFormFunction (SNES, Vec x, Vec r, void *ctx, TagID tag) |
PetscErrorCode | mooseSlepcEigenFormNorm (SNES, Vec, PetscReal *norm, void *ctx) |
void | mooseMatMult (EigenProblem &eigen_problem, Vec x, Vec r, TagID tag) |
Variables | |
const int | subspace_factor = 2 |
void Moose::SlepcSupport::attachCallbacksToMat | ( | EigenProblem & | eigen_problem, |
Mat | mat, | ||
bool | eigen | ||
) |
Attach call backs to mat.
SLEPc solver will retrieve callbacks we attached here
Definition at line 982 of file SlepcSupport.C.
Referenced by NonlinearEigenSystem::attachSLEPcCallbacks().
void Moose::SlepcSupport::clearFreeNonlinearPowerIterations | ( | const InputParameters & | params | ) |
Definition at line 365 of file SlepcSupport.C.
Referenced by EigenProblem::doFreeNonlinearPowerIterations().
InputParameters Moose::SlepcSupport::getSlepcEigenProblemValidParams | ( | ) |
Retrieve valid params that allow users to specify eigen problem configuration.
Definition at line 66 of file SlepcSupport.C.
Referenced by Eigenvalue::validParams().
InputParameters Moose::SlepcSupport::getSlepcValidParams | ( | InputParameters & | params | ) |
The output of this function should be added to the the parameters object of the overarching class
Definition at line 37 of file SlepcSupport.C.
Referenced by Eigenvalue::validParams().
PetscErrorCode Moose::SlepcSupport::mooseEPSFormMatrices | ( | EigenProblem & | eigen_problem, |
EPS | eps, | ||
Vec | x, | ||
void * | ctx | ||
) |
Definition at line 514 of file SlepcSupport.C.
Referenced by mooseSlepcEigenFormFunctionA(), mooseSlepcEigenFormFunctionAB(), mooseSlepcEigenFormFunctionB(), and mooseSlepcEigenFormJacobianA().
void Moose::SlepcSupport::mooseMatMult | ( | EigenProblem & | eigen_problem, |
Vec | x, | ||
Vec | r, | ||
TagID | tag | ||
) |
Definition at line 1030 of file SlepcSupport.C.
Referenced by mooseMatMult_Eigen(), and mooseMatMult_NonEigen().
PetscErrorCode Moose::SlepcSupport::mooseMatMult_Eigen | ( | Mat | mat, |
Vec | x, | ||
Vec | y | ||
) |
Implement MatMult via function evaluation for Bx.
Definition at line 1055 of file SlepcSupport.C.
Referenced by setOperationsForShellMat().
PetscErrorCode Moose::SlepcSupport::mooseMatMult_NonEigen | ( | Mat | mat, |
Vec | x, | ||
Vec | y | ||
) |
Implement MatMult via function evaluation for Ax.
Definition at line 1076 of file SlepcSupport.C.
Referenced by setOperationsForShellMat().
Definition at line 794 of file SlepcSupport.C.
Referenced by mooseSlepcEigenFormFunctionA(), and mooseSlepcEigenFormFunctionB().
void Moose::SlepcSupport::moosePetscSNESFormMatricesTags | ( | SNES | snes, |
Vec | x, | ||
std::vector< Mat > & | mats, | ||
void * | ctx, | ||
const std::set< TagID > & | tags | ||
) |
Form multiple matrices for multiple tags.
Definition at line 589 of file SlepcSupport.C.
Referenced by mooseEPSFormMatrices(), and mooseSlepcEigenFormJacobianA().
void Moose::SlepcSupport::moosePetscSNESFormMatrixTag | ( | SNES | snes, |
Vec | x, | ||
Mat | mat, | ||
void * | ctx, | ||
TagID | tag | ||
) |
Form matrix according to tag.
Definition at line 559 of file SlepcSupport.C.
Referenced by mooseSlepcEigenFormJacobianA(), and mooseSlepcEigenFormJacobianB().
PetscErrorCode Moose::SlepcSupport::mooseSlepcEigenFormFunctionA | ( | SNES | snes, |
Vec | x, | ||
Vec | r, | ||
void * | ctx | ||
) |
Form function residual Ax.
It is a SLEPc callback
Definition at line 820 of file SlepcSupport.C.
Referenced by attachCallbacksToMat().
PetscErrorCode Moose::SlepcSupport::mooseSlepcEigenFormFunctionAB | ( | SNES | snes, |
Vec | x, | ||
Vec | Ax, | ||
Vec | Bx, | ||
void * | ctx | ||
) |
Form function residual Ax-Bx.
It is a SLEPc callback
Definition at line 899 of file SlepcSupport.C.
Referenced by attachCallbacksToMat().
PetscErrorCode Moose::SlepcSupport::mooseSlepcEigenFormFunctionB | ( | SNES | snes, |
Vec | x, | ||
Vec | r, | ||
void * | ctx | ||
) |
Form function residual Bx.
It is a SLEPc callback
Definition at line 859 of file SlepcSupport.C.
Referenced by attachCallbacksToMat().
PetscErrorCode Moose::SlepcSupport::mooseSlepcEigenFormFunctionMFFD | ( | void * | ctx, |
Vec | x, | ||
Vec | r | ||
) |
Function call for MFFD.
Definition at line 622 of file SlepcSupport.C.
Referenced by mooseSlepcEigenFormJacobianA().
PetscErrorCode Moose::SlepcSupport::mooseSlepcEigenFormJacobianA | ( | SNES | snes, |
Vec | x, | ||
Mat | jac, | ||
Mat | pc, | ||
void * | ctx | ||
) |
Form Jacobian matrix A.
It is a SLEPc callback
Definition at line 651 of file SlepcSupport.C.
Referenced by attachCallbacksToMat().
PetscErrorCode Moose::SlepcSupport::mooseSlepcEigenFormJacobianB | ( | SNES | snes, |
Vec | x, | ||
Mat | jac, | ||
Mat | pc, | ||
void * | ctx | ||
) |
Form Jacobian matrix B.
It is a SLEPc callback
Definition at line 746 of file SlepcSupport.C.
Referenced by attachCallbacksToMat().
PetscErrorCode Moose::SlepcSupport::mooseSlepcEigenFormNorm | ( | SNES | , |
Vec | , | ||
PetscReal * | norm, | ||
void * | ctx | ||
) |
Definition at line 973 of file SlepcSupport.C.
Referenced by attachCallbacksToMat().
PetscErrorCode Moose::SlepcSupport::mooseSlepcEPSGetSNES | ( | EPS | eps, |
SNES * | snes | ||
) |
Retrieve SNES from EPS.
It makes sense only for Newton eigenvalue solvers
Definition at line 1257 of file SlepcSupport.C.
Referenced by NonlinearEigenSystem::getSNES(), mooseSlepcEPSSNESKSPSetPCSide(), mooseSlepcEPSSNESSetCustomizePC(), and mooseSlepcEPSSNESSetUpOptionPrefix().
PetscErrorCode Moose::SlepcSupport::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.
Definition at line 1345 of file SlepcSupport.C.
Referenced by SlepcEigenSolverConfiguration::configure_solver().
PetscErrorCode Moose::SlepcSupport::mooseSlepcEPSSNESKSPSetPCSide | ( | FEProblemBase & | problem, |
EPS | eps | ||
) |
Allow users to specify PC side.
By default, we apply PC from the right side. It is consistent with the nonlinear solver.
Definition at line 1325 of file SlepcSupport.C.
Referenced by SlepcEigenSolverConfiguration::configure_solver().
PetscErrorCode Moose::SlepcSupport::mooseSlepcEPSSNESSetCustomizePC | ( | EPS | eps | ) |
Attach a customized PC.
It is useful when you want to use PBP or other customized preconditioners
Definition at line 1302 of file SlepcSupport.C.
Referenced by SlepcEigenSolverConfiguration::configure_solver().
PetscErrorCode Moose::SlepcSupport::mooseSlepcEPSSNESSetUpOptionPrefix | ( | EPS | eps | ) |
Get rid of prefix "-eps_power" for SNES, KSP, PC, etc.
Definition at line 1281 of file SlepcSupport.C.
Referenced by SlepcEigenSolverConfiguration::configure_solver().
PetscErrorCode Moose::SlepcSupport::mooseSlepcStoppingTest | ( | EPS | eps, |
PetscInt | its, | ||
PetscInt | max_it, | ||
PetscInt | nconv, | ||
PetscInt | nev, | ||
EPSConvergedReason * | reason, | ||
void * | ctx | ||
) |
A customized convergence checker.
We need to make solver as converged when doing free power iteration.
Definition at line 1228 of file SlepcSupport.C.
Referenced by SlepcEigenSolverConfiguration::configure_solver().
PetscErrorCode Moose::SlepcSupport::PCApply_MoosePC | ( | PC | pc, |
Vec | x, | ||
Vec | y | ||
) |
Preconditioner application.
It call libMesh preconditioner to implement this.
Definition at line 1155 of file SlepcSupport.C.
Referenced by PCCreate_MoosePC().
PETSC_EXTERN PetscErrorCode Moose::SlepcSupport::PCCreate_MoosePC | ( | PC | pc | ) |
Create a preconditioner from moose side.
It is used to attach moose preconditioner
Definition at line 1116 of file SlepcSupport.C.
Referenced by registerPCToPETSc().
PetscErrorCode Moose::SlepcSupport::PCDestroy_MoosePC | ( | PC | pc | ) |
Destroy preconditioner.
Definition at line 1129 of file SlepcSupport.C.
Referenced by PCCreate_MoosePC().
PetscErrorCode Moose::SlepcSupport::PCSetUp_MoosePC | ( | PC | pc | ) |
Setup preconditioner.
Definition at line 1192 of file SlepcSupport.C.
Referenced by PCCreate_MoosePC().
PetscErrorCode Moose::SlepcSupport::PCView_MoosePC | ( | PC | pc, |
PetscViewer | viewer | ||
) |
View preconditioner.
Definition at line 1138 of file SlepcSupport.C.
Referenced by PCCreate_MoosePC().
PETSC_EXTERN PetscErrorCode Moose::SlepcSupport::registerPCToPETSc | ( | ) |
Let PETSc know there is a preconditioner.
Definition at line 1104 of file SlepcSupport.C.
Referenced by NonlinearEigenSystem::attachPreconditioner().
void Moose::SlepcSupport::setEigenProblemOptions | ( | SolverParams & | solver_params | ) |
Definition at line 260 of file SlepcSupport.C.
Referenced by slepcSetOptions().
void Moose::SlepcSupport::setEigenProblemSolverParams | ( | EigenProblem & | eigen_problem, |
const InputParameters & | params | ||
) |
Retrieve eigen problem params from 'params', and then set these params into SolverParams.
Definition at line 177 of file SlepcSupport.C.
Referenced by Eigenvalue::Eigenvalue().
void Moose::SlepcSupport::setEigenSolverOptions | ( | SolverParams & | solver_params, |
const InputParameters & | params | ||
) |
Definition at line 440 of file SlepcSupport.C.
Referenced by slepcSetOptions().
Set SLEPc/PETSc options to trigger free power iteration.
Definition at line 350 of file SlepcSupport.C.
Referenced by EigenProblem::doFreeNonlinearPowerIterations().
void Moose::SlepcSupport::setNewtonPetscOptions | ( | SolverParams & | solver_params, |
const InputParameters & | params | ||
) |
Definition at line 377 of file SlepcSupport.C.
Referenced by setEigenSolverOptions().
void Moose::SlepcSupport::setNonlinearPowerOptions | ( | SolverParams & | solver_params | ) |
Definition at line 420 of file SlepcSupport.C.
Referenced by setEigenSolverOptions().
void Moose::SlepcSupport::setOperationsForShellMat | ( | EigenProblem & | eigen_problem, |
Mat | mat, | ||
bool | eigen | ||
) |
Set operations to shell mat.
Definition at line 1094 of file SlepcSupport.C.
Referenced by NonlinearEigenSystem::attachSLEPcCallbacks().
void Moose::SlepcSupport::setSlepcEigenSolverTolerances | ( | EigenProblem & | eigen_problem, |
const InputParameters & | params | ||
) |
Control eigen solver tolerances via SLEPc options.
Definition at line 127 of file SlepcSupport.C.
Referenced by slepcSetOptions().
void Moose::SlepcSupport::setWhichEigenPairsOptions | ( | SolverParams & | solver_params | ) |
Definition at line 297 of file SlepcSupport.C.
Referenced by slepcSetOptions().
void Moose::SlepcSupport::slepcSetOptions | ( | EigenProblem & | eigen_problem, |
const InputParameters & | params | ||
) |
Push all SLEPc/PETSc options into SLEPc/PETSc side.
Options could come from commandline, SolverParams, params, etc.
Definition at line 496 of file SlepcSupport.C.
Referenced by Eigenvalue::prepareSolverOptions().
void Moose::SlepcSupport::storeSolveType | ( | FEProblemBase & | fe_problem, |
const InputParameters & | params | ||
) |
Set solve type into eigen problem (solverParams)
Definition at line 247 of file SlepcSupport.C.
Referenced by Eigenvalue::Eigenvalue().
const int Moose::SlepcSupport::subspace_factor = 2 |
Definition at line 34 of file SlepcSupport.C.
Referenced by setEigenProblemSolverParams().