MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::ceed Namespace Reference

Classes

class  AlgebraicCoarseSpace
 A way to use algebraic levels in a Multigrid object. More...
 
class  AlgebraicInterpolation
 Multigrid interpolation operator in Ceed framework. More...
 
class  AlgebraicMultigrid
 Extension of Multigrid object to algebraically generated coarse spaces. More...
 
class  AlgebraicSolver
 Wrapper for AlgebraicMultigrid object. More...
 
class  AlgebraicSpaceHierarchy
 Hierarchy of AlgebraicCoarseSpace objects for use in Multigrid object. More...
 
struct  BasisHash
 
struct  Coefficient
 
struct  GridCoefficient
 
class  MFConvectionIntegrator
 Represent a ConvectionIntegrator with AssemblyLevel::None using libCEED. More...
 
class  MFDiffusionIntegrator
 Represent a DiffusionIntegrator with AssemblyLevel::None using libCEED. More...
 
class  MFIntegrator
 
class  MFMassIntegrator
 Represent a MassIntegrator with AssemblyLevel::None using libCEED. More...
 
class  MFVectorConvectionNLFIntegrator
 
class  MixedIntegrator
 This class wraps a ceed::PAIntegrator or ceed::MFIntegrator to support mixed finite element spaces. More...
 
class  MixedMFConvectionIntegrator
 
class  MixedMFDiffusionIntegrator
 
class  MixedMFMassIntegrator
 
class  MixedMFVectorConvectionNLIntegrator
 
class  MixedPAConvectionIntegrator
 
class  MixedPADiffusionIntegrator
 
class  MixedPAMassIntegrator
 
class  MixedPAVectorConvectionNLIntegrator
 
class  Operator
 
struct  OperatorInfo
 
class  PAConvectionIntegrator
 Represent a ConvectionIntegrator with AssemblyLevel::Partial using libCEED. More...
 
class  PADiffusionIntegrator
 Represent a DiffusionIntegrator with AssemblyLevel::Partial using libCEED. More...
 
class  PAIntegrator
 
class  PAMassIntegrator
 Represent a MassIntegrator with AssemblyLevel::Partial using libCEED. More...
 
class  ParAlgebraicCoarseSpace
 Parallel version of AlgebraicCoarseSpace. More...
 
class  PAVectorConvectionNLFIntegrator
 
struct  QuadCoefficient
 
struct  RestrHash
 
struct  VariableCoefficient
 

Typedefs

using BasisKey
 
using BasisMap = std::unordered_map<const BasisKey, CeedBasis, BasisHash>
 
using RestrKey
 
using RestrMap
 

Enumerations

enum class  EvalMode { None , Interp , Grad , InterpAndGrad }
 
enum  restr_type { Standard , Strided , Coeff }
 

Functions

void InitBasis (const FiniteElementSpace &fes, const IntegrationRule &ir, Ceed ceed, CeedBasis *basis)
 Initialize a CeedBasis for non-mixed meshes.
 
void InitBasisWithIndices (const FiniteElementSpace &fes, const IntegrationRule &ir, int nelem, const int *indices, Ceed ceed, CeedBasis *basis)
 Initialize a CeedBasis for mixed meshes.
 
template<typename Context >
void InitCoefficient (mfem::Coefficient *Q, mfem::Mesh &mesh, const mfem::IntegrationRule &ir, Coefficient *&coeff_ptr, Context &ctx)
 Initializes an mfem::ceed::Coefficient coeff_ptr from an mfem::Coefficient Q, an mfem::Mesh mesh, and an mfem::IntegrationRule ir.
 
template<typename Context >
void InitCoefficient (mfem::VectorCoefficient *VQ, mfem::Mesh &mesh, const mfem::IntegrationRule &ir, Coefficient *&coeff_ptr, Context &ctx)
 Initializes an mfem::ceed::Coefficient coeff_ptr from an mfem::VectorCoefficient VQ, an mfem::Mesh mesh, and an mfem::IntegrationRule ir.
 
template<typename Context >
void InitCoefficientWithIndices (mfem::Coefficient *Q, mfem::Mesh &mesh, const mfem::IntegrationRule &ir, int nelem, const int *indices, Coefficient *&coeff_ptr, Context &ctx)
 Initializes an mfem::ceed::Coefficient coeff_ptr from an mfem::Coefficient Q, an mfem::Mesh mesh, and an mfem::IntegrationRule ir for the elements given by the indices indices.
 
template<typename Context >
void InitCoefficientWithIndices (mfem::VectorCoefficient *VQ, mfem::Mesh &mesh, const mfem::IntegrationRule &ir, int nelem, const int *indices, Coefficient *&coeff_ptr, Context &ctx)
 Initializes an mfem::ceed::Coefficient coeff_ptr from an mfem::VectorCoefficient Q, an mfem::Mesh mesh, and an mfem::IntegrationRule ir for the elements given by the indices indices.
 
template<typename Coeff , typename Context >
void InitCoefficient (Coeff *Q, mfem::Mesh &mesh, const mfem::IntegrationRule &ir, int nelem, const int *indices, Coefficient *&coeff_ptr, Context &ctx)
 
void InitStridedRestriction (const mfem::FiniteElementSpace &fes, CeedInt nelem, CeedInt nqpts, CeedInt qdatasize, const CeedInt *strides, CeedElemRestriction *restr)
 Initialize a strided CeedElemRestriction.
 
void InitRestriction (const FiniteElementSpace &fes, Ceed ceed, CeedElemRestriction *restr)
 Initialize a CeedElemRestriction for non-mixed meshes.
 
void InitRestrictionWithIndices (const FiniteElementSpace &fes, int nelem, const int *indices, Ceed ceed, CeedElemRestriction *restr)
 Initialize a CeedElemRestriction for mixed meshes.
 
void InitCoeffRestrictionWithIndices (const FiniteElementSpace &fes, int nelem, const int *indices, int nquads, int ncomp, Ceed ceed, CeedElemRestriction *restr)
 Initialize a CeedElemRestriction for a mfem::Coefficient on a mixed mesh.
 
void RemoveBasisAndRestriction (const mfem::FiniteElementSpace *fes)
 Remove from ceed_basis_map and ceed_restr_map the entries associated with the given fes.
 
void InitVector (const mfem::Vector &v, CeedVector &cv)
 Initialize a CeedVector from an mfem::Vector.
 
void InitBasisAndRestriction (const mfem::FiniteElementSpace &fes, const mfem::IntegrationRule &ir, Ceed ceed, CeedBasis *basis, CeedElemRestriction *restr)
 Initialize a CeedBasis and a CeedElemRestriction based on an mfem::FiniteElementSpace fes, and an mfem::IntegrationRule ir.
 
void InitBasisAndRestrictionWithIndices (const FiniteElementSpace &fes, const IntegrationRule &irm, int nelem, const int *indices, Ceed ceed, CeedBasis *basis, CeedElemRestriction *restr)
 
void InitBasisAndRestriction (const FiniteElementSpace &fes, const IntegrationRule &ir, int nelem, const int *indices, Ceed ceed, CeedBasis *basis, CeedElemRestriction *restr)
 Initialize a CeedBasis and a CeedElemRestriction based on an mfem::FiniteElementSpace fes, and an mfem::IntegrationRule ir, and a list of nelem elements of indices indices.
 
int CeedOperatorGetActiveField (CeedOperator oper, CeedOperatorField *field)
 
template<>
const IntegrationRuleGetRule< MassIntegrator > (const MassIntegrator &integ, const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &trans)
 
template<>
const IntegrationRuleGetRule< VectorMassIntegrator > (const VectorMassIntegrator &integ, const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &trans)
 
template<>
const IntegrationRuleGetRule< ConvectionIntegrator > (const ConvectionIntegrator &integ, const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &trans)
 
template<>
const IntegrationRuleGetRule< VectorConvectionNLFIntegrator > (const VectorConvectionNLFIntegrator &integ, const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &trans)
 
template<>
const IntegrationRuleGetRule< DiffusionIntegrator > (const DiffusionIntegrator &integ, const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &trans)
 
template<>
const IntegrationRuleGetRule< VectorDiffusionIntegrator > (const VectorDiffusionIntegrator &integ, const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &trans)
 
const std::string & GetCeedPath ()
 Return the path to the libCEED q-function headers.
 
template<typename Integrator >
const IntegrationRuleGetRule (const Integrator &integ, const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &Trans)
 
template<typename T >
std::size_t CeedHash (const T key)
 Wrapper for std::hash.
 
std::size_t CeedHashCombine (std::size_t seed, std::size_t hash)
 Effective way to combine hashes (from libCEED).
 
int CeedOperatorGetSize (CeedOperator oper, CeedInt *size)
 
SolverBuildSmootherFromCeed (ConstrainedOperator &op, bool chebyshev)
 
void CoarsenEssentialDofs (const mfem::Operator &interp, const Array< int > &ho_ess_tdofs, Array< int > &alg_lo_ess_tdofs)
 
void AddToCompositeOperator (BilinearFormIntegrator *integ, CeedOperator op)
 
CeedOperator CreateCeedCompositeOperatorFromBilinearForm (BilinearForm &form)
 
CeedOperator CoarsenCeedCompositeOperator (CeedOperator op, CeedElemRestriction er, CeedBasis c2f, int order_reduction)
 
int CeedVectorPointwiseMult (CeedVector a, const CeedVector b)
 
int CeedHackReallocArray (size_t n, size_t unit, void *p)
 
int CeedHackFree (void *p)
 
int CeedSingleOperatorFullAssemble (CeedOperator op, SparseMatrix *out)
 
int CeedOperatorFullAssemble (CeedOperator op, SparseMatrix **mat)
 Assembles a CeedOperator as an mfem::SparseMatrix.
 
int coarse_1d_edof (int i, int P1d, int coarse_P1d)
 
int reverse_coarse_1d_edof (int i, int P1d, int coarse_P1d)
 
int min4 (int a, int b, int c, int d)
 
int CeedATPMGElemRestriction (int order, int order_reduction, CeedElemRestriction er_in, CeedElemRestriction *er_out, CeedInt *&dof_map)
 Take given (high-order) CeedElemRestriction and make a new CeedElemRestriction, which corresponds to a lower-order problem.
 
int CeedBasisATPMGCoarseToFine (Ceed ceed, int P1d, int dim, int order_reduction, CeedBasis *basisc2f)
 Create coarse-to-fine basis, given number of input nodes and order reduction.
 
int CeedBasisATPMGCoarseToFine (CeedBasis basisin, CeedBasis *basisc2f, int order_reduction)
 
int CeedBasisATPMGCoarsen (CeedBasis basisin, CeedBasis basisc2f, CeedBasis *basisout, int order_reduction)
 
int CeedATPMGOperator (CeedOperator oper, int order_reduction, CeedElemRestriction coarse_er, CeedBasis coarse_basis_in, CeedBasis basis_ctof_in, CeedOperator *out)
 
int CeedATPMGOperator (CeedOperator oper, int order_reduction, CeedElemRestriction coarse_er, CeedBasis *coarse_basis_out, CeedBasis *basis_ctof_out, CeedOperator *out)
 Coarsen a CeedOperator using semi-algebraic p-multigrid.
 
int CeedOperatorGetOrder (CeedOperator oper, CeedInt *order)
 
int CeedATPMGBundle (CeedOperator oper, int order_reduction, CeedBasis *coarse_basis_out, CeedBasis *basis_ctof_out, CeedElemRestriction *er_out, CeedOperator *coarse_oper, CeedInt *&dof_map)
 Given (fine) CeedOperator, produces everything you need for a coarse level (operator and interpolation).
 
int CeedBasisATPMGCoarsen (CeedBasis basisin, CeedBasis *basisout, CeedBasis *basis_ctof, int order_reduction)
 Given basis basisin, reduces its order by order_reduction and return basisout (which has the same height (Q1d) but is narrower (smaller P1d))
 

Variables

std::string ceed_path
 

Typedef Documentation

◆ BasisKey

Initial value:
std::tuple<const mfem::FiniteElementSpace*,
int, int, int>
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
Definition fespace.hpp:220
Class for an integration rule - an Array of IntegrationPoint.
Definition intrules.hpp:100

Definition at line 127 of file util.hpp.

◆ BasisMap

using mfem::ceed::BasisMap = std::unordered_map<const BasisKey, CeedBasis, BasisHash>

Definition at line 144 of file util.hpp.

◆ RestrKey

Initial value:
std::tuple<const mfem::FiniteElementSpace*, int, int, int, int>

Definition at line 149 of file util.hpp.

◆ RestrMap

Initial value:
std::unordered_map<const RestrKey, CeedElemRestriction, RestrHash>

Definition at line 165 of file util.hpp.

Enumeration Type Documentation

◆ EvalMode

enum class mfem::ceed::EvalMode
strong

The different evaluation modes available for PA and MF CeedIntegrator.

Enumerator
None 
Interp 
Grad 
InterpAndGrad 

Definition at line 31 of file integrator.hpp.

◆ restr_type

Enumerator
Standard 
Strided 
Coeff 

Definition at line 146 of file util.hpp.

Function Documentation

◆ AddToCompositeOperator()

void mfem::ceed::AddToCompositeOperator ( BilinearFormIntegrator * integ,
CeedOperator op )

Definition at line 227 of file algebraic.cpp.

◆ BuildSmootherFromCeed()

Solver * mfem::ceed::BuildSmootherFromCeed ( ConstrainedOperator & op,
bool chebyshev )

Definition at line 109 of file algebraic.cpp.

◆ CeedATPMGBundle()

int mfem::ceed::CeedATPMGBundle ( CeedOperator oper,
int order_reduction,
CeedBasis * coarse_basis_out,
CeedBasis * basis_ctof_out,
CeedElemRestriction * er_out,
CeedOperator * coarse_oper,
CeedInt *& dof_map )

Given (fine) CeedOperator, produces everything you need for a coarse level (operator and interpolation).

Parameters
[in]operFine CeedOperator to coarsen
[in]order_reductionAmount to reduce the order (p) of the operator
[out]coarse_basis_outCeedBasis for coarse operator
[out]basis_ctof_outCeedBasis describing interpolation from coarse to fine
[out]er_outCeedElemRestriction for coarse operator
[out]coarse_opercoarse operator itself
[out]dof_mapmaps high-order ldof to low-order ldof, needed for further coarsening

Definition at line 748 of file solvers-atpmg.cpp.

◆ CeedATPMGElemRestriction()

int mfem::ceed::CeedATPMGElemRestriction ( int order,
int order_reduction,
CeedElemRestriction er_in,
CeedElemRestriction * er_out,
CeedInt *& dof_map )

Take given (high-order) CeedElemRestriction and make a new CeedElemRestriction, which corresponds to a lower-order problem.

Assumes a Gauss-Lobatto basis and tensor product elements, and assumes that the nodes in er_in are ordered in a tensor-product way.

This is a setup routine that operates on the host.

The caller is responsible for freeing er_out and dof_map.

Definition at line 81 of file solvers-atpmg.cpp.

◆ CeedATPMGOperator() [1/2]

int mfem::ceed::CeedATPMGOperator ( CeedOperator oper,
int order_reduction,
CeedElemRestriction coarse_er,
CeedBasis * coarse_basis_out,
CeedBasis * basis_ctof_out,
CeedOperator * out )

Coarsen a CeedOperator using semi-algebraic p-multigrid.

This implementation does not coarsen the integration points at all.

Parameters
[in]operthe operator to coarsen
[in]order_reductionhow much to coarsen (order p)
[in]coarse_erCeedElemRestriction for coarse operator (see CeedATPMGElemRestriction)
[out]coarse_basis_outCeedBasis for coarser operator
[out]basis_ctof_outCeedBasis describing interpolation from coarse to fine
[out]outcoarsened CeedOperator

Definition at line 706 of file solvers-atpmg.cpp.

◆ CeedATPMGOperator() [2/2]

int mfem::ceed::CeedATPMGOperator ( CeedOperator oper,
int order_reduction,
CeedElemRestriction coarse_er,
CeedBasis coarse_basis_in,
CeedBasis basis_ctof_in,
CeedOperator * out )

Definition at line 585 of file solvers-atpmg.cpp.

◆ CeedBasisATPMGCoarsen() [1/2]

int mfem::ceed::CeedBasisATPMGCoarsen ( CeedBasis basisin,
CeedBasis * basisout,
CeedBasis * basis_ctof,
int order_reduction )

Given basis basisin, reduces its order by order_reduction and return basisout (which has the same height (Q1d) but is narrower (smaller P1d))

The algorithm takes the locations of the fine nodes as input, but this particular implementation simply assumes Gauss-Lobatto, and furthermore assumes the MFEM [0, 1] reference element (rather than the Ceed/Petsc [-1, 1] element)

◆ CeedBasisATPMGCoarsen() [2/2]

int mfem::ceed::CeedBasisATPMGCoarsen ( CeedBasis basisin,
CeedBasis basisc2f,
CeedBasis * basisout,
int order_reduction )

Definition at line 514 of file solvers-atpmg.cpp.

◆ CeedBasisATPMGCoarseToFine() [1/2]

int mfem::ceed::CeedBasisATPMGCoarseToFine ( Ceed ceed,
int P1d,
int dim,
int order_reduction,
CeedBasis * basisc2f )

Create coarse-to-fine basis, given number of input nodes and order reduction.

Assumes Gauss-Lobatto basis. This is useful because it does not require an input CeedBasis object, which depends on choice of quadrature rule, whereas the coarse-to-fine operator is independent of quadrature.

Definition at line 486 of file solvers-atpmg.cpp.

◆ CeedBasisATPMGCoarseToFine() [2/2]

int mfem::ceed::CeedBasisATPMGCoarseToFine ( CeedBasis basisin,
CeedBasis * basisc2f,
int order_reduction )

Definition at line 498 of file solvers-atpmg.cpp.

◆ CeedHackFree()

int mfem::ceed::CeedHackFree ( void * p)

Definition at line 37 of file full-assembly.cpp.

◆ CeedHackReallocArray()

int mfem::ceed::CeedHackReallocArray ( size_t n,
size_t unit,
void * p )

Definition at line 26 of file full-assembly.cpp.

◆ CeedHash()

template<typename T >
std::size_t mfem::ceed::CeedHash ( const T key)
inline

Wrapper for std::hash.

Definition at line 113 of file util.hpp.

◆ CeedHashCombine()

std::size_t mfem::ceed::CeedHashCombine ( std::size_t seed,
std::size_t hash )
inline

Effective way to combine hashes (from libCEED).

Definition at line 119 of file util.hpp.

◆ CeedOperatorFullAssemble()

int mfem::ceed::CeedOperatorFullAssemble ( CeedOperator op,
SparseMatrix ** mat )

Assembles a CeedOperator as an mfem::SparseMatrix.

In parallel, this assembles independently on each processor, that is, it assembles at the L-vector level. The assembly procedure is always performed on the host, but this works also for operators stored on device by copying memory.

Definition at line 294 of file full-assembly.cpp.

◆ CeedOperatorGetActiveField()

int mfem::ceed::CeedOperatorGetActiveField ( CeedOperator oper,
CeedOperatorField * field )

Definition at line 131 of file util.cpp.

◆ CeedOperatorGetOrder()

int mfem::ceed::CeedOperatorGetOrder ( CeedOperator oper,
CeedInt * order )

Definition at line 733 of file solvers-atpmg.cpp.

◆ CeedOperatorGetSize()

int mfem::ceed::CeedOperatorGetSize ( CeedOperator oper,
CeedInt * size )

assumes a square operator (you could do rectangular, you'd have to find separate active input and output fields/restrictions)

Definition at line 98 of file algebraic.cpp.

◆ CeedSingleOperatorFullAssemble()

int mfem::ceed::CeedSingleOperatorFullAssemble ( CeedOperator op,
SparseMatrix * out )

Definition at line 44 of file full-assembly.cpp.

◆ CeedVectorPointwiseMult()

int mfem::ceed::CeedVectorPointwiseMult ( CeedVector a,
const CeedVector b )

a = a (pointwise*) b

Definition at line 495 of file algebraic.cpp.

◆ coarse_1d_edof()

int mfem::ceed::coarse_1d_edof ( int i,
int P1d,
int coarse_P1d )

Definition at line 33 of file solvers-atpmg.cpp.

◆ CoarsenCeedCompositeOperator()

CeedOperator mfem::ceed::CoarsenCeedCompositeOperator ( CeedOperator op,
CeedElemRestriction er,
CeedBasis c2f,
int order_reduction )

Definition at line 261 of file algebraic.cpp.

◆ CoarsenEssentialDofs()

void mfem::ceed::CoarsenEssentialDofs ( const mfem::Operator & interp,
const Array< int > & ho_ess_tdofs,
Array< int > & alg_lo_ess_tdofs )

Definition at line 204 of file algebraic.cpp.

◆ CreateCeedCompositeOperatorFromBilinearForm()

CeedOperator mfem::ceed::CreateCeedCompositeOperatorFromBilinearForm ( BilinearForm & form)

Definition at line 239 of file algebraic.cpp.

◆ GetCeedPath()

const std::string & mfem::ceed::GetCeedPath ( )

Return the path to the libCEED q-function headers.

Definition at line 255 of file util.cpp.

◆ GetRule()

template<typename Integrator >
const IntegrationRule & mfem::ceed::GetRule ( const Integrator & integ,
const FiniteElement & trial_fe,
const FiniteElement & test_fe,
ElementTransformation & Trans )

◆ GetRule< ConvectionIntegrator >()

template<>
const IntegrationRule & mfem::ceed::GetRule< ConvectionIntegrator > ( const ConvectionIntegrator & integ,
const FiniteElement & trial_fe,
const FiniteElement & test_fe,
ElementTransformation & trans )

Definition at line 214 of file util.cpp.

◆ GetRule< DiffusionIntegrator >()

template<>
const IntegrationRule & mfem::ceed::GetRule< DiffusionIntegrator > ( const DiffusionIntegrator & integ,
const FiniteElement & trial_fe,
const FiniteElement & test_fe,
ElementTransformation & trans )

Definition at line 234 of file util.cpp.

◆ GetRule< MassIntegrator >()

template<>
const IntegrationRule & mfem::ceed::GetRule< MassIntegrator > ( const MassIntegrator & integ,
const FiniteElement & trial_fe,
const FiniteElement & test_fe,
ElementTransformation & trans )

Definition at line 194 of file util.cpp.

◆ GetRule< VectorConvectionNLFIntegrator >()

template<>
const IntegrationRule & mfem::ceed::GetRule< VectorConvectionNLFIntegrator > ( const VectorConvectionNLFIntegrator & integ,
const FiniteElement & trial_fe,
const FiniteElement & test_fe,
ElementTransformation & trans )

Definition at line 224 of file util.cpp.

◆ GetRule< VectorDiffusionIntegrator >()

template<>
const IntegrationRule & mfem::ceed::GetRule< VectorDiffusionIntegrator > ( const VectorDiffusionIntegrator & integ,
const FiniteElement & trial_fe,
const FiniteElement & test_fe,
ElementTransformation & trans )

Definition at line 244 of file util.cpp.

◆ GetRule< VectorMassIntegrator >()

template<>
const IntegrationRule & mfem::ceed::GetRule< VectorMassIntegrator > ( const VectorMassIntegrator & integ,
const FiniteElement & trial_fe,
const FiniteElement & test_fe,
ElementTransformation & trans )

Definition at line 204 of file util.cpp.

◆ InitBasis()

void mfem::ceed::InitBasis ( const FiniteElementSpace & fes,
const IntegrationRule & ir,
Ceed ceed,
CeedBasis * basis )

Initialize a CeedBasis for non-mixed meshes.

Parameters
[in]fesInput finite element space.
[in]irInput integration rule.
[in]ceedInput Ceed object.
[out]basisThe address of the initialized CeedBasis object.

Definition at line 134 of file basis.cpp.

◆ InitBasisAndRestriction() [1/2]

void mfem::ceed::InitBasisAndRestriction ( const FiniteElementSpace & fes,
const IntegrationRule & ir,
int nelem,
const int * indices,
Ceed ceed,
CeedBasis * basis,
CeedElemRestriction * restr )

Initialize a CeedBasis and a CeedElemRestriction based on an mfem::FiniteElementSpace fes, and an mfem::IntegrationRule ir, and a list of nelem elements of indices indices.

Parameters
[in]fesThe finite element space.
[in]irThe integration rule.
[in]nelemThe number of elements.
[in]indicesThe indices of the elements of same type in the FiniteElementSpace. If indices == nullptr, assumes that the FiniteElementSpace is not mixed.
[in]ceedThe Ceed object.
[out]basisThe CeedBasis to initialize.
[out]restrThe CeedElemRestriction to initialize.

Definition at line 113 of file util.cpp.

◆ InitBasisAndRestriction() [2/2]

void mfem::ceed::InitBasisAndRestriction ( const mfem::FiniteElementSpace & fes,
const mfem::IntegrationRule & ir,
Ceed ceed,
CeedBasis * basis,
CeedElemRestriction * restr )

Initialize a CeedBasis and a CeedElemRestriction based on an mfem::FiniteElementSpace fes, and an mfem::IntegrationRule ir.

Parameters
[in]fesThe finite element space.
[in]irThe integration rule.
[in]ceedThe Ceed object.
[out]basisThe CeedBasis to initialize.
[out]restrThe CeedElemRestriction to initialize.
Warning
Only for non-mixed finite element spaces.

Definition at line 93 of file util.cpp.

◆ InitBasisAndRestrictionWithIndices()

void mfem::ceed::InitBasisAndRestrictionWithIndices ( const FiniteElementSpace & fes,
const IntegrationRule & irm,
int nelem,
const int * indices,
Ceed ceed,
CeedBasis * basis,
CeedElemRestriction * restr )

Definition at line 102 of file util.cpp.

◆ InitBasisWithIndices()

void mfem::ceed::InitBasisWithIndices ( const FiniteElementSpace & fes,
const IntegrationRule & ir,
int nelem,
const int * indices,
Ceed ceed,
CeedBasis * basis )

Initialize a CeedBasis for mixed meshes.

Parameters
[in]fesThe finite element space.
[in]iris the integration rule for the operator.
[in]nelemThe number of elements.
[in]indicesThe indices of the elements of same type in the FiniteElementSpace.
[in]ceedThe Ceed object.
[out]basisThe CeedBasis to initialize.

Definition at line 142 of file basis.cpp.

◆ InitCoefficient() [1/3]

template<typename Coeff , typename Context >
void mfem::ceed::InitCoefficient ( Coeff * Q,
mfem::Mesh & mesh,
const mfem::IntegrationRule & ir,
int nelem,
const int * indices,
Coefficient *& coeff_ptr,
Context & ctx )

Definition at line 422 of file coefficient.hpp.

◆ InitCoefficient() [2/3]

template<typename Context >
void mfem::ceed::InitCoefficient ( mfem::Coefficient * Q,
mfem::Mesh & mesh,
const mfem::IntegrationRule & ir,
Coefficient *& coeff_ptr,
Context & ctx )

Initializes an mfem::ceed::Coefficient coeff_ptr from an mfem::Coefficient Q, an mfem::Mesh mesh, and an mfem::IntegrationRule ir.

Parameters
[in]Qis the coefficient from the Integrator.
[in]meshis the mesh.
[in]iris the integration rule.
[out]coeff_ptris the structure to store the coefficient for the CeedOperator.
[out]ctxis the Context associated to the QFunction.

Definition at line 91 of file coefficient.hpp.

◆ InitCoefficient() [3/3]

template<typename Context >
void mfem::ceed::InitCoefficient ( mfem::VectorCoefficient * VQ,
mfem::Mesh & mesh,
const mfem::IntegrationRule & ir,
Coefficient *& coeff_ptr,
Context & ctx )

Initializes an mfem::ceed::Coefficient coeff_ptr from an mfem::VectorCoefficient VQ, an mfem::Mesh mesh, and an mfem::IntegrationRule ir.

Parameters
[in]VQis the vector coefficient from the Integrator.
[in]meshis the mesh.
[in]iris the integration rule.
[out]coeff_ptris the structure to store the coefficient for the CeedOperator.
[out]ctxis the Context associated to the QFunction.

Definition at line 165 of file coefficient.hpp.

◆ InitCoefficientWithIndices() [1/2]

template<typename Context >
void mfem::ceed::InitCoefficientWithIndices ( mfem::Coefficient * Q,
mfem::Mesh & mesh,
const mfem::IntegrationRule & ir,
int nelem,
const int * indices,
Coefficient *& coeff_ptr,
Context & ctx )

Initializes an mfem::ceed::Coefficient coeff_ptr from an mfem::Coefficient Q, an mfem::Mesh mesh, and an mfem::IntegrationRule ir for the elements given by the indices indices.

Parameters
[in]Qis the coefficient from the Integrator.
[in]meshis the mesh.
[in]iris the integration rule.
[in]nelemThe number of elements.
[in]indicesThe indices of the elements of same type in the FiniteElementSpace.
[out]coeff_ptris the structure to store the coefficient for the CeedOperator.
[out]ctxis the Context associated to the QFunction.

Definition at line 247 of file coefficient.hpp.

◆ InitCoefficientWithIndices() [2/2]

template<typename Context >
void mfem::ceed::InitCoefficientWithIndices ( mfem::VectorCoefficient * VQ,
mfem::Mesh & mesh,
const mfem::IntegrationRule & ir,
int nelem,
const int * indices,
Coefficient *& coeff_ptr,
Context & ctx )

Initializes an mfem::ceed::Coefficient coeff_ptr from an mfem::VectorCoefficient Q, an mfem::Mesh mesh, and an mfem::IntegrationRule ir for the elements given by the indices indices.

Parameters
[in]VQis the vector coefficient from the Integrator.
[in]meshis the mesh.
[in]iris the integration rule.
[in]nelemThe number of elements.
[in]indicesThe indices of the elements of same type in the FiniteElementSpace.
[out]coeff_ptris the structure to store the coefficient for the CeedOperator.
[out]ctxis the Context associated to the QFunction.

Definition at line 337 of file coefficient.hpp.

◆ InitCoeffRestrictionWithIndices()

void mfem::ceed::InitCoeffRestrictionWithIndices ( const FiniteElementSpace & fes,
int nelem,
const int * indices,
int nquads,
int ncomp,
Ceed ceed,
CeedElemRestriction * restr )

Initialize a CeedElemRestriction for a mfem::Coefficient on a mixed mesh.

Parameters
[in]fesThe finite element space.
[in]nelemis the number of elements.
[in]indicesThe indices of the elements of same type in the FiniteElementSpace.
[in]nquadsis the total number of quadrature points
[in]ncompis the number of data per quadrature point
[in]ceedThe Ceed object.
[out]restrThe CeedElemRestriction to initialize.

Definition at line 272 of file restriction.cpp.

◆ InitRestriction()

void mfem::ceed::InitRestriction ( const FiniteElementSpace & fes,
Ceed ceed,
CeedElemRestriction * restr )

Initialize a CeedElemRestriction for non-mixed meshes.

Parameters
[in]fesInput finite element space.
[in]ceedInput Ceed object.
[out]restrThe address of the initialized CeedElemRestriction object.

Definition at line 223 of file restriction.cpp.

◆ InitRestrictionWithIndices()

void mfem::ceed::InitRestrictionWithIndices ( const FiniteElementSpace & fes,
int nelem,
const int * indices,
Ceed ceed,
CeedElemRestriction * restr )

Initialize a CeedElemRestriction for mixed meshes.

Parameters
[in]fesThe finite element space.
[in]ceedThe Ceed object.
[in]nelemThe number of elements.
[in]indicesThe indices of the elements of same type in the FiniteElementSpace.
[out]restrThe CeedElemRestriction to initialize.

Definition at line 247 of file restriction.cpp.

◆ InitStridedRestriction()

void mfem::ceed::InitStridedRestriction ( const mfem::FiniteElementSpace & fes,
CeedInt nelem,
CeedInt nqpts,
CeedInt qdatasize,
const CeedInt * strides,
CeedElemRestriction * restr )

Initialize a strided CeedElemRestriction.

Parameters
[in]fesInput finite element space.
[in]nelemis the number of elements.
[in]nqptsis the total number of quadrature points.
[in]qdatasizeis the number of data per quadrature point.
[in]stridesArray for strides between [nodes, components, elements]. Data for node i, component j, element k can be found in the L-vector at index i*strides[0] + j*strides[1] + k*strides[2]. CEED_STRIDES_BACKEND may be used with vectors created by a Ceed backend.
[out]restrThe CeedElemRestriction to initialize.

Definition at line 201 of file restriction.cpp.

◆ InitVector()

void mfem::ceed::InitVector ( const mfem::Vector & v,
CeedVector & cv )

Initialize a CeedVector from an mfem::Vector.

Definition at line 75 of file util.cpp.

◆ min4()

int mfem::ceed::min4 ( int a,
int b,
int c,
int d )

Definition at line 61 of file solvers-atpmg.cpp.

◆ RemoveBasisAndRestriction()

void mfem::ceed::RemoveBasisAndRestriction ( const mfem::FiniteElementSpace * fes)

Remove from ceed_basis_map and ceed_restr_map the entries associated with the given fes.

Definition at line 41 of file util.cpp.

◆ reverse_coarse_1d_edof()

int mfem::ceed::reverse_coarse_1d_edof ( int i,
int P1d,
int coarse_P1d )

Definition at line 43 of file solvers-atpmg.cpp.

Variable Documentation

◆ ceed_path

std::string mfem::ceed::ceed_path

Definition at line 253 of file util.cpp.