20 "xdiff",
"",
"To evaluate |x-x_previous| for power iterations");
22 "max_power_iterations", 300,
"The maximum number of power iterations");
23 params.
addParam<
unsigned int>(
"min_power_iterations", 1,
"Minimum number of power iterations");
24 params.
addParam<
Real>(
"eig_check_tol", 1e-6,
"Eigenvalue convergence tolerance");
27 "Convergence tolerance on |x-x_previous| when provided");
28 params.
set<
Real>(
"l_tol",
true) = 1e-2;
30 "Chebyshev_acceleration_on",
true,
"If Chebyshev acceleration is turned on");
36 _solution_diff_name(getParam<PostprocessorName>(
"xdiff")),
37 _min_iter(getParam<unsigned
int>(
"min_power_iterations")),
38 _max_iter(getParam<unsigned
int>(
"max_power_iterations")),
39 _eig_check_tol(getParam<
Real>(
"eig_check_tol")),
40 _sol_check_tol(getParam<
Real>(
"sol_check_tol")),
41 _l_tol(getParam<
Real>(
"l_tol")),
42 _cheb_on(getParam<bool>(
"Chebyshev_acceleration_on"))
45 mooseError(
"max_power_iterations<min_power_iterations!");
52 "'InversePowerMethod' executioner is deprecated in favor of 'Eigenvalue' executioner.\n",
53 "Few parameters such as 'bx_norm', 'k0', 'xdiff', 'max_power_iterations', " 54 "'min_power_iterations', 'eig_check_tol', 'sol_check_tol', and 'output_before_normalization' " 55 "are no longer supported.\n",
56 "However, 'Eigenvalue' executioner supports more solving options by interfacing SLEPc.\n");
64 _console <<
"\nCannot recover InversePowerMethod solves!\nExiting...\n" << std::endl;
virtual void preExecute()
Override this for actions that should take place before execution.
const unsigned int & _min_iter
minimum number of power iterations
virtual Real & time() const
void mooseInfo(Args &&... args) const
virtual void preSolve()
Override this for actions that should take place before execution, called by PicardSolve.
virtual void onTimestepEnd() override
const ExecFlagType EXEC_TIMESTEP_END
PostprocessorValue & _eigenvalue
Storage for the eigenvalue computed by the executioner.
InversePowerMethod(const InputParameters ¶meters)
auto max(const L &left, const R &right)
virtual void advanceState()
Advance all of the state holding vectors / datastructures so that we can move to the next timestep...
virtual void execute(const ExecFlagType &exec_type)
Convenience function for performing execution of MOOSE systems.
const bool & _cheb_on
indicating if Chebyshev acceleration is turned on
virtual void execute() override
Pure virtual execute function MUST be overridden by children classes.
const unsigned int & _max_iter
maximum number of power iterations
static InputParameters validParams()
const PostprocessorName & _solution_diff_name
name of the postprocessor for evaluating |x-xprevious|; empty means that no postprocessor is provided...
const Real & _l_tol
tolerance on each power iteration (always one nonlinear iteration)
This class provides reusable routines for eigenvalue executioners.
MooseApp & _app
The MOOSE application this is associated with.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
virtual int & timeStep() const
const Real & _sol_check_tol
convergence tolerance on solution difference
bool _last_solve_converged
flag to indicate if inverse power iteration converged
registerMooseObject("MooseApp", InversePowerMethod)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void postSolve()
Override this for actions that should take place after execution, called by PicardSolve.
virtual void printEigenvalue()
Print eigenvalue.
virtual bool lastSolveConverged() const override
Whether or not the last solve converged.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
static InputParameters validParams()
Constructor.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
virtual void postExecute() override
Override this for actions that should take place after the main solve.
virtual void init() override
Initialize the executioner.
bool isRecovering() const
Whether or not this is a "recover" calculation.
void ErrorVector unsigned int
const Real & _eig_check_tol
convergence tolerance on eigenvalue
virtual void outputStep(ExecFlagType type)
Output the current step.
virtual bool inversePowerIteration(unsigned int min_iter, unsigned int max_iter, Real pfactor, bool cheb_on, Real tol_eig, bool echo, PostprocessorName xdiff, Real tol_x, Real &k, Real &initial_res)
Perform inverse power iterations with the initial guess of the solution.
virtual void init() override
Initialize the executioner.
const ExecFlagType EXEC_INITIAL