Vector coefficient holding precomputed values of a source vector coefficient at the quadrature points of a QuadratureFunction. More...
#include <MFEMVectorQuadratureFunctionCoefficient.h>
Public Member Functions | |
| MFEMVectorQuadratureFunctionCoefficient (mfem::VectorCoefficient &source, mfem::QuadratureFunction &qf, UpdatePolicy update_policy, const std::string &name) | |
| void | SetTime (mfem::real_t t) override |
| Set the time for the coefficient, invalidating the stored values unless the update policy is NONE. More... | |
| void | Eval (mfem::Vector &V, mfem::ElementTransformation &T, const mfem::IntegrationPoint &ip) override |
| Return the stored values at ip, re-projecting the source first if invalidated. More... | |
| void | Project (mfem::QuadratureFunction &qf) override |
| Copy the stored values into qf, re-projecting the source first if invalidated. More... | |
| CreateMooseEnumClass (UpdatePolicy, NONE, TIME, NONLINEAR) | |
| Policy controlling when the stored values are re-projected from the source coefficient. More... | |
| void | MarkSolutionChanged () |
| Mark the stored values as stale following a change of solution variables, forcing the source to be re-projected on next use. More... | |
Protected Member Functions | |
| void | MarkTimeChanged () |
| Mark the stored values as stale following a change of time. More... | |
| void | CheckIntegrationRule (const mfem::QuadratureFunction &qf, mfem::ElementTransformation &T, const mfem::IntegrationPoint &ip) const |
| Verify that the integration point ip supplied by a consuming integrator belongs to the same quadrature rule the values in qf are stored on. More... | |
Protected Attributes | |
| const UpdatePolicy | _update_policy |
| When the stored values are re-projected from the source coefficient. More... | |
| const std::string | _name |
| Name of the owning MOOSE object, used in error messages. More... | |
| bool | _dirty |
| Whether the stored values are stale and must be re-projected before use. More... | |
Private Member Functions | |
| void | Refresh () |
| Project the source coefficient into the quadrature function if invalidated. More... | |
Private Attributes | |
| mfem::VectorCoefficient & | _source |
| Source coefficient the stored values are projected from. More... | |
| mfem::QuadratureFunction & | _qf |
| Storage for the projected values, shared with the owning MOOSE object. More... | |
Vector coefficient holding precomputed values of a source vector coefficient at the quadrature points of a QuadratureFunction.
The stored values are (re)projected lazily: evaluation triggers a projection of the source coefficient only if the values have been invalidated since the last projection.
Definition at line 28 of file MFEMVectorQuadratureFunctionCoefficient.h.
| MFEMVectorQuadratureFunctionCoefficient::MFEMVectorQuadratureFunctionCoefficient | ( | mfem::VectorCoefficient & | source, |
| mfem::QuadratureFunction & | qf, | ||
| UpdatePolicy | update_policy, | ||
| const std::string & | name | ||
| ) |
Definition at line 15 of file MFEMVectorQuadratureFunctionCoefficient.C.
|
protectedinherited |
Verify that the integration point ip supplied by a consuming integrator belongs to the same quadrature rule the values in qf are stored on.
Errors, naming the quadrature order the coefficient should use, if the rules do not match. The stored values are indexed by quadrature point, so a mismatched rule would silently read values from the wrong points.
Definition at line 37 of file MFEMQuadratureFunctionCoefficientBase.C.
Referenced by MFEMScalarQuadratureFunctionCoefficient::Eval(), and Eval().
|
inherited |
Policy controlling when the stored values are re-projected from the source coefficient.
NONE - the source never changes after initialization; project exactly once. TIME - the source changes with time only; re-project when the time is set. NONLINEAR - the source may additionally depend on solution variables; also re-project whenever trial variables are updated (i.e. on each nonlinear iteration).
|
override |
Return the stored values at ip, re-projecting the source first if invalidated.
Definition at line 35 of file MFEMVectorQuadratureFunctionCoefficient.C.
|
inlineinherited |
Mark the stored values as stale following a change of solution variables, forcing the source to be re-projected on next use.
Definition at line 51 of file MFEMQuadratureFunctionCoefficientBase.h.
|
inlineprotectedinherited |
Mark the stored values as stale following a change of time.
Definition at line 59 of file MFEMQuadratureFunctionCoefficientBase.h.
Referenced by MFEMScalarQuadratureFunctionCoefficient::SetTime(), and SetTime().
|
override |
Copy the stored values into qf, re-projecting the source first if invalidated.
Definition at line 46 of file MFEMVectorQuadratureFunctionCoefficient.C.
|
private |
Project the source coefficient into the quadrature function if invalidated.
Definition at line 54 of file MFEMVectorQuadratureFunctionCoefficient.C.
Referenced by Eval(), and Project().
|
override |
Set the time for the coefficient, invalidating the stored values unless the update policy is NONE.
Definition at line 28 of file MFEMVectorQuadratureFunctionCoefficient.C.
|
protectedinherited |
Whether the stored values are stale and must be re-projected before use.
Definition at line 78 of file MFEMQuadratureFunctionCoefficientBase.h.
Referenced by MFEMScalarQuadratureFunctionCoefficient::Eval(), Eval(), MFEMQuadratureFunctionCoefficientBase::MarkSolutionChanged(), MFEMQuadratureFunctionCoefficientBase::MarkTimeChanged(), MFEMScalarQuadratureFunctionCoefficient::Project(), Project(), MFEMScalarQuadratureFunctionCoefficient::Refresh(), and Refresh().
|
protectedinherited |
Name of the owning MOOSE object, used in error messages.
Definition at line 76 of file MFEMQuadratureFunctionCoefficientBase.h.
Referenced by MFEMQuadratureFunctionCoefficientBase::CheckIntegrationRule().
|
private |
Storage for the projected values, shared with the owning MOOSE object.
Definition at line 57 of file MFEMVectorQuadratureFunctionCoefficient.h.
|
private |
Source coefficient the stored values are projected from.
Definition at line 55 of file MFEMVectorQuadratureFunctionCoefficient.h.
Referenced by Refresh().
|
protectedinherited |
When the stored values are re-projected from the source coefficient.
Definition at line 74 of file MFEMQuadratureFunctionCoefficientBase.h.
Referenced by MFEMQuadratureFunctionCoefficientBase::MarkSolutionChanged(), and MFEMQuadratureFunctionCoefficientBase::MarkTimeChanged().
1.8.14