MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::L2ZienkiewiczZhuEstimator Class Reference

The L2ZienkiewiczZhuEstimator class implements the Zienkiewicz-Zhu error estimation procedure where the flux averaging is replaced by a global L2 projection (requiring a mass matrix solve). More...

#include <estimators.hpp>

Inheritance diagram for mfem::L2ZienkiewiczZhuEstimator:
[legend]
Collaboration diagram for mfem::L2ZienkiewiczZhuEstimator:
[legend]

Public Member Functions

 L2ZienkiewiczZhuEstimator (BilinearFormIntegrator &integ, ParGridFunction &sol, ParFiniteElementSpace *flux_fes, ParFiniteElementSpace *smooth_flux_fes)
 Construct a new L2ZienkiewiczZhuEstimator object.
 
 L2ZienkiewiczZhuEstimator (BilinearFormIntegrator &integ, ParGridFunction &sol, ParFiniteElementSpace &flux_fes, ParFiniteElementSpace &smooth_flux_fes)
 Construct a new L2ZienkiewiczZhuEstimator object.
 
void SetLocalErrorNormP (int p)
 Set the exponent, p, of the Lp norm used for computing the local element errors. Default value is 1.
 
virtual real_t GetTotalError () const override
 Return the total error from the last error estimate.
 
virtual const VectorGetLocalErrors () override
 Get a Vector with all element errors.
 
virtual void Reset () override
 Reset the error estimator.
 
virtual ~L2ZienkiewiczZhuEstimator ()
 Destroy a L2ZienkiewiczZhuEstimator object. Destroys, if owned, the FiniteElementSpace, flux_space.
 
- Public Member Functions inherited from mfem::ErrorEstimator
virtual ~ErrorEstimator ()
 Destruct the error estimator.
 
- Public Member Functions inherited from mfem::AbstractErrorEstimator
virtual ~AbstractErrorEstimator ()
 

Protected Member Functions

bool MeshIsModified ()
 Check if the mesh of the solution was modified.
 
void ComputeEstimates ()
 Compute the element error estimates.
 

Protected Attributes

long current_sequence
 
int local_norm_p
 Local L_p norm to use, default is 1.
 
Vector error_estimates
 
real_t total_error
 
BilinearFormIntegratorinteg
 
ParGridFunctionsolution
 
ParFiniteElementSpaceflux_space
 Ownership based on the flag own_flux_fes. Its Update() method is called automatically by this class when needed.
 
ParFiniteElementSpacesmooth_flux_space
 Ownership based on the flag own_flux_fes. Its Update() method is called automatically by this class when needed.
 
bool own_flux_fes
 Ownership flag for flux_space and smooth_flux_space.
 

Detailed Description

The L2ZienkiewiczZhuEstimator class implements the Zienkiewicz-Zhu error estimation procedure where the flux averaging is replaced by a global L2 projection (requiring a mass matrix solve).

The required BilinearFormIntegrator must implement the methods ComputeElementFlux() and ComputeFluxEnergy().

Implemented for the parallel case only.

Definition at line 328 of file estimators.hpp.

Constructor & Destructor Documentation

◆ L2ZienkiewiczZhuEstimator() [1/2]

mfem::L2ZienkiewiczZhuEstimator::L2ZienkiewiczZhuEstimator ( BilinearFormIntegrator & integ,
ParGridFunction & sol,
ParFiniteElementSpace * flux_fes,
ParFiniteElementSpace * smooth_flux_fes )
inline

Construct a new L2ZienkiewiczZhuEstimator object.

Parameters
integThis BilinearFormIntegrator must implement the methods ComputeElementFlux() and ComputeFluxEnergy().
solThe solution field whose error is to be estimated.
flux_fesThe L2ZienkiewiczZhuEstimator assumes ownership of this FiniteElementSpace and will call its Update() method when needed.
smooth_flux_fesThe L2ZienkiewiczZhuEstimator assumes ownership of this FiniteElementSpace and will call its Update() method when needed.

Definition at line 370 of file estimators.hpp.

◆ L2ZienkiewiczZhuEstimator() [2/2]

mfem::L2ZienkiewiczZhuEstimator::L2ZienkiewiczZhuEstimator ( BilinearFormIntegrator & integ,
ParGridFunction & sol,
ParFiniteElementSpace & flux_fes,
ParFiniteElementSpace & smooth_flux_fes )
inline

Construct a new L2ZienkiewiczZhuEstimator object.

Parameters
integThis BilinearFormIntegrator must implement the methods ComputeElementFlux() and ComputeFluxEnergy().
solThe solution field whose error is to be estimated.
flux_fesThe L2ZienkiewiczZhuEstimator does NOT assume ownership of this FiniteElementSpace; will call its Update() method when needed.
smooth_flux_fesThe L2ZienkiewiczZhuEstimator does NOT assume ownership of this FiniteElementSpace; will call its Update() method when needed.

Definition at line 395 of file estimators.hpp.

◆ ~L2ZienkiewiczZhuEstimator()

virtual mfem::L2ZienkiewiczZhuEstimator::~L2ZienkiewiczZhuEstimator ( )
inlinevirtual

Destroy a L2ZienkiewiczZhuEstimator object. Destroys, if owned, the FiniteElementSpace, flux_space.

Definition at line 428 of file estimators.hpp.

Member Function Documentation

◆ ComputeEstimates()

void mfem::L2ZienkiewiczZhuEstimator::ComputeEstimates ( )
protected

Compute the element error estimates.

Definition at line 47 of file estimators.cpp.

◆ GetLocalErrors()

virtual const Vector & mfem::L2ZienkiewiczZhuEstimator::GetLocalErrors ( )
inlineoverridevirtual

Get a Vector with all element errors.

Implements mfem::ErrorEstimator.

Definition at line 417 of file estimators.hpp.

◆ GetTotalError()

virtual real_t mfem::L2ZienkiewiczZhuEstimator::GetTotalError ( ) const
inlineoverridevirtual

Return the total error from the last error estimate.

Reimplemented from mfem::ErrorEstimator.

Definition at line 414 of file estimators.hpp.

◆ MeshIsModified()

bool mfem::L2ZienkiewiczZhuEstimator::MeshIsModified ( )
inlineprotected

Check if the mesh of the solution was modified.

Definition at line 348 of file estimators.hpp.

◆ Reset()

virtual void mfem::L2ZienkiewiczZhuEstimator::Reset ( )
inlineoverridevirtual

Reset the error estimator.

Implements mfem::ErrorEstimator.

Definition at line 424 of file estimators.hpp.

◆ SetLocalErrorNormP()

void mfem::L2ZienkiewiczZhuEstimator::SetLocalErrorNormP ( int p)
inline

Set the exponent, p, of the Lp norm used for computing the local element errors. Default value is 1.

Definition at line 411 of file estimators.hpp.

Member Data Documentation

◆ current_sequence

long mfem::L2ZienkiewiczZhuEstimator::current_sequence
protected

Definition at line 331 of file estimators.hpp.

◆ error_estimates

Vector mfem::L2ZienkiewiczZhuEstimator::error_estimates
protected

Definition at line 333 of file estimators.hpp.

◆ flux_space

ParFiniteElementSpace* mfem::L2ZienkiewiczZhuEstimator::flux_space
protected

Ownership based on the flag own_flux_fes. Its Update() method is called automatically by this class when needed.

Definition at line 339 of file estimators.hpp.

◆ integ

BilinearFormIntegrator& mfem::L2ZienkiewiczZhuEstimator::integ
protected

Definition at line 336 of file estimators.hpp.

◆ local_norm_p

int mfem::L2ZienkiewiczZhuEstimator::local_norm_p
protected

Local L_p norm to use, default is 1.

Definition at line 332 of file estimators.hpp.

◆ own_flux_fes

bool mfem::L2ZienkiewiczZhuEstimator::own_flux_fes
protected

Ownership flag for flux_space and smooth_flux_space.

Definition at line 345 of file estimators.hpp.

◆ smooth_flux_space

ParFiniteElementSpace* mfem::L2ZienkiewiczZhuEstimator::smooth_flux_space
protected

Ownership based on the flag own_flux_fes. Its Update() method is called automatically by this class when needed.

Definition at line 342 of file estimators.hpp.

◆ solution

ParGridFunction& mfem::L2ZienkiewiczZhuEstimator::solution
protected

Definition at line 337 of file estimators.hpp.

◆ total_error

real_t mfem::L2ZienkiewiczZhuEstimator::total_error
protected

Definition at line 334 of file estimators.hpp.


The documentation for this class was generated from the following files: