19 params.
addParam<
unsigned int>(
"free_power_iterations", 4,
"The number of free power iterations");
20 params.
set<Real>(
"nl_abs_tol",
true) = 1.0e-06;
21 params.
set<Real>(
"nl_rel_tol",
true) = 1e-50;
22 params.
set<Real>(
"l_tol",
true) = 1e-2;
23 params.
addParam<Real>(
"free_l_tol", 1e-2,
"Relative linear tolerance in free power iteration");
25 "output_after_power_iterations",
true,
"True to output solution after free power iterations");
31 _free_iter(getParam<unsigned
int>(
"free_power_iterations")),
32 _nl_abs_tol(getParam<Real>(
"nl_abs_tol")),
33 _nl_rel_tol(getParam<Real>(
"nl_rel_tol")),
34 _l_tol(getParam<Real>(
"l_tol")),
35 _free_l_tol(getParam<Real>(
"free_l_tol")),
36 _output_after_pi(getParam<bool>(
"output_after_power_iterations"))
39 "'NonlinearEigen' executioner is deprecated in favor of 'Eigenvalue' executioner.\n",
40 "Few parameters such as 'bx_norm', 'k0', 'free_l_tol', 'output_before_normalization' and "
41 "'output_after_power_iterations' are no longer supported.\n",
42 "However, 'Eigenvalue' executioner supports more solving options by interfacing SLEPc.\n",
43 "Most of the inputs will work by simply replacing the executioner type with 'Eigenvalue'.");
51 _console <<
"\nCannot recover NonlinearEigen solves!\nExiting...\n" << std::endl;
71 _console <<
" Free power iteration starts" << std::endl;
78 std::numeric_limits<Real>::min(),
81 std::numeric_limits<Real>::max(),
119 _console <<
" Nonlinear iteration starts" << std::endl;
void mooseInfo(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
const ExecFlagType EXEC_TIMESTEP_END
const ExecFlagType EXEC_TIMESTEP_BEGIN
const ExecFlagType EXEC_INITIAL
registerMooseObject("MooseApp", NonlinearEigen)
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.
virtual bool nonlinearSolve(Real rel_tol, Real abs_tol, Real pfactor, Real &k)
Perform nonlinear solve with the initial guess of the solution.
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.
void timestepSetup() override
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 isRecovering() const
Whether or not this is a "recover" calculation.
MooseApp & _app
The MOOSE application this is associated with.
virtual bool lastSolveConverged() const override
Whether or not the last solve converged.
NonlinearEigen(const InputParameters ¶meters)
const unsigned int & _free_iter
virtual void execute() override
Pure virtual execute function MUST be overridden by children classes.
static InputParameters validParams()
virtual void init() override
Initialize the executioner.
bool _last_solve_converged