MFEM  v3.2
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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. More...
 
 L2ZienkiewiczZhuEstimator (BilinearFormIntegrator &integ, ParGridFunction &sol, ParFiniteElementSpace &flux_fes, ParFiniteElementSpace &smooth_flux_fes)
 Construct a new L2ZienkiewiczZhuEstimator object. More...
 
void SetLocalErrorNormP (int p)
 Set the exponent, p, of the Lp norm used for computing the local element errors. Default value is 1. More...
 
double GetTotalError () const
 Return the total error from the last error estimate. More...
 
virtual const VectorGetLocalErrors ()
 Get a Vector with all element errors. More...
 
virtual void Reset ()
 Reset the error estimator. More...
 
virtual ~L2ZienkiewiczZhuEstimator ()
 Destroy a L2ZienkiewiczZhuEstimator object. Destroys, if owned, the FiniteElementSpace, flux_space. More...
 
- Public Member Functions inherited from mfem::ErrorEstimator
virtual ~ErrorEstimator ()
 

Protected Member Functions

void Init (BilinearFormIntegrator &integ, ParGridFunction &sol, ParFiniteElementSpace *flux_fes, ParFiniteElementSpace *smooth_flux_fes)
 
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
 Local L_p norm to use, default is 1. More...
 
Vector error_estimates
 
double total_error
 
BilinearFormIntegratorinteg
 Not owned. More...
 
ParGridFunctionsolution
 Not owned. More...
 
ParFiniteElementSpaceflux_space
 Ownership based on the flag own_flux_fes. Its Update() method is called automatically by this class when needed. More...
 
ParFiniteElementSpacesmooth_flux_space
 Ownership based on the flag own_flux_fes. Its Update() method is called automatically by this class when needed. More...
 
bool own_flux_fes
 Ownership flag for flux_space and smooth_flux_space. More...
 

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 183 of file estimators.hpp.

Constructor & Destructor Documentation

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 239 of file estimators.hpp.

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 256 of file estimators.hpp.

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

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

Definition at line 281 of file estimators.hpp.

Member Function Documentation

void mfem::L2ZienkiewiczZhuEstimator::ComputeEstimates ( )
protected

Compute the element error estimates.

Definition at line 34 of file estimators.cpp.

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

Get a Vector with all element errors.

Implements mfem::ErrorEstimator.

Definition at line 270 of file estimators.hpp.

double mfem::L2ZienkiewiczZhuEstimator::GetTotalError ( ) const
inline

Return the total error from the last error estimate.

Definition at line 267 of file estimators.hpp.

void mfem::L2ZienkiewiczZhuEstimator::Init ( BilinearFormIntegrator integ,
ParGridFunction sol,
ParFiniteElementSpace flux_fes,
ParFiniteElementSpace smooth_flux_fes 
)
inlineprotected

Definition at line 202 of file estimators.hpp.

bool mfem::L2ZienkiewiczZhuEstimator::MeshIsModified ( )
inlineprotected

Check if the mesh of the solution was modified.

Definition at line 217 of file estimators.hpp.

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

Reset the error estimator.

Implements mfem::ErrorEstimator.

Definition at line 277 of file estimators.hpp.

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 264 of file estimators.hpp.

Member Data Documentation

long mfem::L2ZienkiewiczZhuEstimator::current_sequence
protected

Definition at line 186 of file estimators.hpp.

Vector mfem::L2ZienkiewiczZhuEstimator::error_estimates
protected

Definition at line 188 of file estimators.hpp.

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 194 of file estimators.hpp.

BilinearFormIntegrator* mfem::L2ZienkiewiczZhuEstimator::integ
protected

Not owned.

Definition at line 191 of file estimators.hpp.

int mfem::L2ZienkiewiczZhuEstimator::local_norm_p
protected

Local L_p norm to use, default is 1.

Definition at line 187 of file estimators.hpp.

bool mfem::L2ZienkiewiczZhuEstimator::own_flux_fes
protected

Ownership flag for flux_space and smooth_flux_space.

Definition at line 200 of file estimators.hpp.

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 197 of file estimators.hpp.

ParGridFunction* mfem::L2ZienkiewiczZhuEstimator::solution
protected

Not owned.

Definition at line 192 of file estimators.hpp.

double mfem::L2ZienkiewiczZhuEstimator::total_error
protected

Definition at line 189 of file estimators.hpp.


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