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