Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 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 "EigenExecutionerBase.h" 13 : 14 : class InversePowerMethod : public EigenExecutionerBase 15 : { 16 : public: 17 : static InputParameters validParams(); 18 : 19 : InversePowerMethod(const InputParameters & parameters); 20 : 21 : virtual void init() override; 22 : 23 : virtual void execute() override; 24 : 25 20 : virtual bool lastSolveConverged() const override { return _last_solve_converged; } 26 : 27 : protected: 28 : virtual void takeStep(); 29 : 30 : /// name of the postprocessor for evaluating |x-xprevious|; empty means that no postprocessor is provided and power iteration will not check convergence based on it 31 : const PostprocessorName & _solution_diff_name; 32 : /// minimum number of power iterations 33 : const unsigned int & _min_iter; 34 : /// maximum number of power iterations 35 : const unsigned int & _max_iter; 36 : /// convergence tolerance on eigenvalue 37 : const Real & _eig_check_tol; 38 : /// convergence tolerance on solution difference 39 : const Real & _sol_check_tol; 40 : /// tolerance on each power iteration (always one nonlinear iteration) 41 : const Real & _l_tol; 42 : /// indicating if Chebyshev acceleration is turned on 43 : const bool & _cheb_on; 44 : /// flag to indicate if inverse power iteration converged 45 : bool _last_solve_converged; 46 : };