MFEM v4.7.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) |
Public Member Functions inherited from mfem::CutIntegrationRules | |
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, const IntegrationRule *sir) |
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. | |
Protected Member Functions inherited from mfem::CutIntegrationRules | |
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. | |
Protected Attributes inherited from mfem::CutIntegrationRules | |
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. | |
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 120 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 289 of file intrules_cut.hpp.
|
inlineoverride |
Destructor of MomentFittingIntRules.
Definition at line 343 of file intrules_cut.hpp.
|
protected |
Monomial basis on the element [-1,1]^2.
Definition at line 1320 of file intrules_cut.cpp.
|
protected |
Monomial basis on the element [-1,1]^3.
Definition at line 1365 of file intrules_cut.cpp.
|
protected |
Antiderivatives of the monomial basis on the element [-1,1]^2.
Definition at line 1340 of file intrules_cut.cpp.
|
protected |
Antiderivatives of the monomial basis on the element [-1,1]^3.
Definition at line 1386 of file intrules_cut.cpp.
|
protected |
Clear stored data of the MomentFittingIntRules.
Definition at line 1417 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 128 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 210 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 309 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 818 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 |
[in] | sir | corresponding IntegrationRule on surface |
Definition at line 257 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 560 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 999 of file intrules_cut.cpp.
|
protected |
A divergence free basis on the element [-1,1]^2.
Definition at line 1192 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 1435 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 1536 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 1476 of file intrules_cut.cpp.
|
inlineprotected |
Initialize the MomentFittingIntRules.
Definition at line 171 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 36 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 76 of file intrules_cut.cpp.
|
protected |
A step of the modified Gram-Schmidt algorithm.
Definition at line 1277 of file intrules_cut.cpp.
|
protected |
A orthogonalized divergence free basis on the element [-1,1]^2.
Definition at line 1235 of file intrules_cut.cpp.
|
protected |
A orthogonalized divergence free basis on the element [-1,1]^3.
Definition at line 1266 of file intrules_cut.cpp.
|
inlinevirtual |
Change the Coefficient whose zero level set specifies the cut.
Reimplemented from mfem::CutIntegrationRules.
Definition at line 56 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 60 of file intrules_cut.cpp.
|
overridevirtual |
Change the order of the constructed IntegrationRule.
Reimplemented from mfem::CutIntegrationRules.
Definition at line 1429 of file intrules_cut.cpp.
|
protected |
Space Dimension of the element.
Definition at line 124 of file intrules_cut.hpp.
|
protected |
Array of face integration points.
Definition at line 134 of file intrules_cut.hpp.
|
protected |
Column-wise Matrix for the face quadrature weights.
Definition at line 136 of file intrules_cut.hpp.
|
protected |
Indicates the already computed face IntegrationRules.
Definition at line 138 of file intrules_cut.hpp.
|
protected |
IntegrationRule representing the reused IntegrationPoints.
Definition at line 130 of file intrules_cut.hpp.
|
protected |
Number of divergence-free basis functions for surface integration.
Definition at line 126 of file intrules_cut.hpp.
|
protected |
Number of basis functions for volume integration.
Definition at line 128 of file intrules_cut.hpp.
|
protected |
SVD of the matrix for volumetric IntegrationRules.
Definition at line 132 of file intrules_cut.hpp.