MFEM v4.7.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>
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) | |
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. By default, tensor product evaluations are enabled. | |
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. | |
bool | UsesTensorProducts () const |
Query the current tensor product evaluation mode. | |
QVectorLayout | GetOutputLayout () const |
Query the current output Q-vector layout. The default value is QVectorLayout::byNODES. | |
void | SetOutputLayout (QVectorLayout layout) const |
Set the desired output Q-vector layout. The default value is QVectorLayout::byNODES. | |
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. | |
void | Values (const Vector &e_vec, Vector &q_val) const |
Interpolate the values of the E-vector e_vec at quadrature points. | |
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. | |
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. | |
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. | |
void | MultTranspose (unsigned eval_flags, const Vector &q_val, const Vector &q_der, Vector &e_vec) const |
Perform the transpose operation of Mult(). (TODO) | |
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 FiniteElementSpace * | fespace |
Not owned. | |
const QuadratureSpace * | qspace |
Not owned. | |
const IntegrationRule * | IntRule |
Not owned. | |
QVectorLayout | q_layout |
Output Q-vector layout. | |
bool | use_tensor_products |
Tensor product evaluation mode. | |
Vector | d_buffer |
Auxiliary device buffer. | |
Friends | |
class | FiniteElementSpace |
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 29 of file quadinterpolator.hpp.
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 51 of file quadinterpolator.hpp.
mfem::QuadratureInterpolator::QuadratureInterpolator | ( | const FiniteElementSpace & | fes, |
const IntegrationRule & | ir ) |
Definition at line 22 of file quadinterpolator.cpp.
mfem::QuadratureInterpolator::QuadratureInterpolator | ( | const FiniteElementSpace & | fes, |
const QuadratureSpace & | qs ) |
Definition at line 38 of file quadinterpolator.cpp.
Interpolate the derivatives (with respect to reference coordinates) of the E-vector e_vec at quadrature points.
Definition at line 713 of file quadinterpolator.cpp.
Compute the determinants of the derivatives (with respect to reference coordinates) of the E-vector e_vec at quadrature points.
Definition at line 727 of file quadinterpolator.cpp.
|
inline |
Disable the use of tensor product evaluations, for tensor-product elements, e.g. quads and hexes. By default, tensor product evaluations are enabled.
Definition at line 72 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.
Definition at line 78 of file quadinterpolator.hpp.
|
inline |
Query the current output Q-vector layout. The default value is QVectorLayout::byNODES.
Definition at line 87 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 459 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 694 of file quadinterpolator.cpp.
Interpolate the derivatives in physical space of the E-vector e_vec at quadrature points.
Definition at line 720 of file quadinterpolator.cpp.
|
inline |
Set the desired output Q-vector layout. The default value is QVectorLayout::byNODES.
Definition at line 92 of file quadinterpolator.hpp.
|
inline |
Query the current tensor product evaluation mode.
Definition at line 82 of file quadinterpolator.hpp.
Interpolate the values of the E-vector e_vec at quadrature points.
Definition at line 706 of file quadinterpolator.cpp.
|
friend |
Definition at line 32 of file quadinterpolator.hpp.
|
mutableprotected |
Auxiliary device buffer.
Definition at line 40 of file quadinterpolator.hpp.
|
protected |
Not owned.
Definition at line 34 of file quadinterpolator.hpp.
|
protected |
Not owned.
Definition at line 36 of file quadinterpolator.hpp.
|
static |
Definition at line 44 of file quadinterpolator.hpp.
|
static |
Definition at line 48 of file quadinterpolator.hpp.
|
static |
Definition at line 43 of file quadinterpolator.hpp.
|
static |
Definition at line 47 of file quadinterpolator.hpp.
|
static |
Definition at line 45 of file quadinterpolator.hpp.
|
static |
Definition at line 49 of file quadinterpolator.hpp.
|
mutableprotected |
Output Q-vector layout.
Definition at line 37 of file quadinterpolator.hpp.
|
protected |
Not owned.
Definition at line 35 of file quadinterpolator.hpp.
|
mutableprotected |
Tensor product evaluation mode.
Definition at line 39 of file quadinterpolator.hpp.