21 "xdiff",
"",
"To evaluate |x-x_previous| for power iterations");
23 "max_power_iterations", 300,
"The maximum number of power iterations");
24 params.
addParam<
unsigned int>(
"min_power_iterations", 1,
"Minimum number of power iterations");
25 params.
addParam<Real>(
"eig_check_tol", 1e-6,
"Eigenvalue convergence tolerance");
26 params.
addParam<Real>(
"sol_check_tol",
27 std::numeric_limits<Real>::max(),
28 "Convergence tolerance on |x-x_previous| when provided");
29 params.
set<Real>(
"l_tol",
true) = 1e-2;
31 "Chebyshev_acceleration_on",
true,
"If Chebyshev acceleration is turned on");
37 _solution_diff_name(getParam<PostprocessorName>(
"xdiff")),
38 _min_iter(getParam<unsigned
int>(
"min_power_iterations")),
39 _max_iter(getParam<unsigned
int>(
"max_power_iterations")),
40 _eig_check_tol(getParam<Real>(
"eig_check_tol")),
41 _sol_check_tol(getParam<Real>(
"sol_check_tol")),
42 _l_tol(getParam<Real>(
"l_tol")),
43 _cheb_on(getParam<bool>(
"Chebyshev_acceleration_on"))
46 mooseError(
"max_power_iterations<min_power_iterations!");
53 "'InversePowerMethod' executioner is deprecated in favor of 'Eigenvalue' executioner.\n",
54 "Few parameters such as 'bx_norm', 'k0', 'xdiff', 'max_power_iterations', "
55 "'min_power_iterations', 'eig_check_tol', 'sol_check_tol', and 'output_before_normalization' "
56 "are no longer supported.\n",
57 "However, 'Eigenvalue' executioner supports more solving options by interfacing SLEPc.\n");
65 _console <<
"\nCannot recover InversePowerMethod solves!\nExiting...\n" << std::endl;
registerMooseObject("MooseApp", InversePowerMethod)
void mooseInfo(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
const ExecFlagType EXEC_TIMESTEP_END
const ExecFlagType EXEC_INITIAL
void ErrorVector unsigned int
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
This class provides reusable routines for eigenvalue executioners.
virtual void postExecute() override
Override this for actions that should take place after the main solve.
static InputParameters validParams()
Constructor.
PostprocessorValue & _eigenvalue
Storage for the eigenvalue computed by the executioner.
virtual void printEigenvalue()
Print eigenvalue.
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.
virtual void preExecute()
Override this for actions that should take place before execution.
virtual void postSolve()
Override this for actions that should take place after execution, called by FixedPointSolve.
virtual void preSolve()
Override this for actions that should take place before execution, called by FixedPointSolve.
virtual void onTimestepEnd() override
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.
virtual Real & time() const
virtual int & timeStep() const
virtual void outputStep(ExecFlagType type)
Output the current step.
bool _last_solve_converged
flag to indicate if inverse power iteration converged
const unsigned int & _max_iter
maximum number of power iterations
virtual void execute() override
Pure virtual execute function MUST be overridden by children classes.
static InputParameters validParams()
const Real & _l_tol
tolerance on each power iteration (always one nonlinear iteration)
const PostprocessorName & _solution_diff_name
name of the postprocessor for evaluating |x-xprevious|; empty means that no postprocessor is provided...
const unsigned int & _min_iter
minimum number of power iterations
InversePowerMethod(const InputParameters ¶meters)
const Real & _sol_check_tol
convergence tolerance on solution difference
virtual bool lastSolveConverged() const override
Whether or not the last solve converged.
const Real & _eig_check_tol
convergence tolerance on eigenvalue
const bool & _cheb_on
indicating if Chebyshev acceleration is turned on
virtual void init() override
Initialize the executioner.
bool isRecovering() const
Whether or not this is a "recover" calculation.
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 ...
MooseApp & _app
The MOOSE application this is associated with.