![]() |
MFEM
v4.4.0
Finite element discretization library
|
The LpErrorEstimator class compares the solution to a known coefficient. More...
#include <estimators.hpp>
Public Member Functions | |
| LpErrorEstimator (int p, GridFunction &sol) | |
| Construct a new LpErrorEstimator object for a scalar field. More... | |
| LpErrorEstimator (int p, Coefficient &coef, GridFunction &sol) | |
| Construct a new LpErrorEstimator object for a scalar field. More... | |
| LpErrorEstimator (int p, VectorCoefficient &coef, GridFunction &sol) | |
| Construct a new LpErrorEstimator object for a vector field. More... | |
| void | SetLocalErrorNormP (int p) |
| Set the exponent, p, of the Lp norm used for computing the local element errors. More... | |
| void | SetCoef (Coefficient &A) |
| void | SetCoef (VectorCoefficient &A) |
| virtual void | Reset () override |
| Reset the error estimator. More... | |
| virtual const Vector & | GetLocalErrors () override |
| Get a Vector with all element errors. More... | |
| virtual | ~LpErrorEstimator () |
| Destructor. More... | |
Public Member Functions inherited from mfem::ErrorEstimator | |
| virtual double | GetTotalError () const |
| Return the total error from the last error estimate. More... | |
| virtual | ~ErrorEstimator () |
| Destruct the error estimator. More... | |
Public Member Functions inherited from mfem::AbstractErrorEstimator | |
| virtual | ~AbstractErrorEstimator () |
Protected Member Functions | |
| bool | MeshIsModified () |
| Check if the mesh of the solution was modified. More... | |
| void | ComputeEstimates () |
| Compute the element error estimates. More... | |
Protected Attributes | |
| long | current_sequence |
| int | local_norm_p |
| Vector | error_estimates |
| double | total_error = 0.0 |
| Coefficient * | coef |
| VectorCoefficient * | vcoef |
| GridFunction * | sol |
The LpErrorEstimator class compares the solution to a known coefficient.
This class can be used, for example, to adapt a mesh to a non-trivial initial condition in a time-dependent simulation. It can also be used to force refinement in the neighborhood of small features before switching to a more traditional error estimator.
The LpErrorEstimator supports either scalar or vector coefficients and works both in serial and in parallel.
Definition at line 336 of file estimators.hpp.
|
inline |
Construct a new LpErrorEstimator object for a scalar field.
| p | Integer which selects which Lp norm to use. |
| sol | The GridFunction representation of the scalar field. Note: the coefficient must be set before use with the SetCoef method. |
Definition at line 366 of file estimators.hpp.
|
inline |
Construct a new LpErrorEstimator object for a scalar field.
| p | Integer which selects which Lp norm to use. |
| coef | The scalar Coefficient to compare to the solution. |
| sol | The GridFunction representation of the scalar field. |
Definition at line 375 of file estimators.hpp.
|
inline |
Construct a new LpErrorEstimator object for a vector field.
| p | Integer which selects which Lp norm to use. |
| coef | The vector VectorCoefficient to compare to the solution. |
| sol | The GridFunction representation of the vector field. |
Definition at line 384 of file estimators.hpp.
|
inlinevirtual |
Destructor.
Definition at line 406 of file estimators.hpp.
|
protected |
Compute the element error estimates.
Definition at line 462 of file estimators.cpp.
|
inlineoverridevirtual |
Get a Vector with all element errors.
Implements mfem::ErrorEstimator.
Definition at line 399 of file estimators.hpp.
|
inlineprotected |
Check if the mesh of the solution was modified.
Definition at line 350 of file estimators.hpp.
|
inlineoverridevirtual |
Reset the error estimator.
Implements mfem::ErrorEstimator.
Definition at line 396 of file estimators.hpp.
|
inline |
Definition at line 392 of file estimators.hpp.
|
inline |
Definition at line 393 of file estimators.hpp.
|
inline |
Set the exponent, p, of the Lp norm used for computing the local element errors.
Definition at line 390 of file estimators.hpp.
|
protected |
Definition at line 345 of file estimators.hpp.
|
protected |
Definition at line 339 of file estimators.hpp.
|
protected |
Definition at line 341 of file estimators.hpp.
|
protected |
Definition at line 340 of file estimators.hpp.
|
protected |
Definition at line 347 of file estimators.hpp.
|
protected |
Definition at line 343 of file estimators.hpp.
|
protected |
Definition at line 346 of file estimators.hpp.
1.8.5