https://mooseframework.inl.gov
Public Member Functions | Private Attributes | List of all members
Moose::MFEM::MatrixFreeAMS Class Reference

Wrapper for mfem::MatrixFreeAMS solver that creates an mfem::MatrixFreeAMS solver from the operator when set. More...

#include <MFEMMatrixFreeAMS.h>

Inheritance diagram for Moose::MFEM::MatrixFreeAMS:
[legend]

Public Member Functions

 MatrixFreeAMS (mfem::Coefficient &alpha_coef, mfem::Coefficient &beta_coef, int inner_pi_its=0, int inner_g_its=1)
 
void SetBilinearForm (mfem::ParBilinearForm &a)
 Set the bilinear form corresponding to the curl-curl problem being preconditioned. More...
 
void SetBoundaryMarkers (mfem::Array< int > &ess_bdr_markers)
 Set the marker array labelling essential boundaries. More...
 
void SetOperator (const mfem::Operator &op) override
 
void Mult (const mfem::Vector &x, mfem::Vector &y) const override
 

Private Attributes

std::unique_ptr< mfem::MatrixFreeAMS > _matrix_free_ams {nullptr}
 
mfem::Coefficient & _alpha_coef
 
mfem::Coefficient & _beta_coef
 
const int _inner_pi_its
 
const int _inner_g_its
 
mfem::ParBilinearForm * _aform
 
mfem::Array< int_ess_bdr_markers
 

Detailed Description

Wrapper for mfem::MatrixFreeAMS solver that creates an mfem::MatrixFreeAMS solver from the operator when set.

Definition at line 22 of file MFEMMatrixFreeAMS.h.

Constructor & Destructor Documentation

◆ MatrixFreeAMS()

Moose::MFEM::MatrixFreeAMS::MatrixFreeAMS ( mfem::Coefficient &  alpha_coef,
mfem::Coefficient &  beta_coef,
int  inner_pi_its = 0,
int  inner_g_its = 1 
)

Definition at line 19 of file MFEMMatrixFreeAMS.C.

23  : _alpha_coef(alpha_coef),
24  _beta_coef(beta_coef),
25  _inner_pi_its(inner_pi_its),
26  _inner_g_its(inner_g_its)
27 {
28 }
mfem::Coefficient & _beta_coef
mfem::Coefficient & _alpha_coef

Member Function Documentation

◆ Mult()

void Moose::MFEM::MatrixFreeAMS::Mult ( const mfem::Vector &  x,
mfem::Vector &  y 
) const
inlineoverride

Definition at line 38 of file MFEMMatrixFreeAMS.h.

39  {
40  _matrix_free_ams->Mult(x, y);
41  }
std::unique_ptr< mfem::MatrixFreeAMS > _matrix_free_ams

◆ SetBilinearForm()

void Moose::MFEM::MatrixFreeAMS::SetBilinearForm ( mfem::ParBilinearForm &  a)
inline

Set the bilinear form corresponding to the curl-curl problem being preconditioned.

Definition at line 31 of file MFEMMatrixFreeAMS.h.

Referenced by MFEMMatrixFreeAMS::SetupLOR().

31 { _aform = &a; }
mfem::ParBilinearForm * _aform

◆ SetBoundaryMarkers()

void Moose::MFEM::MatrixFreeAMS::SetBoundaryMarkers ( mfem::Array< int > &  ess_bdr_markers)
inline

Set the marker array labelling essential boundaries.

Definition at line 33 of file MFEMMatrixFreeAMS.h.

34  {
35  _ess_bdr_markers = ess_bdr_markers;
36  }
mfem::Array< int > _ess_bdr_markers

◆ SetOperator()

void Moose::MFEM::MatrixFreeAMS::SetOperator ( const mfem::Operator &  op)
override

Definition at line 31 of file MFEMMatrixFreeAMS.C.

32 {
33  height = op.Height();
34  width = op.Width();
35  // The constructor of mfem::MatrixFreeAMS requires the target operator to be known, so this
36  // constructs the solver
37  auto matrix_free_ams = std::make_unique<mfem::MatrixFreeAMS>(*_aform,
38  const_cast<mfem::Operator &>(op),
39  *_aform->ParFESpace(),
40  &_alpha_coef,
41  &_beta_coef,
42  nullptr,
45  _inner_g_its);
46  _matrix_free_ams = std::move(matrix_free_ams);
47 }
mfem::Coefficient & _beta_coef
std::unique_ptr< mfem::MatrixFreeAMS > _matrix_free_ams
mfem::ParBilinearForm * _aform
mfem::Coefficient & _alpha_coef
mfem::Array< int > _ess_bdr_markers

Member Data Documentation

◆ _aform

mfem::ParBilinearForm* Moose::MFEM::MatrixFreeAMS::_aform
private

Definition at line 49 of file MFEMMatrixFreeAMS.h.

Referenced by SetBilinearForm(), and SetOperator().

◆ _alpha_coef

mfem::Coefficient& Moose::MFEM::MatrixFreeAMS::_alpha_coef
private

Definition at line 45 of file MFEMMatrixFreeAMS.h.

Referenced by SetOperator().

◆ _beta_coef

mfem::Coefficient& Moose::MFEM::MatrixFreeAMS::_beta_coef
private

Definition at line 46 of file MFEMMatrixFreeAMS.h.

Referenced by SetOperator().

◆ _ess_bdr_markers

mfem::Array<int> Moose::MFEM::MatrixFreeAMS::_ess_bdr_markers
private

Definition at line 50 of file MFEMMatrixFreeAMS.h.

Referenced by SetBoundaryMarkers(), and SetOperator().

◆ _inner_g_its

const int Moose::MFEM::MatrixFreeAMS::_inner_g_its
private

Definition at line 48 of file MFEMMatrixFreeAMS.h.

Referenced by SetOperator().

◆ _inner_pi_its

const int Moose::MFEM::MatrixFreeAMS::_inner_pi_its
private

Definition at line 47 of file MFEMMatrixFreeAMS.h.

Referenced by SetOperator().

◆ _matrix_free_ams

std::unique_ptr<mfem::MatrixFreeAMS> Moose::MFEM::MatrixFreeAMS::_matrix_free_ams {nullptr}
private

Definition at line 44 of file MFEMMatrixFreeAMS.h.

Referenced by Mult(), and SetOperator().


The documentation for this class was generated from the following files: