MFEM  v4.1.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
mfem::QuadratureInterpolator Class Reference

A class that performs interpolation from an E-vector to quadrature point values and/or derivatives (Q-vectors). More...

#include <quadinterpolator.hpp>

Collaboration diagram for mfem::QuadratureInterpolator:
[legend]

Public Types

enum  EvalFlags { VALUES = 1 << 0, DERIVATIVES = 1 << 1, DETERMINANTS = 1 << 2 }
 

Public Member Functions

 QuadratureInterpolator (const FiniteElementSpace &fes, const IntegrationRule &ir)
 
 QuadratureInterpolator (const FiniteElementSpace &fes, const QuadratureSpace &qs)
 
void DisableTensorProducts (bool disable=true) const
 Disable the use of tensor product evaluations, for tensor-product elements, e.g. quads and hexes. More...
 
QVectorLayout GetOutputLayout () const
 Query the current output Q-vector layout. The default value is QVectorLayout::byNODES. More...
 
void SetOutputLayout (QVectorLayout out_layout) const
 Set the desired output Q-vector layout. The default value is QVectorLayout::byNODES. More...
 
void Mult (const Vector &e_vec, unsigned eval_flags, Vector &q_val, Vector &q_der, Vector &q_det) const
 Interpolate the E-vector e_vec to quadrature points. More...
 
void Values (const Vector &e_vec, Vector &q_val) const
 Interpolate the values of the E-vector e_vec at quadrature points. More...
 
void Derivatives (const Vector &e_vec, Vector &q_der) const
 Interpolate the derivatives of the E-vector e_vec at quadrature points. More...
 
void PhysDerivatives (const Vector &e_vec, Vector &q_der) const
 Interpolate the derivatives in physical space of the E-vector e_vec at quadrature points. More...
 
void MultTranspose (unsigned eval_flags, const Vector &q_val, const Vector &q_der, Vector &e_vec) const
 Perform the transpose operation of Mult(). (TODO) More...
 

Static Public Member Functions

template<const int T_VDIM = 0, const int T_ND = 0, const int T_NQ = 0>
static void Eval2D (const int NE, const int vdim, const DofToQuad &maps, const Vector &e_vec, Vector &q_val, Vector &q_der, Vector &q_det, const int eval_flags)
 Template compute kernel for 2D. More...
 
template<const int T_VDIM = 0, const int T_ND = 0, const int T_NQ = 0>
static void Eval3D (const int NE, const int vdim, const DofToQuad &maps, const Vector &e_vec, Vector &q_val, Vector &q_der, Vector &q_det, const int eval_flags)
 Template compute kernel for 3D. More...
 

Protected Attributes

const FiniteElementSpacefespace
 Not owned. More...
 
const QuadratureSpaceqspace
 Not owned. More...
 
const IntegrationRuleIntRule
 Not owned. More...
 
QVectorLayout q_layout
 Output Q-vector layout. More...
 
bool use_tensor_products
 

Static Protected Attributes

static const int MAX_NQ2D = 100
 
static const int MAX_ND2D = 100
 
static const int MAX_VDIM2D = 2
 
static const int MAX_NQ3D = 1000
 
static const int MAX_ND3D = 1000
 
static const int MAX_VDIM3D = 3
 

Friends

class FiniteElementSpace
 

Detailed Description

A class that performs interpolation from an E-vector to quadrature point values and/or derivatives (Q-vectors).

An E-vector represents the element-wise discontinuous version of the FE space and can be obtained, for example, from a GridFunction using the Operator returned by FiniteElementSpace::GetElementRestriction().

The target quadrature points in the elements can be described either by an IntegrationRule (all mesh elements must be of the same type in this case) or by a QuadratureSpace.

Definition at line 36 of file quadinterpolator.hpp.

Member Enumeration Documentation

Enumerator
VALUES 

Evaluate the values at quadrature points.

DERIVATIVES 

Evaluate the derivatives at quadrature points.

DETERMINANTS 

Assuming the derivative at quadrature points form a matrix, this flag can be used to compute and store their determinants. This flag can only be used in Mult().

Definition at line 57 of file quadinterpolator.hpp.

Constructor & Destructor Documentation

mfem::QuadratureInterpolator::QuadratureInterpolator ( const FiniteElementSpace fes,
const IntegrationRule ir 
)

Definition at line 20 of file quadinterpolator.cpp.

mfem::QuadratureInterpolator::QuadratureInterpolator ( const FiniteElementSpace fes,
const QuadratureSpace qs 
)

Definition at line 35 of file quadinterpolator.cpp.

Member Function Documentation

void mfem::QuadratureInterpolator::Derivatives ( const Vector e_vec,
Vector q_der 
) const

Interpolate the derivatives of the E-vector e_vec at quadrature points.

Definition at line 1284 of file quadinterpolator.cpp.

void mfem::QuadratureInterpolator::DisableTensorProducts ( bool  disable = true) const
inline

Disable the use of tensor product evaluations, for tensor-product elements, e.g. quads and hexes.

Currently, tensor product evaluations are not implemented and this method has no effect.

Definition at line 77 of file quadinterpolator.hpp.

template<const int T_VDIM, const int T_ND, const int T_NQ>
void mfem::QuadratureInterpolator::Eval2D ( const int  NE,
const int  vdim,
const DofToQuad maps,
const Vector e_vec,
Vector q_val,
Vector q_der,
Vector q_det,
const int  eval_flags 
)
static

Template compute kernel for 2D.

Definition at line 51 of file quadinterpolator.cpp.

template<const int T_VDIM, const int T_ND, const int T_NQ>
void mfem::QuadratureInterpolator::Eval3D ( const int  NE,
const int  vdim,
const DofToQuad maps,
const Vector e_vec,
Vector q_val,
Vector q_der,
Vector q_det,
const int  eval_flags 
)
static

Template compute kernel for 3D.

Definition at line 139 of file quadinterpolator.cpp.

QVectorLayout mfem::QuadratureInterpolator::GetOutputLayout ( ) const
inline

Query the current output Q-vector layout. The default value is QVectorLayout::byNODES.

Definition at line 82 of file quadinterpolator.hpp.

void mfem::QuadratureInterpolator::Mult ( const Vector e_vec,
unsigned  eval_flags,
Vector q_val,
Vector q_der,
Vector q_det 
) const

Interpolate the E-vector e_vec to quadrature points.

The eval_flags are a bitwise mask of constants from the EvalFlags enumeration. When the VALUES flag is set, the values at quadrature points are computed and stored in the Vector q_val. Similarly, when the flag DERIVATIVES is set, the derivatives are computed and stored in q_der. When the DETERMINANTS flags is set, it is assumed that the derivatives form a matrix at each quadrature point (i.e. the associated FiniteElementSpace is a vector space) and their determinants are computed and stored in q_det.

Definition at line 229 of file quadinterpolator.cpp.

void mfem::QuadratureInterpolator::MultTranspose ( unsigned  eval_flags,
const Vector q_val,
const Vector q_der,
Vector e_vec 
) const

Perform the transpose operation of Mult(). (TODO)

Definition at line 383 of file quadinterpolator.cpp.

void mfem::QuadratureInterpolator::PhysDerivatives ( const Vector e_vec,
Vector q_der 
) const

Interpolate the derivatives in physical space of the E-vector e_vec at quadrature points.

Definition at line 1302 of file quadinterpolator.cpp.

void mfem::QuadratureInterpolator::SetOutputLayout ( QVectorLayout  out_layout) const
inline

Set the desired output Q-vector layout. The default value is QVectorLayout::byNODES.

Definition at line 86 of file quadinterpolator.hpp.

void mfem::QuadratureInterpolator::Values ( const Vector e_vec,
Vector q_val 
) const

Interpolate the values of the E-vector e_vec at quadrature points.

Definition at line 649 of file quadinterpolator.cpp.

Friends And Related Function Documentation

friend class FiniteElementSpace
friend

Definition at line 39 of file quadinterpolator.hpp.

Member Data Documentation

const FiniteElementSpace* mfem::QuadratureInterpolator::fespace
protected

Not owned.

Definition at line 41 of file quadinterpolator.hpp.

const IntegrationRule* mfem::QuadratureInterpolator::IntRule
protected

Not owned.

Definition at line 43 of file quadinterpolator.hpp.

const int mfem::QuadratureInterpolator::MAX_ND2D = 100
staticprotected

Definition at line 49 of file quadinterpolator.hpp.

const int mfem::QuadratureInterpolator::MAX_ND3D = 1000
staticprotected

Definition at line 53 of file quadinterpolator.hpp.

const int mfem::QuadratureInterpolator::MAX_NQ2D = 100
staticprotected

Definition at line 48 of file quadinterpolator.hpp.

const int mfem::QuadratureInterpolator::MAX_NQ3D = 1000
staticprotected

Definition at line 52 of file quadinterpolator.hpp.

const int mfem::QuadratureInterpolator::MAX_VDIM2D = 2
staticprotected

Definition at line 50 of file quadinterpolator.hpp.

const int mfem::QuadratureInterpolator::MAX_VDIM3D = 3
staticprotected

Definition at line 54 of file quadinterpolator.hpp.

QVectorLayout mfem::QuadratureInterpolator::q_layout
mutableprotected

Output Q-vector layout.

Definition at line 44 of file quadinterpolator.hpp.

const QuadratureSpace* mfem::QuadratureInterpolator::qspace
protected

Not owned.

Definition at line 42 of file quadinterpolator.hpp.

bool mfem::QuadratureInterpolator::use_tensor_products
mutableprotected

Definition at line 46 of file quadinterpolator.hpp.


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