12#include "libmesh/libmesh_config.h"
17#include "libmesh/condensed_eigen_system.h"
24#ifdef LIBMESH_HAVE_SLEPC
41 virtual void solve()
override;
47 const std::set<TagID> & vector_tags_to_close)
override;
64 virtual NumericVector<Number> &
RHS()
override;
95 virtual SNES
getSNES()
override;
190 virtual void reinit()
override;
Problem for solving eigenvalue problems.
This is the common base class for the three main kernel types implemented in MOOSE,...
Class for containing MooseEnum item information.
Nonlinear eigenvalue system to be solved.
TagID eigenVectorTag() const
Vector tag ID of right hand side.
virtual bool converged() override
Returns the convergence state.
virtual void postAddResidualObject(ResidualObject &object) override
Called after any ResidualObject-derived objects are added to the system.
NumericVector< Number > & residualVectorAX()
dof_id_type _num_constrained_dofs
The number of degrees of freedom constrained at the libMesh level, e.g.
TagID nonEigenVectorTag() const
Vector tag ID of left hand side.
unsigned int _n_eigen_pairs_required
virtual unsigned int getCurrentNonlinearIterationNumber() override
Returns the current nonlinear iteration number.
virtual libMesh::NonlinearSolver< Number > * nonlinearSolver() override
void computeScalingJacobian() override
Compute a "Jacobian" for automatic scaling purposes.
const std::vector< std::pair< Real, Real > > & getAllConvergedEigenvalues() const
Get the number of converged eigenvalues.
void computeScalingResidual() override
Compute a "residual" for automatic scaling purposes.
std::set< TagID > defaultMatrixTags() const override
Get the default matrix tags associted with this system.
virtual unsigned int nLinearIterations() const override
Return the number of linear iterations.
libMesh::CondensedEigenSystem & _eigen_sys
EigenProblem & _eigen_problem
NonlinearEigenSystem(EigenProblem &problem, const std::string &name)
void attachSLEPcCallbacks()
virtual SNES getSNES() override
Retrieve snes from slepc eigen solver.
void checkIntegrity()
For eigenvalue problems (including standard and generalized), inhomogeneous (Dirichlet or Neumann) bo...
virtual void postInit() override
virtual Real finalNonlinearResidual() const override
Return the final nonlinear residual.
virtual void turnOffJacobian() override
Turn off the Jacobian (must be called before equation system initialization)
virtual void attachPreconditioner(libMesh::Preconditioner< Number > *preconditioner) override
Attach a customized preconditioner that requires physics knowledge.
virtual NumericVector< Number > & RHS() override
NumericVector< Number > & residualVectorBX()
std::set< TagID > defaultVectorTags() const override
Get the default vector tags associated with this system.
TagID precondMatrixTag() const
libMesh::Preconditioner< Number > * preconditioner() const
void residualAndJacobianTogether() override
Call this method if you want the residual and Jacobian to be computed simultaneously.
virtual void solve() override
Solve the system (using libMesh magic)
std::pair< Real, Real > getConvergedEigenpair(dof_id_type n) const
Return the Nth converged eigenvalue and copies the respective eigen vector to the solution vector.
virtual void stopSolve(const ExecFlagType &exec_flag, const std::set< TagID > &vector_tags_to_close) override
Quit the current solve as soon as possible.
libMesh::Preconditioner< Number > * _preconditioner
TagID nonEigenMatrixTag() const
Matrix tag ID of left hand side.
TagID eigenMatrixTag() const
Matrix tag ID of right hand side.
NumericVector< Number > & _work_rhs_vector_BX
void precondMatrixIncludesEigenKernels(bool precond_matrix_includes_eigen)
If the preconditioning matrix includes eigen kernels.
std::pair< Real, Real > getConvergedEigenvalue(dof_id_type n) const
Return the Nth converged eigenvalue.
unsigned int getNumConvergedEigenvalues() const
Get the number of converged eigenvalues.
virtual unsigned int nNonlinearIterations() const override
Return the number of non-linear iterations.
virtual void setupFiniteDifferencedPreconditioner() override
bool converged()
Returns the convergence state.
void initializeCondensedMatrices()
Initialize the condensed matrices.
bool _precond_matrix_includes_eigen
std::unique_ptr< SlepcEigenSolverConfiguration > _solver_configuration
libMesh::CondensedEigenSystem & sys()
virtual void reinit() override
Reinitialize the system when the degrees of freedom in this system have changed.
bool precondMatrixIncludesEigenKernels() const
virtual EPS getEPS()
Retrieve EPS (SLEPc eigen solver)
NumericVector< Number > & _work_rhs_vector_AX
std::vector< std::pair< Real, Real > > _eigen_values
Nonlinear system to be solved.
This is the common base class for objects that give residual contributions.
virtual const std::string & name() const
unsigned int get_n_converged() const
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
void assemble_matrix(EquationSystems &es, const std::string &system_name)