![]() |
MFEM v4.8.0
Finite element discretization library
|
This base class implements some shared functionality between linear and nonlinear form integrators. More...
#include <integrator.hpp>
Public Member Functions | |
Integrator (const IntegrationRule *ir=NULL) | |
Create a new Integrator, optionally providing a prescribed quadrature rule to use in assembly. | |
virtual void | SetIntRule (const IntegrationRule *ir) |
Prescribe a fixed IntegrationRule to use, or set to null to let the integrator choose an appropriate rule. | |
void | SetIntegrationRule (const IntegrationRule &ir) |
Prescribe a fixed IntegrationRule to use. Sets the NURBS patch integration rule to null. | |
void | SetNURBSPatchIntRule (NURBSMeshRules *pr) |
Sets an integration rule for use on NURBS patches. | |
bool | HasNURBSPatchIntRule () const |
Check if a NURBS patch integration rule has been set. | |
const IntegrationRule * | GetIntRule () const |
Directly return the IntRule pointer (possibly null) without checking for NURBS patch rules or falling back on a default. | |
const IntegrationRule * | GetIntegrationRule () const |
Equivalent to GetIntRule, but retained for backward compatibility with applications. | |
Protected Member Functions | |
const IntegrationRule * | GetIntegrationRule (const FiniteElement &trial_fe, const FiniteElement &test_fe, const ElementTransformation &trans) const |
Returns an integration rule based on the arguments and internal state of the Integrator object. | |
const IntegrationRule * | GetIntegrationRule (const FiniteElement &el, const ElementTransformation &trans) const |
Returns an integration rule based on the arguments and internal state. (Version for identical trial_fe and test_fe) | |
virtual const IntegrationRule * | GetDefaultIntegrationRule (const FiniteElement &trial_fe, const FiniteElement &test_fe, const ElementTransformation &trans) const |
Subclasses should override to choose a default integration rule. | |
Protected Attributes | |
const IntegrationRule * | IntRule |
NURBSMeshRules * | patchRules = nullptr |
This base class implements some shared functionality between linear and nonlinear form integrators.
Definition at line 22 of file integrator.hpp.
|
inline |
Create a new Integrator, optionally providing a prescribed quadrature rule to use in assembly.
Definition at line 27 of file integrator.hpp.
|
inlineprotectedvirtual |
Subclasses should override to choose a default integration rule.
This method is intended to be overridden by subclasses to choose an appropriate integration rule based on the finite element spaces and/or element transformation. The trial_fe and test_fe should be equal for linear forms. The default base-class implementation returns null, which assumes that an appropriate rule is provided by another means, or that null integration rules are handled appropriately by the caller.
Reimplemented in mfem::ConvectionIntegrator, mfem::DiffusionIntegrator, mfem::GradientIntegrator, mfem::HyperelasticNLFIntegrator, mfem::MassIntegrator, mfem::VectorConvectionNLFIntegrator, and mfem::VectorDivergenceIntegrator.
Definition at line 111 of file integrator.hpp.
|
inline |
Equivalent to GetIntRule, but retained for backward compatibility with applications.
Definition at line 67 of file integrator.hpp.
|
protected |
Returns an integration rule based on the arguments and internal state. (Version for identical trial_fe and test_fe)
Definition at line 44 of file integrator.cpp.
|
protected |
Returns an integration rule based on the arguments and internal state of the Integrator object.
This method returns an integration rule in a way that depends on the integrator's attributes. Attributes can specify an existing IntegrationRule, and/or a NURBSMeshRules object. This method will pick the NURBSMeshRules' restriction to the element if given and applicable, and IntRule otherwise, prioritizing the NURBS rule if available. If neither is valid, the integrator will fall back on the virtual method GetDefaultIntegrationRule to choose a default integration rule, where subclasses can override this in a problem-specific way.
Definition at line 18 of file integrator.cpp.
|
inline |
Directly return the IntRule pointer (possibly null) without checking for NURBS patch rules or falling back on a default.
Definition at line 63 of file integrator.hpp.
|
inline |
Check if a NURBS patch integration rule has been set.
Definition at line 59 of file integrator.hpp.
|
inline |
Prescribe a fixed IntegrationRule to use. Sets the NURBS patch integration rule to null.
Definition at line 46 of file integrator.hpp.
|
inlinevirtual |
Prescribe a fixed IntegrationRule to use, or set to null to let the integrator choose an appropriate rule.
This method allows setting a custom integration rule to use on each element during assembly, overriding the default choice if it is non-null. Passing a non-null value will set the Integrator's NURBS patch integration rule to null to avoid ambiguity in GetIntegrationRule.
Reimplemented in mfem::InverseIntegrator, mfem::LumpedIntegrator, mfem::QuadratureLFIntegrator, mfem::SumIntegrator, mfem::TransposeIntegrator, and mfem::VectorQuadratureLFIntegrator.
Definition at line 38 of file integrator.hpp.
|
inline |
Sets an integration rule for use on NURBS patches.
For patchwise integration, SetNURBSPatchIntRule must be called. Passing a non-null value will set the Integrator's standard element IntegrationRule to null to avoid ambiguity in GetIntegrationRule.
Definition at line 55 of file integrator.hpp.
|
protected |
Definition at line 70 of file integrator.hpp.
|
protected |
Definition at line 71 of file integrator.hpp.