![]() |
MFEM v4.10.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 , PHYSICAL_VALUES = 1 << 4 , PHYSICAL_MAGNITUDES = 1 << 5 } |
| using | TensorEvalKernelType |
| using | GradKernelType |
| using | CollocatedGradKernelType |
| using | DetKernelType |
| using | EvalKernelType |
| using | IntTensorEvalKernelType |
| using | IntEvalKernelType |
| using | TensorEvalHDivKernelType |
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 | PhysValues (const Vector &e_vec, Vector &q_val) const |
| Interpolate the physical 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) | |
| MFEM_REGISTER_KERNELS (TensorEvalKernels, TensorEvalKernelType,(int, QVectorLayout, int, int, int),(int)) | |
| MFEM_REGISTER_KERNELS (GradKernels, GradKernelType,(int, QVectorLayout, bool, int, int, int),(int)) | |
| MFEM_REGISTER_KERNELS (DetKernels, DetKernelType,(int, int, int, int)) | |
| MFEM_REGISTER_KERNELS (EvalKernels, EvalKernelType,(int, int, int, int)) | |
| MFEM_REGISTER_KERNELS (CollocatedGradKernels, CollocatedGradKernelType,(int, QVectorLayout, bool, int, int),(int)) | |
| MFEM_REGISTER_KERNELS (IntTensorEvalKernels, IntTensorEvalKernelType,(int, QVectorLayout, int, int, int),(int)) | |
| MFEM_REGISTER_KERNELS (IntEvalKernels, IntEvalKernelType,(int, int, int, int)) | |
| MFEM_REGISTER_KERNELS (TensorEvalHDivKernels, TensorEvalHDivKernelType,(int, QVectorLayout, unsigned, int, int)) | |
Static Public Member Functions | |
| static bool | SupportsFESpace (const FiniteElementSpace &fespace) |
| Returns true if the given finite element space is supported by QuadratureInterpolator. | |
| template<int DIM, QVectorLayout Q_LAYOUT, int VDIM, int D1D, int Q1D, int NBZ = 0> | |
| static void | AddTensorEvalSpecializations () |
| Adds specializations for TensorEvalKernels. | |
| template<int DIM, int VDIM, int ND, int NQ> | |
| static void | AddEvalSpecializations () |
| Adds specializations for EvalKernels. | |
| template<int DIM, QVectorLayout Q_LAYOUT, bool GRAD_PHYS, int VDIM, int D1D, int Q1D, int NBZ = 0> | |
| static void | AddGradSpecializations () |
| Adds specializations for GradKernels. | |
| template<int DIM, QVectorLayout Q_LAYOUT, bool GRAD_PHYS, int VDIM, int D1D, int NBZ = 0> | |
| static void | AddCollocatedGradSpecializations () |
| Adds specializations for CollocatedGradKernels. | |
| template<int DIM, int SDIM, int D1D, int Q1D> | |
| static void | AddDetSpecializations () |
| Adds specializations for DetKernels. | |
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 Member Functions | |
| void | MultHDiv (const Vector &e_vec, unsigned eval_flags, Vector &q_val, Vector &q_div) const |
| Auxiliary method called by Mult() when using H(div)-conforming space. | |
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 30 of file quadinterpolator.hpp.
Definition at line 176 of file quadinterpolator.hpp.
Definition at line 181 of file quadinterpolator.hpp.
Definition at line 185 of file quadinterpolator.hpp.
Definition at line 198 of file quadinterpolator.hpp.
Definition at line 167 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. |
| PHYSICAL_VALUES | Evaluate the values in physical space; for fields with FiniteElement::MapType other than FiniteElement::MapType::VALUE, such as H(div) and H(curl) elements, the physical values are different from the reference values. |
| PHYSICAL_MAGNITUDES | For vector-valued fields, evaluate the magnitudes of the physical space vector values at quadrature points. |
Definition at line 56 of file quadinterpolator.hpp.
| mfem::QuadratureInterpolator::QuadratureInterpolator | ( | const FiniteElementSpace & | fes, |
| const IntegrationRule & | ir ) |
Definition at line 59 of file quadinterpolator.cpp.
| mfem::QuadratureInterpolator::QuadratureInterpolator | ( | const FiniteElementSpace & | fes, |
| const QuadratureSpace & | qs ) |
Definition at line 77 of file quadinterpolator.cpp.
|
inlinestatic |
Adds specializations for CollocatedGradKernels.
Definition at line 275 of file quadinterpolator.hpp.
|
inlinestatic |
Adds specializations for DetKernels.
Definition at line 291 of file quadinterpolator.hpp.
|
inlinestatic |
Adds specializations for EvalKernels.
Definition at line 249 of file quadinterpolator.hpp.
|
inlinestatic |
Adds specializations for GradKernels.
Definition at line 258 of file quadinterpolator.hpp.
|
inlinestatic |
Adds specializations for TensorEvalKernels.
Definition at line 229 of file quadinterpolator.hpp.
Interpolate the derivatives (with respect to reference coordinates) of the E-vector e_vec at quadrature points.
Definition at line 437 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 451 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 85 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 91 of file quadinterpolator.hpp.
|
inline |
Query the current output Q-vector layout. The default value is QVectorLayout::byNODES.
Definition at line 100 of file quadinterpolator.hpp.
| mfem::QuadratureInterpolator::MFEM_REGISTER_KERNELS | ( | CollocatedGradKernels | , |
| CollocatedGradKernelType | , | ||
| (int, QVectorLayout, bool, int, int) | , | ||
| (int) | ) |
| mfem::QuadratureInterpolator::MFEM_REGISTER_KERNELS | ( | DetKernels | , |
| DetKernelType | , | ||
| (int, int, int, int) | ) |
| mfem::QuadratureInterpolator::MFEM_REGISTER_KERNELS | ( | EvalKernels | , |
| EvalKernelType | , | ||
| (int, int, int, int) | ) |
| mfem::QuadratureInterpolator::MFEM_REGISTER_KERNELS | ( | GradKernels | , |
| GradKernelType | , | ||
| (int, QVectorLayout, bool, int, int, int) | , | ||
| (int) | ) |
| mfem::QuadratureInterpolator::MFEM_REGISTER_KERNELS | ( | IntEvalKernels | , |
| IntEvalKernelType | , | ||
| (int, int, int, int) | ) |
| mfem::QuadratureInterpolator::MFEM_REGISTER_KERNELS | ( | IntTensorEvalKernels | , |
| IntTensorEvalKernelType | , | ||
| (int, QVectorLayout, int, int, int) | , | ||
| (int) | ) |
| mfem::QuadratureInterpolator::MFEM_REGISTER_KERNELS | ( | TensorEvalHDivKernels | , |
| TensorEvalHDivKernelType | , | ||
| (int, QVectorLayout, unsigned, int, int) | ) |
| mfem::QuadratureInterpolator::MFEM_REGISTER_KERNELS | ( | TensorEvalKernels | , |
| TensorEvalKernelType | , | ||
| (int, QVectorLayout, int, int, int) | , | ||
| (int) | ) |
| 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.
For Integral spaces, the flags VALUES requests the computation of the scalar field values. The result is stored in q_val. Derivative types are not supported.
For H(div)-conforming spaces, the flags VALUES / PHYSICAL_VALUES request the computation of the vector field values in reference or physical space, respectively. The flag PHYSICAL_MAGNITUDES requests the computation of the physical space magnitudes. In all 3 cases, the result is stored in q_val and therefore only one of the 3 cases can be requested in a single call.
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 226 of file quadinterpolator.cpp.
|
protected |
Auxiliary method called by Mult() when using H(div)-conforming space.
Definition at line 343 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 411 of file quadinterpolator.cpp.
Interpolate the derivatives in physical space of the E-vector e_vec at quadrature points.
Definition at line 444 of file quadinterpolator.cpp.
Interpolate the physical values of the E-vector e_vec at quadrature points.
Definition at line 430 of file quadinterpolator.cpp.
|
inline |
Set the desired output Q-vector layout. The default value is QVectorLayout::byNODES.
Definition at line 105 of file quadinterpolator.hpp.
|
static |
Returns true if the given finite element space is supported by QuadratureInterpolator.
Definition at line 93 of file quadinterpolator.cpp.
|
inline |
Query the current tensor product evaluation mode.
Definition at line 95 of file quadinterpolator.hpp.
Interpolate the values of the E-vector e_vec at quadrature points.
Definition at line 423 of file quadinterpolator.cpp.
|
friend |
Definition at line 33 of file quadinterpolator.hpp.
|
mutableprotected |
Auxiliary device buffer.
Definition at line 41 of file quadinterpolator.hpp.
|
protected |
Not owned.
Definition at line 35 of file quadinterpolator.hpp.
|
protected |
Not owned.
Definition at line 37 of file quadinterpolator.hpp.
|
static |
Definition at line 49 of file quadinterpolator.hpp.
|
static |
Definition at line 53 of file quadinterpolator.hpp.
|
static |
Definition at line 48 of file quadinterpolator.hpp.
|
static |
Definition at line 52 of file quadinterpolator.hpp.
|
static |
Definition at line 50 of file quadinterpolator.hpp.
|
static |
Definition at line 54 of file quadinterpolator.hpp.
|
mutableprotected |
Output Q-vector layout.
Definition at line 38 of file quadinterpolator.hpp.
|
protected |
Not owned.
Definition at line 36 of file quadinterpolator.hpp.
|
mutableprotected |
Tensor product evaluation mode.
Definition at line 40 of file quadinterpolator.hpp.