MFEM
v4.2.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 } |
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 FiniteElementSpace * | fespace |
Not owned. More... | |
const QuadratureSpace * | qspace |
Not owned. More... | |
const IntegrationRule * | IntRule |
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 = 3 |
static const int | MAX_NQ3D = 1000 |
static const int | MAX_ND3D = 1000 |
static const int | MAX_VDIM3D = 3 |
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 36 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(). |
Definition at line 57 of file quadinterpolator.hpp.
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.
Interpolate the derivatives of the E-vector e_vec at quadrature points.
Definition at line 1317 of file quadinterpolator.cpp.
|
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.
|
static |
Template compute kernel for 2D.
Definition at line 51 of file quadinterpolator.cpp.
|
static |
Template compute kernel for 3D.
Definition at line 142 of file quadinterpolator.cpp.
|
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 235 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 416 of file quadinterpolator.cpp.
Interpolate the derivatives in physical space of the E-vector e_vec at quadrature points.
Definition at line 1335 of file quadinterpolator.cpp.
|
inline |
Set the desired output Q-vector layout. The default value is QVectorLayout::byNODES.
Definition at line 86 of file quadinterpolator.hpp.
Interpolate the values of the E-vector e_vec at quadrature points.
Definition at line 682 of file quadinterpolator.cpp.
|
friend |
Definition at line 39 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.
|
staticprotected |
Definition at line 49 of file quadinterpolator.hpp.
|
staticprotected |
Definition at line 53 of file quadinterpolator.hpp.
|
staticprotected |
Definition at line 48 of file quadinterpolator.hpp.
|
staticprotected |
Definition at line 52 of file quadinterpolator.hpp.
|
staticprotected |
Definition at line 50 of file quadinterpolator.hpp.
|
staticprotected |
Definition at line 54 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.
|
mutableprotected |
Definition at line 46 of file quadinterpolator.hpp.