10 #ifdef MOOSE_MFEM_ENABLED 20 mfem::Coefficient & beta_coef,
23 : _alpha_coef(alpha_coef),
24 _beta_coef(beta_coef),
25 _inner_pi_its(inner_pi_its),
26 _inner_g_its(inner_g_its)
37 auto matrix_free_ams = std::make_unique<mfem::MatrixFreeAMS>(*
_aform,
38 const_cast<mfem::Operator &
>(op),
54 params.
addClassDescription(
"MFEM matrix-free auxiliary-space Maxwell preconditioner for the " 55 "iterative solution of MFEM equation systems.");
56 params.
addParam<MFEMScalarCoefficientName>(
59 "Name of scalar coefficient used in curl-curl component of target equation system.");
60 params.
addParam<MFEMScalarCoefficientName>(
63 "Name of scalar coefficient used in mass component of target equation system.");
65 "inner_pi_iterations", 0,
"Number of CG iterations on auxiliary Pi space.");
67 "inner_g_iterations", 1,
"Number of CG iterations on auxiliary G space.");
75 :
Moose::MFEM::LinearSolverBase(parameters),
76 _alpha_coef(getScalarCoefficient(
"alpha_coefficient")),
77 _beta_coef(getScalarCoefficient(
"beta_coefficient")),
78 _inner_pi_its(getParam<unsigned
int>(
"inner_pi_iterations")),
79 _inner_g_its(getParam<unsigned
int>(
"inner_g_iterations"))
87 auto solver = std::make_unique<Moose::MFEM::MatrixFreeAMS>(
89 solver->iterative_mode = getParam<bool>(
"use_initial_guess");
99 matrix_free_ams.SetBoundaryMarkers(ess_bdr_markers);
void SetOperator(const mfem::Operator &op) override
static InputParameters validParams()
Wrapper for mfem::MatrixFreeAMS solver.
void ConstructSolver() override
Override in derived classes to construct and set the solver options.
mfem::Coefficient & _beta_coef
std::unique_ptr< mfem::Solver > _solver
Solver to be used for the problem.
void SetupLOR(mfem::ParBilinearForm &a, mfem::Array< int > &ess_bdr_markers) override
Updates the solver with the bilinear form, as MFEMMatrixFreeAMS is an LOR-based solver.
mfem::Coefficient & _alpha_coef
registerMooseObject("MooseApp", MFEMMatrixFreeAMS)
static InputParameters validParams()
mfem::Coefficient & _beta_coef
MFEMMatrixFreeAMS(const InputParameters &)
std::unique_ptr< mfem::MatrixFreeAMS > _matrix_free_ams
mfem::ParBilinearForm * _aform
Wrapper for mfem::MatrixFreeAMS solver that creates an mfem::MatrixFreeAMS solver from the operator w...
mfem::Coefficient & _alpha_coef
void SetBilinearForm(mfem::ParBilinearForm &a)
Set the bilinear form corresponding to the curl-curl problem being preconditioned.
MatrixFreeAMS(mfem::Coefficient &alpha_coef, mfem::Coefficient &beta_coef, int inner_pi_its=0, int inner_g_its=1)
Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
mfem::Array< int > _ess_bdr_markers
void ErrorVector unsigned int