10 #ifdef MOOSE_MFEM_ENABLED 22 params.
addClassDescription(
"Hypre BoomerAMG solver and preconditioner for the iterative solution " 23 "of MFEM equation systems.");
24 params.
addParam<mfem::real_t>(
"l_tol", 1e-5,
"Set the relative tolerance.");
25 params.
addParam<
int>(
"l_max_its", 10000,
"Set the maximum number of iterations.");
26 params.
addParam<
int>(
"print_level", 2,
"Set the solver verbosity.");
28 "fespace",
"H1 FESpace to use in HypreBoomerAMG setup for elasticity problems.");
30 "strength_threshold", 0.25,
"HypreBoomerAMG strong threshold. Defaults to 0.25.");
31 MooseEnum errmode(
"ignore=0 warn=1 abort=2",
"abort",
false);
32 params.
addParam<
MooseEnum>(
"error_mode", errmode,
"Set the behavior for treating hypre errors.");
37 :
Moose::MFEM::LORLinearSolverBase<
mfem::HypreBoomerAMG>(parameters),
39 isParamSetByUser(
"fespace")
41 .getMFEMObject<
MFEMFESpace>(
"MFEMFESpace", getParam<MFEMFESpaceName>(
"fespace"))
53 auto solver = std::make_unique<mfem::HypreBoomerAMG>();
61 solver.iterative_mode = getParam<bool>(
"use_initial_guess");
62 solver.SetTol(getParam<mfem::real_t>(
"l_tol"));
63 solver.SetMaxIter(getParam<int>(
"l_max_its"));
64 solver.SetPrintLevel(getParam<int>(
"print_level"));
65 solver.SetStrengthThresh(getParam<mfem::real_t>(
"strength_threshold"));
66 solver.SetErrorMode(mfem::HypreSolver::ErrorMode(
int(getParam<MooseEnum>(
"error_mode"))));
MFEMHypreBoomerAMG(const InputParameters &)
Wrapper for mfem::HypreBoomerAMG solver.
std::unique_ptr< mfem::Solver > _solver
Solver to be used for the problem.
static InputParameters validParams()
virtual void SetSolverParameters(mfem::HypreBoomerAMG &solver) override
Update the wrapped MFEM solver parameters.
registerMooseObject("MooseApp", MFEMHypreBoomerAMG)
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Constructs and stores an mfem::ParFiniteElementSpace object.
std::shared_ptr< mfem::ParFiniteElementSpace > _mfem_fespace
void ConstructSolver() override
Override in derived classes to construct and set the solver options.
static InputParameters validParams()
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...