www.mooseframework.org
EigenProblem.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef EIGENPROBLEM_H
16 #define EIGENPROBLEM_H
17 
18 // MOOSE Includes
19 #include "FEProblemBase.h"
20 
21 // Forward declarations
22 class EigenProblem;
24 
25 template <>
27 
33 {
34 public:
36 
37  virtual ~EigenProblem();
38 
39  virtual void solve() override;
40 
41  virtual bool converged() override;
42 
43  virtual unsigned int getNEigenPairsRequired() { return _n_eigen_pairs_required; }
44  virtual void setNEigenPairsRequired(unsigned int n_eigen_pairs)
45  {
46  _n_eigen_pairs_required = n_eigen_pairs;
47  }
49  virtual bool isNonlinearEigenvalueSolver();
50 
52 
53  // silences warning in debug mode about the other computeJacobian signature being hidden
55 
56  virtual void computeJacobian(const NumericVector<Number> & soln,
57  SparseMatrix<Number> & jacobian,
58  Moose::KernelType kernel_type) override;
59 
60  void computeResidualTypeBx(const NumericVector<Number> & soln,
61  NumericVector<Number> & residual,
63 
64  void computeResidualType(const NumericVector<Number> & soln,
65  NumericVector<Number> & residual,
66  Moose::KernelType type) override;
67 
68  virtual void checkProblemIntegrity() override;
69 #if LIBMESH_HAVE_SLEPC
70  void setEigenproblemType(Moose::EigenProblemType eigen_problem_type);
71 #endif
72 protected:
75  std::shared_ptr<NonlinearEigenSystem> _nl_eigen;
77 };
78 
79 #endif /* EIGENPROBLEM_H */
virtual unsigned int getNEigenPairsRequired()
Definition: EigenProblem.h:43
Nonlinear eigenvalue system to be solved.
virtual bool isNonlinearEigenvalueSolver()
Definition: EigenProblem.C:155
virtual void solve() override
Definition: EigenProblem.C:132
EigenProblem(const InputParameters &parameters)
Definition: EigenProblem.C:39
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
unsigned int _n_eigen_pairs_required
Definition: EigenProblem.h:73
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
std::shared_ptr< NonlinearEigenSystem > _nl_eigen
Definition: EigenProblem.h:75
bool _generalized_eigenvalue_problem
Definition: EigenProblem.h:74
bool residualInitialed()
Definition: EigenProblem.h:51
virtual void setNEigenPairsRequired(unsigned int n_eigen_pairs)
Definition: EigenProblem.h:44
void computeResidualTypeBx(const NumericVector< Number > &soln, NumericVector< Number > &residual, Moose::KernelType type)
Definition: EigenProblem.C:164
bool _is_residual_initialed
Definition: EigenProblem.h:76
KernelType
Definition: MooseTypes.h:162
MatType type
virtual void computeJacobian(const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, Moose::KernelType kernel_type) override
Definition: EigenProblem.C:115
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
virtual ~EigenProblem()
Definition: EigenProblem.C:62
virtual bool converged() override
Definition: EigenProblem.C:149
void computeResidualType(const NumericVector< Number > &soln, NumericVector< Number > &residual, Moose::KernelType type) override
Definition: EigenProblem.C:176
InputParameters validParams< EigenProblem >()
Definition: EigenProblem.C:33
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition: EigenProblem.h:32
virtual void computeJacobian(NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian)
virtual void checkProblemIntegrity() override
Definition: EigenProblem.C:125
EigenProblemType
Type of the eigen problem.
Definition: MooseTypes.h:272
void setEigenproblemType(Moose::EigenProblemType eigen_problem_type)
Definition: EigenProblem.C:71
virtual bool isGeneralizedEigenvalueProblem()
Definition: EigenProblem.h:48