www.mooseframework.org
Eigenvalue.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "libmesh/libmesh_config.h"
13 
14 #include "Executioner.h"
15 
16 class InputParameters;
17 class EigenProblem;
18 
19 template <typename T>
21 
30 class Eigenvalue : public Executioner
31 {
32 public:
40 
42 
43  virtual void execute() override;
44 
45  virtual bool lastSolveConverged() const override { return _last_solve_converged; }
46 
47 #ifdef LIBMESH_HAVE_SLEPC
48  virtual void init() override;
49 
53  virtual void checkIntegrity();
54 
58  unsigned int numGridSteps() const { return _feproblem_solve.numGridSteps(); }
59 
60 private:
64  void prepareSolverOptions();
65 #endif
66 
67 protected:
69 
72 
75 
77  int & _time_step;
79 
81 
82 private:
84 };
virtual bool lastSolveConverged() const override
Whether or not the last solve converged.
Definition: Eigenvalue.h:45
static InputParameters validParams()
Constructor.
Definition: Eigenvalue.C:22
virtual void init() override
Initialize the executioner.
Definition: Eigenvalue.C:151
Eigenvalue executioner is used to drive the eigenvalue calculations.
Definition: Eigenvalue.h:30
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Real & _time
Definition: Eigenvalue.h:78
const PostprocessorValue *const _normalization
Postprocessor value that scales solution when eigensolve is finished.
Definition: Eigenvalue.h:74
bool _last_solve_converged
Definition: Eigenvalue.h:83
InputParameters validParams()
unsigned int PerfID
Definition: MooseTypes.h:201
virtual void execute() override
Pure virtual execute function MUST be overridden by children classes.
Definition: Eigenvalue.C:215
virtual void checkIntegrity()
Eigenvalue executioner does not allow time kernels.
Definition: Eigenvalue.C:205
Eigenvalue(const InputParameters &parameters)
Definition: Eigenvalue.C:91
unsigned int numGridSteps() const
Get the number of grid sequencing steps.
Definition: Eigenvalue.h:58
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:191
unsigned int numGridSteps() const
Return the number of grid sequencing steps.
Executioners are objects that do the actual work of solving your problem.
Definition: Executioner.h:30
FEProblemSolve _feproblem_solve
inner-most solve object to perform Newton solve with SLEPc
Definition: Eigenvalue.h:71
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
int & _time_step
Definition: Eigenvalue.h:77
void prepareSolverOptions()
Prepare right petsc options.
Definition: Eigenvalue.C:184
Real _system_time
Definition: Eigenvalue.h:76
const InputParameters & parameters() const
Get the parameters of the object.
PerfID _final_timer
Definition: Eigenvalue.h:80
EigenProblem & _eigen_problem
Definition: Eigenvalue.h:68
Problem for solving eigenvalue problems.
Definition: EigenProblem.h:21