![]() |
MFEM v4.8.0
Finite element discretization library
|
Class for subdomain IntegrationRules by means of moment-fitting. More...
#include <intrules_cut.hpp>
Public Member Functions | |
MomentFittingIntRules (int order, Coefficient &lvlset, int lsO) | |
Constructor to set up the generated cut IntegrationRules. | |
void | SetOrder (int order) override |
Change the order of the constructed IntegrationRule. | |
void | GetSurfaceIntegrationRule (ElementTransformation &Tr, IntegrationRule &result) override |
Construct a cut-surface IntegrationRule. | |
void | GetVolumeIntegrationRule (ElementTransformation &Tr, IntegrationRule &result, const IntegrationRule *sir=nullptr) override |
Construct a cut-volume IntegrationRule. | |
void | GetSurfaceWeights (ElementTransformation &Tr, const IntegrationRule &sir, Vector &weights) override |
Compute transformation quadrature weights for surface integration. | |
~MomentFittingIntRules () override | |
Destructor of MomentFittingIntRules. | |
virtual void | SetLevelSetCoefficient (Coefficient &ls) |
Change the Coefficient whose zero level set specifies the cut. | |
virtual void | SetLevelSetProjectionOrder (int order) |
![]() | |
virtual | ~CutIntegrationRules () |
Destructor of CutIntegrationRules. | |
Protected Member Functions | |
void | InitSurface (int order, Coefficient &levelset, int lsO, ElementTransformation &Tr) |
Initialization for surface IntegrationRule. | |
void | InitVolume (int order, Coefficient &levelset, int lsO, ElementTransformation &Tr) |
Initialization for volume IntegrationRule. | |
void | Init (int order, Coefficient &levelset, int lsO) |
Initialize the MomentFittingIntRules. | |
void | Clear () |
Clear stored data of the MomentFittingIntRules. | |
void | ComputeFaceWeights (ElementTransformation &Tr) |
Compute the IntegrationRules on the faces. | |
void | ComputeSurfaceWeights1D (ElementTransformation &Tr) |
Compute 1D quadrature weights. | |
void | ComputeVolumeWeights1D (ElementTransformation &Tr) |
Compute the 1D quadrature weights. | |
void | ComputeSurfaceWeights2D (ElementTransformation &Tr) |
Compute 2D quadrature weights. | |
void | ComputeVolumeWeights2D (ElementTransformation &Tr, const IntegrationRule *sir) |
Compute the 2D quadrature weights. | |
void | ComputeSurfaceWeights3D (ElementTransformation &Tr) |
Compute 2D quadrature weights. | |
void | ComputeVolumeWeights3D (ElementTransformation &Tr, const IntegrationRule *sir) |
Compute the 3D quadrature weights. | |
void | DivFreeBasis2D (const IntegrationPoint &ip, DenseMatrix &shape) |
A divergence free basis on the element [-1,1]^2. | |
void | OrthoBasis2D (const IntegrationPoint &ip, DenseMatrix &shape) |
A orthogonalized divergence free basis on the element [-1,1]^2. | |
void | OrthoBasis3D (const IntegrationPoint &ip, DenseMatrix &shape) |
A orthogonalized divergence free basis on the element [-1,1]^3. | |
void | mGSStep (DenseMatrix &shape, DenseTensor &shapeMFN, int step) |
A step of the modified Gram-Schmidt algorithm. | |
void | Basis2D (const IntegrationPoint &ip, Vector &shape) |
Monomial basis on the element [-1,1]^2. | |
void | BasisAD2D (const IntegrationPoint &ip, DenseMatrix &shape) |
Antiderivatives of the monomial basis on the element [-1,1]^2. | |
void | Basis3D (const IntegrationPoint &ip, Vector &shape) |
Monomial basis on the element [-1,1]^3. | |
void | BasisAD3D (const IntegrationPoint &ip, DenseMatrix &shape) |
Antiderivatives of the monomial basis on the element [-1,1]^3. | |
![]() | |
CutIntegrationRules (int order, Coefficient &lvlset, int lsO=2) | |
Constructor to set up the generated cut IntegrationRules. | |
Protected Attributes | |
int | dim |
Space Dimension of the element. | |
int | nBasis |
Number of divergence-free basis functions for surface integration. | |
int | nBasisVolume |
Number of basis functions for volume integration. | |
IntegrationRule | ir |
IntegrationRule representing the reused IntegrationPoints. | |
DenseMatrixSVD * | VolumeSVD |
SVD of the matrix for volumetric IntegrationRules. | |
Array< IntegrationPoint > | FaceIP |
Array of face integration points. | |
DenseMatrix | FaceWeights |
Column-wise Matrix for the face quadrature weights. | |
Vector | FaceWeightsComp |
Indicates the already computed face IntegrationRules. | |
![]() | |
int | Order |
Order of the IntegrationRule. | |
Coefficient * | LvlSet |
The zero level set of this Coefficient defines the cut surface. | |
int | lsOrder |
Space order for the LS projection. | |
Additional Inherited Members | |
![]() | |
static constexpr real_t | tol_1 = 1e-12 |
static constexpr real_t | tol_2 = 1e-15 |
Class for subdomain IntegrationRules by means of moment-fitting.
Class for subdomain (surface and subdomain) IntegrationRules by means of moment-fitting. The class provides different functions to construct the IntegrationRules. The construction is done as described in Mueller et al. in "Highly accurate surface and volume integration on implicit domains by means of moment-fitting" (2013, see https://onlinelibrary.wiley.com/doi/full/10.1002/nme.4569).
Definition at line 484 of file intrules_cut.hpp.
|
inline |
Constructor to set up the generated cut IntegrationRules.
[in] | order | Order of the constructed IntegrationRule. |
[in] | lvlset | Coefficient whose zero level set specifies the cut. |
[in] | lsO | Polynomial degree for projecting the level-set Coefficient to a GridFunction, which is used to compute gradients and normals. |
Definition at line 651 of file intrules_cut.hpp.
|
inlineoverride |
Destructor of MomentFittingIntRules.
Definition at line 705 of file intrules_cut.hpp.
|
protected |
Monomial basis on the element [-1,1]^2.
Definition at line 1535 of file intrules_cut.cpp.
|
protected |
Monomial basis on the element [-1,1]^3.
Definition at line 1580 of file intrules_cut.cpp.
|
protected |
Antiderivatives of the monomial basis on the element [-1,1]^2.
Definition at line 1555 of file intrules_cut.cpp.
|
protected |
Antiderivatives of the monomial basis on the element [-1,1]^3.
Definition at line 1601 of file intrules_cut.cpp.
|
protected |
Clear stored data of the MomentFittingIntRules.
Definition at line 1632 of file intrules_cut.cpp.
|
protected |
Compute the IntegrationRules on the faces.
Compute the IntegrationRules on the (cut) faces of an element. These will be saved and reused if possible.
[in] | Tr | ElementTransformation of the element the IntegrationRules on the faces are computed |
Definition at line 294 of file intrules_cut.cpp.
|
protected |
Compute 1D quadrature weights.
Compute the quadrature weights for the 1D surface quadrature rule.
[in] | Tr | ElementTransformation of the current element |
Definition at line 377 of file intrules_cut.cpp.
|
protected |
Compute 2D quadrature weights.
Compute the quadrature weights for the 2D surface quadrature rule by means of moment-fitting. To construct the quadrature rule, special integrals are reduced to integrals over the edges of the subcell where the level-set is positive.
[in] | Tr | ElementTransformation of the current element |
Definition at line 524 of file intrules_cut.cpp.
|
protected |
Compute 2D quadrature weights.
Compute the quadrature weights for the 3D surface quadrature rule by means of moment-fitting. To construct the quadrature rule, special integrals are reduced to integrals over the edges of the subcell where the level-set is positive.
[in] | Tr | ElementTransformation of the current element |
Definition at line 1033 of file intrules_cut.cpp.
|
protected |
Compute the 1D quadrature weights.
Compute the 1D quadrature weights for the volumetric subdomain quadrature rule.
[in] | Tr | ElementTransformation of the current element |
Definition at line 473 of file intrules_cut.cpp.
|
protected |
Compute the 2D quadrature weights.
Compute the 2D quadrature weights for the volumetric subdomain quadrature rule by means of moment-fitting. To construct the quadrature rule, special integrals are reduced to integrals over the boundary of the subcell where the level-set is positive.
[in] | Tr | ElementTransformation of the current element |
[in] | sir | corresponding IntegrationRule on surface |
Definition at line 775 of file intrules_cut.cpp.
|
protected |
Compute the 3D quadrature weights.
Compute the 3D quadrature weights for the volumetric subdomain quadrature rule by means of moment-fitting. To construct the quadrature rule, special integrals are reduced to integrals over the boundary of the subcell where the level-set is positive.
[in] | Tr | ElementTransformation of the current element |
[in] | sir | corresponding IntegrationRule on surface |
Definition at line 1214 of file intrules_cut.cpp.
|
protected |
A divergence free basis on the element [-1,1]^2.
Definition at line 1407 of file intrules_cut.cpp.
|
overridevirtual |
Construct a cut-surface IntegrationRule.
Construct an IntegrationRule to integrate on the surface given by the already specified level set function, for the element given by Tr.
[in] | Tr | Specifies the IntegrationRule's associated mesh element. |
[out] | result | IntegrationRule on the cut-surface |
Implements mfem::CutIntegrationRules.
Definition at line 1650 of file intrules_cut.cpp.
|
overridevirtual |
Compute transformation quadrature weights for surface integration.
Compute the transformation weights for integration over the cut-surface in reference space.
[in] | Tr | Specifies the IntegrationRule's associated element. |
[in] | sir | IntegrationRule defining the IntegrationPoints |
[out] | weights | Vector containing the transformation weights. |
Implements mfem::CutIntegrationRules.
Definition at line 1754 of file intrules_cut.cpp.
|
overridevirtual |
Construct a cut-volume IntegrationRule.
Construct an IntegrationRule to integrate in the subdomain given by the positive values of the already specified level set function, for the element given by Tr.
[in] | Tr | Specifies the IntegrationRule's associated mesh element. |
[out] | result | IntegrationRule for the cut-volume |
[in] | sir | Corresponding IntegrationRule for the surface, which can be used to avoid computations. |
Implements mfem::CutIntegrationRules.
Definition at line 1691 of file intrules_cut.cpp.
|
inlineprotected |
Initialize the MomentFittingIntRules.
Definition at line 535 of file intrules_cut.hpp.
|
protected |
Initialization for surface IntegrationRule.
Initialize the members for computation of surface IntegrationRule. This is called when the first IntegrationRule is computed or when Order or level-set change.
[in] | order | Order of the IntegrationRule |
[in] | levelset | level-set function defining the implicit interface |
[in] | lsO | polynomial degree for approximation of level-set function |
[in] | Tr | ElemenTransformation to initalize the members with |
Definition at line 202 of file intrules_cut.cpp.
|
protected |
Initialization for volume IntegrationRule.
Initialize the members for computation of surface IntegrationRule. This is called when the first IntegrationRule is computed or when Order or level-set change.
[in] | order | Order of the IntegrationRule |
[in] | levelset | level-set function defining the implicit interface |
[in] | lsO | polynomial degree for approximation of level-set function |
[in] | Tr | ElemenTransformation to initalize the members with |
Definition at line 242 of file intrules_cut.cpp.
|
protected |
A step of the modified Gram-Schmidt algorithm.
Definition at line 1492 of file intrules_cut.cpp.
|
protected |
A orthogonalized divergence free basis on the element [-1,1]^2.
Definition at line 1450 of file intrules_cut.cpp.
|
protected |
A orthogonalized divergence free basis on the element [-1,1]^3.
Definition at line 1481 of file intrules_cut.cpp.
|
inlinevirtual |
Change the Coefficient whose zero level set specifies the cut.
Reimplemented from mfem::CutIntegrationRules.
Definition at line 77 of file intrules_cut.hpp.
|
virtual |
Change the polynomial degree for projecting the level set Coefficient to a GridFunction, which is used to compute local gradients and normals.
Reimplemented from mfem::CutIntegrationRules.
Definition at line 81 of file intrules_cut.cpp.
|
overridevirtual |
Change the order of the constructed IntegrationRule.
Reimplemented from mfem::CutIntegrationRules.
Definition at line 1644 of file intrules_cut.cpp.
|
protected |
Space Dimension of the element.
Definition at line 488 of file intrules_cut.hpp.
|
protected |
Array of face integration points.
Definition at line 498 of file intrules_cut.hpp.
|
protected |
Column-wise Matrix for the face quadrature weights.
Definition at line 500 of file intrules_cut.hpp.
|
protected |
Indicates the already computed face IntegrationRules.
Definition at line 502 of file intrules_cut.hpp.
|
protected |
IntegrationRule representing the reused IntegrationPoints.
Definition at line 494 of file intrules_cut.hpp.
|
protected |
Number of divergence-free basis functions for surface integration.
Definition at line 490 of file intrules_cut.hpp.
|
protected |
Number of basis functions for volume integration.
Definition at line 492 of file intrules_cut.hpp.
|
protected |
SVD of the matrix for volumetric IntegrationRules.
Definition at line 496 of file intrules_cut.hpp.