https://mooseframework.inl.gov
Classes | Typedefs | Functions
Moose::MFEM Namespace Reference

Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s). More...

Classes

class  CoefficientManager
 Front-end class for creating and storing MFEM coefficients. More...
 
class  CoefficientMap
 Class to manage MFEM coefficient objects representing material properties. More...
 
class  ComplexEquationSystem
 
class  ComplexEquationSystemProblemOperator
 Steady-state problem operator with an equation system. More...
 
class  EigenproblemEquationSystem
 Equation system specialization for eigenproblems. More...
 
class  EigenproblemESProblemOperator
 Steady-state eigenproblem operator with an equation system. More...
 
class  EquationSystem
 Class to store weak form components (bilinear and linear forms, and optionally mixed and nonlinear forms) and build methods. More...
 
class  EquationSystemInterface
 Interface required for: More...
 
class  EquationSystemProblemOperator
 Steady-state problem operator with an equation system. More...
 
class  NamedFieldsMap
 Lightweight adaptor over an std::map from strings to pointer to T. More...
 
class  NLBoundaryConvectiveHeatFluxIntegrator
 

\[ (k(u) (u-u_\infty), v) \]

More...
 
class  NLCurlCurlIntegrator
 

\[ (k(|\vec \nabla \times \vec u|) \vec \nabla \times \vec u, \vec \nabla \times \vec v) \]

More...
 
class  NLCurlCurlJacMatrixCoefficient
 Matrix coefficient for the Jacobian of NLCurlCurlIntegrator. More...
 
class  NLDiffusionIntegrator
 

\[ (k(u) \vec \nabla u, \vec \nabla v) \]

More...
 
class  NLScaleIntegrator
 NonlinearFormIntegrator which scales its results by a constant value. More...
 
class  ProblemOperator
 Steady-state problem operator with no equation system. More...
 
class  ProblemOperatorBase
 Interface inherited by ProblemOperator and TimeDependentProblemOperator. Removes duplicated code in both classes. More...
 
class  ProblemOperatorInterface
 Interface required for MFEM executioners to add and get ProblemOperators: More...
 
class  ScaleIntegrator
 Integrator which scales its results by a constant value. More...
 
class  SuperLUSolver
 Wrapper for mfem::SuperLUSolver that creates a SuperLURowLocMatrix from the operator when set. More...
 
class  TimeDependentEquationSystem
 Class to store weak form components for time dependent PDEs. More...
 
class  TimeDependentEquationSystemProblemOperator
 Problem operator for time-dependent problems with an equation system. More...
 
class  TimeDependentProblemOperator
 Problem operator for time-dependent problems with no equation system. More...
 
class  TimeDerivativeMap
 Lightweight adaptor over a std::map relating names of GridFunctions with the name of their time derivatives. More...
 

Typedefs

using FECollections = Moose::MFEM::NamedFieldsMap< mfem::FiniteElementCollection >
 
using FESpaces = Moose::MFEM::NamedFieldsMap< mfem::ParFiniteElementSpace >
 
using SubMeshes = Moose::MFEM::NamedFieldsMap< mfem::ParSubMesh >
 
using GridFunctions = Moose::MFEM::NamedFieldsMap< mfem::ParGridFunction >
 
using ComplexGridFunctions = Moose::MFEM::NamedFieldsMap< mfem::ParComplexGridFunction >
 
using ScalarMap = CoefficientMap< mfem::Coefficient, mfem::PWCoefficient >
 
using VectorMap = CoefficientMap< mfem::VectorCoefficient, mfem::PWVectorCoefficient >
 
using MatrixMap = CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >
 

Functions

std::size_t MFEMIndex (const std::size_t i_dim, const std::size_t i_point, const std::size_t num_dims, const std::size_t num_points, const mfem::Ordering::Type ordering)
 Convert an index of a vector of libMesh::Points to an MFEM vector index, given an MFEM ordering. More...
 
libMesh::Point libMeshPointFromMFEMVector (const mfem::Vector &vec)
 Convert an MFEM position vector to a libMesh::Point. More...
 
mfem::Vector libMeshPointsToMFEMVector (const std::vector< libMesh::Point > &points, const unsigned int num_dims, const mfem::Ordering::Type ordering)
 Convert a vector of libMesh::Point objects to an mfem::Vector containing all points, given an ordering. More...
 

Detailed Description

Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).

Typedef Documentation

◆ ComplexGridFunctions

using Moose::MFEM::ComplexGridFunctions = typedef Moose::MFEM::NamedFieldsMap<mfem::ParComplexGridFunction>

Definition at line 232 of file MFEMContainers.h.

◆ FECollections

using Moose::MFEM::FECollections = typedef Moose::MFEM::NamedFieldsMap<mfem::FiniteElementCollection>

Definition at line 228 of file MFEMContainers.h.

◆ FESpaces

using Moose::MFEM::FESpaces = typedef Moose::MFEM::NamedFieldsMap<mfem::ParFiniteElementSpace>

Definition at line 229 of file MFEMContainers.h.

◆ GridFunctions

using Moose::MFEM::GridFunctions = typedef Moose::MFEM::NamedFieldsMap<mfem::ParGridFunction>

Definition at line 231 of file MFEMContainers.h.

◆ MatrixMap

using Moose::MFEM::MatrixMap = typedef CoefficientMap<mfem::MatrixCoefficient, mfem::PWMatrixCoefficient>

Definition at line 165 of file CoefficientMap.h.

◆ ScalarMap

using Moose::MFEM::ScalarMap = typedef CoefficientMap<mfem::Coefficient, mfem::PWCoefficient>

Definition at line 163 of file CoefficientMap.h.

◆ SubMeshes

using Moose::MFEM::SubMeshes = typedef Moose::MFEM::NamedFieldsMap<mfem::ParSubMesh>

Definition at line 230 of file MFEMContainers.h.

◆ VectorMap

using Moose::MFEM::VectorMap = typedef CoefficientMap<mfem::VectorCoefficient, mfem::PWVectorCoefficient>

Definition at line 164 of file CoefficientMap.h.

Function Documentation

◆ libMeshPointFromMFEMVector()

libMesh::Point Moose::MFEM::libMeshPointFromMFEMVector ( const mfem::Vector &  vec)

Convert an MFEM position vector to a libMesh::Point.

Definition at line 18 of file MFEMVectorUtils.C.

Referenced by MFEMProblem::addFunction().

19 {
20  return libMesh::Point(vec(0), vec.Size() > 1 ? vec(1) : 0., vec.Size() > 2 ? vec(2) : 0.);
21 }

◆ libMeshPointsToMFEMVector()

mfem::Vector Moose::MFEM::libMeshPointsToMFEMVector ( const std::vector< libMesh::Point > &  points,
const unsigned int  num_dims,
const mfem::Ordering::Type  ordering 
)

Convert a vector of libMesh::Point objects to an mfem::Vector containing all points, given an ordering.

Definition at line 24 of file MFEMVectorUtils.C.

Referenced by MultiAppMFEMTolibMeshShapeEvaluationTransfer::transferVariables().

27 {
28  const unsigned int num_points = points.size();
29  mfem::Vector mfem_points(num_points * num_dims);
30  for (const auto i_point : libMesh::make_range(num_points))
31  for (const auto i_dim : libMesh::make_range(num_dims))
32  mfem_points(MFEMIndex(i_dim, i_point, num_dims, num_points, ordering)) =
33  points[i_point](i_dim);
34 
35  return mfem_points;
36 }
std::size_t MFEMIndex(const std::size_t i_dim, const std::size_t i_point, const std::size_t num_dims, const std::size_t num_points, const mfem::Ordering::Type ordering)
Convert an index of a vector of libMesh::Points to an MFEM vector index, given an MFEM ordering...
IntRange< T > make_range(T beg, T end)

◆ MFEMIndex()

std::size_t Moose::MFEM::MFEMIndex ( const std::size_t  i_dim,
const std::size_t  i_point,
const std::size_t  num_dims,
const std::size_t  num_points,
const mfem::Ordering::Type  ordering 
)
inline

Convert an index of a vector of libMesh::Points to an MFEM vector index, given an MFEM ordering.

Definition at line 29 of file MFEMVectorUtils.h.

Referenced by MFEMValueSamplerBase::finalize(), libMeshPointsToMFEMVector(), and MFEMNodalProjector::projectNodalValues().

34 {
35  if (ordering == mfem::Ordering::byNODES)
36  return mfem::Ordering::Map<mfem::Ordering::byNODES>(num_points, num_dims, i_point, i_dim);
37  else
38  return mfem::Ordering::Map<mfem::Ordering::byVDIM>(num_points, num_dims, i_point, i_dim);
39 }