MFEM  v4.4.0 Finite element discretization library

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

#include <quadinterpolator.hpp>

[legend]

## Public Types

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

## Public Member Functions

QuadratureInterpolator (const FiniteElementSpace &fes, const IntegrationRule &ir)

void DisableTensorProducts (bool disable=true) const
Disable the use of tensor product evaluations, for tensor-product elements, e.g. quads and hexes. By default, tensor product evaluations are enabled. More...

void EnableTensorProducts () const
Enable the use of tensor product evaluations, for tensor-product elements, e.g. quads and hexes. By default, this option is enabled. More...

bool UsesTensorProducts () const
Query the current tensor product evaluation mode. More...

QVectorLayout GetOutputLayout () const
Query the current output Q-vector layout. The default value is QVectorLayout::byNODES. More...

void SetOutputLayout (QVectorLayout 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 (with respect to reference coordinates) 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 Determinants (const Vector &e_vec, Vector &q_det) const
Compute the determinants of the derivatives (with respect to reference coordinates) 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 Attributes

static const int MAX_NQ2D = 100

static const int MAX_ND2D = 100

static const int MAX_VDIM2D = 3

static const int MAX_NQ3D = 1000

static const int MAX_ND3D = 1000

static const int MAX_VDIM3D = 3

## Protected Attributes

const FiniteElementSpacefespace
Not owned. More...

Not owned. More...

const IntegrationRuleIntRule
Not owned. More...

QVectorLayout q_layout
Output Q-vector layout. More...

bool use_tensor_products
Tensor product evaluation mode. More...

Vector d_buffer
Auxiliary device buffer. More...

## 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().

PHYSICAL_DERIVATIVES

Evaluate the physical derivatives.

Definition at line 58 of file quadinterpolator.hpp.

## Constructor & Destructor Documentation

Definition at line 21 of file quadinterpolator.cpp.

Definition at line 37 of file quadinterpolator.cpp.

## Member Function Documentation

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

Interpolate the derivatives (with respect to reference coordinates) of the E-vector e_vec at quadrature points.

Definition at line 617 of file quadinterpolator.cpp.

 void mfem::QuadratureInterpolator::Determinants ( const Vector & e_vec, Vector & q_det ) const

Compute the determinants of the derivatives (with respect to reference coordinates) of the E-vector e_vec at quadrature points.

Definition at line 631 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. By default, tensor product evaluations are enabled.

EnableTensorProducts(), UsesTensorProducts().

Definition at line 79 of file quadinterpolator.hpp.

inline

Enable the use of tensor product evaluations, for tensor-product elements, e.g. quads and hexes. By default, this option is enabled.

DisableTensorProducts(), UsesTensorProducts().

Definition at line 85 of file quadinterpolator.hpp.

inline

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

SetOutputLayout().

Definition at line 94 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 one of the flags DERIVATIVES or PHYSICAL_DERIVATIVES is set, the derivatives (with respect to reference or physical coordinates, respectively) are computed and stored in q_der. Only one of the flags DERIVATIVES or PHYSICAL_DERIVATIVES can be set in a call. When the DETERMINANTS flag is set, it is assumed that the derivatives (with respect to reference coordinates) 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.

The layout of the input E-vector, e_vec, must be consistent with the evaluation mode: if tensor-product evaluations are enabled, then tensor-product elements, must use the ElementDofOrdering::LEXICOGRAPHIC layout; otherwise – ElementDofOrdering::NATIVE layout. See FiniteElementSpace::GetElementRestriction().

Definition at line 370 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 598 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 624 of file quadinterpolator.cpp.

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

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

GetOutputLayout().

Definition at line 99 of file quadinterpolator.hpp.

inline

Query the current tensor product evaluation mode.

DisableTensorProducts(), EnableTensorProducts().

Definition at line 89 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 610 of file quadinterpolator.cpp.

## Friends And Related Function Documentation

 friend class FiniteElementSpace
friend

Definition at line 39 of file quadinterpolator.hpp.

## Member Data Documentation

mutableprotected

Auxiliary device buffer.

Definition at line 47 of file quadinterpolator.hpp.

protected

Not owned.

Definition at line 41 of file quadinterpolator.hpp.

protected

Not owned.

Definition at line 43 of file quadinterpolator.hpp.

static

Definition at line 51 of file quadinterpolator.hpp.

static

Definition at line 55 of file quadinterpolator.hpp.

static

Definition at line 50 of file quadinterpolator.hpp.

static

Definition at line 54 of file quadinterpolator.hpp.

static

Definition at line 52 of file quadinterpolator.hpp.

static

Definition at line 56 of file quadinterpolator.hpp.

mutableprotected

Output Q-vector layout.

Definition at line 44 of file quadinterpolator.hpp.

protected

Not owned.

Definition at line 42 of file quadinterpolator.hpp.