25 InverseOperator::InverseOperator(
const std::string §ion_name,
26 const std::string &solver_name,
28 const unsigned int max_iterations,
29 const double tolerance,
30 const double reduction,
31 const unsigned int consecutive_iterations,
32 const bool &log_history,
33 const bool &log_result)
35 , control_type(control_type)
36 , solver_name(solver_name)
37 , max_iterations(max_iterations)
40 , reduction(reduction)
41 , log_history(log_history)
42 , log_result(log_result)
46 "Name of the solver to use. One of cg,bicgstab,gmres,fgmres,"
47 "minres,qmrs, or richardson.",
48 dealii::ParameterAcceptor::prm,
49 dealii::Patterns::Selection(
"cg|bicgstab|gmres|fgmres|"
50 "minres|qmrs|richardson"));
53 add_parameter(
"Consecutive iterations", this->consecutive_iterations);
67 std::unique_ptr<dealii::SolverControl>
70 std::unique_ptr<dealii::SolverControl> result;
void add_parameter(const std::string &entry, ParameterType ¶meter, const std::string &documentation="", ParameterHandler &prm_=prm, const Patterns::PatternBase &pattern=*Patterns::Tools::Convert< ParameterType >::to_pattern())
bool log_result
Log the final result.
double tolerance
Default reduction required to succesfully complete a solution step.
std::string get_solver_name() const
Get the solver name.
std::string solver_name
Solver name.
unsigned int consecutive_iterations
Number of consecutive iterations (used only for ConsecutiveControl).
bool log_history
Log the solver history.
double reduction
Default reduction required to succesfully complete a solution step.
SolverControlType control_type
Defines the behaviour of the solver control.
std::unique_ptr< SolverControl > setup_new_solver_control(const double abs_tol=0.0) const
Create a new solver control according to the parameters.
unsigned int max_iterations
Default number of maximum iterations required to succesfully complete a solution step.
std::unique_ptr< SolverControl > control
Used internally by the solver.
#define Assert(cond, exc)
static ::ExceptionBase & ExcInternalError()
SolverControlType
An enum class used to identify different classes derived from SolverControl.
@ iteration_number
Use IterationNumberControl.
@ tolerance
Use SolverControl.
@ reduction
Use ReductionControl.
@ consecutive_iterations
Use ConsecutiveControl.