DOpE
Public Member Functions | Protected Member Functions
DOpE::DWRDataContainerBase< VECTOR > Class Template Referenceabstract

#include <dwrdatacontainer.h>

Inheritance diagram for DOpE::DWRDataContainerBase< VECTOR >:
DOpE::DWRDataContainer< STH, IDC, EDC, FDC, VECTOR > DOpE::ResidualErrorContainer< VECTOR > DOpE::HigherOrderDWRContainer< STH, IDC, EDC, FDC, VECTOR > DOpE::HigherOrderDWRContainerControl< STH, IDC, EDC, FDC, VECTOR > DOpE::H1ResidualErrorContainer< STH, VECTOR, dim > DOpE::L2ResidualErrorContainer< STH, VECTOR, dim >

Public Member Functions

 DWRDataContainerBase (DOpEtypes::EETerms ee_terms=DOpEtypes::EETerms::mixed)
 
virtual ~DWRDataContainerBase ()
 
virtual std::string GetName () const =0
 
virtual void ReInit (unsigned int n_elements)
 
void ReleaseLock ()
 
double GetError () const
 
double GetPrimalError () const
 
double GetDualError () const
 
double GetControlError () const
 
const Vector< double > & GetErrorIndicators () const
 
Vector< double > & GetPrimalErrorIndicators ()
 
const Vector< double > & GetPrimalErrorIndicators () const
 
Vector< double > & GetDualErrorIndicators ()
 
const Vector< double > & GetDualErrorIndicators () const
 
Vector< double > & GetControlErrorIndicators ()
 
const Vector< double > & GetControlErrorIndicators () const
 
Vector< double > & GetErrorIndicators (unsigned int i)
 
const Vector< double > & GetErrorIndicators (unsigned int i) const
 
unsigned int GetNErrorComps () const
 
std::vector< const Vector
< double > * > 
GetAllErrorIndicators () const
 
virtual
DOpEtypes::WeightComputation 
GetWeightComputation () const =0
 
virtual
DOpEtypes::ResidualEvaluation 
GetResidualEvaluation () const =0
 
DOpEtypes::EETerms GetEETerms () const
 
template<class PROBLEM , class INTEGRATOR >
void ComputeRefinementIndicators (PROBLEM &problem, INTEGRATOR &integrator)
 
virtual bool NeedDual () const =0
 
const std::map< std::string,
const VECTOR * > & 
GetWeightData () const
 
void ClearWeightData ()
 
void PrepareWeights (const StateVector< VECTOR > &u, const StateVector< VECTOR > &z)
 
void PrepareWeights (const ControlVector< VECTOR > &q)
 

Protected Member Functions

virtual StateVector< VECTOR > & GetPI_h_u ()=0
 
virtual StateVector< VECTOR > & GetPI_h_z ()=0
 
virtual ControlVector< VECTOR > & GetPI_h_q ()=0
 
virtual void PreparePI_h_u (const StateVector< VECTOR > &u)=0
 
virtual void PreparePI_h_z (const StateVector< VECTOR > &z)=0
 
virtual void PreparePI_h_q (const ControlVector< VECTOR > &q)=0
 
void AddWeightData (std::string name, const VECTOR *new_data)
 

Detailed Description

template<typename VECTOR>
class DOpE::DWRDataContainerBase< VECTOR >

This class hosts all the information we need for the error evaluation (weights, additional needed DoF handler, error indicators.)

DWRDataContainerBase is a base/interface class. As there are different possibilities to implement the DWR method, for example the computation of the weights is outsourced to the derived classes.

VECTOR Vector type used in the computation used in the computation of the PDE solution.

Constructor & Destructor Documentation

template<typename VECTOR >
DOpE::DWRDataContainerBase< VECTOR >::DWRDataContainerBase ( DOpEtypes::EETerms  ee_terms = DOpEtypes::EETerms::mixed)
inline
template<typename VECTOR >
virtual DOpE::DWRDataContainerBase< VECTOR >::~DWRDataContainerBase ( )
inlinevirtual

Member Function Documentation

template<typename VECTOR >
void DOpE::DWRDataContainerBase< VECTOR >::AddWeightData ( std::string  name,
const VECTOR *  new_data 
)
inlineprotected
template<typename VECTOR >
void DOpE::DWRDataContainerBase< VECTOR >::ClearWeightData ( )
inline

Deletes the weights.

template<typename VECTOR >
template<class PROBLEM , class INTEGRATOR >
void DOpE::DWRDataContainerBase< VECTOR >::ComputeRefinementIndicators ( PROBLEM &  problem,
INTEGRATOR &  integrator 
)
inline

TODO We would like DWRDataContainerBase in the solution algorithms, but we need the specialication in the integrator.ComputeRefinementIndicators. How to achieve this?

template<typename VECTOR >
std::vector<const Vector<double>*> DOpE::DWRDataContainerBase< VECTOR >::GetAllErrorIndicators ( ) const
inline

Returns the a vector of pointers to the primal, dual and 'summed up' (according to the enum EEterms) error indicators.

Returns
Vector of pointers to the 'summed up' error indicators, the primal error indicators and the dual indicators (in this order).
template<typename VECTOR >
double DOpE::DWRDataContainerBase< VECTOR >::GetControlError ( ) const
inline

This function sums up the entries of the vector of the error indicators. So make sure this vector is correctly filled (reminder: after computing the error indicators, make sure that you call ReleaseLock()1)

@ return Error in the previously specified functional.

template<typename VECTOR >
Vector<double>& DOpE::DWRDataContainerBase< VECTOR >::GetControlErrorIndicators ( )
inline

Returns the vector of the error indicators. You have to call ReleaseLock() prior to this function.

Returns
Vector of raw control error indicators (i.e. with sign)
template<typename VECTOR >
const Vector<double>& DOpE::DWRDataContainerBase< VECTOR >::GetControlErrorIndicators ( ) const
inline
template<typename VECTOR >
double DOpE::DWRDataContainerBase< VECTOR >::GetDualError ( ) const
inline

This function sums up the entries of the vector of the error indicators. So make sure this vector is correctly filled (reminder: after computing the error indicators, make sure that you call ReleaseLock()1)

@ return Error in the previously specified functional.

template<typename VECTOR >
Vector<double>& DOpE::DWRDataContainerBase< VECTOR >::GetDualErrorIndicators ( )
inline

Returns the vector of the dual error indicators. You dont have to call ReleaseLock() prior to this function.

Returns
Vector of raw dual error indicators (i.e. with sign)
template<typename VECTOR >
const Vector<double>& DOpE::DWRDataContainerBase< VECTOR >::GetDualErrorIndicators ( ) const
inline
template<typename VECTOR >
DOpEtypes::EETerms DOpE::DWRDataContainerBase< VECTOR >::GetEETerms ( ) const
inline
Returns
Which terms do we compute for the error evaluation? See dopetypes.h for the possibilities.
template<typename VECTOR >
double DOpE::DWRDataContainerBase< VECTOR >::GetError ( ) const
inline

This function sums up the entries of the vector of the error indicators. So make sure this vector is correctly filled (reminder: after computing the error indicators, make sure that you call ReleaseLock()1)

@ return Error in the previously specified functional.

template<typename VECTOR >
const Vector<double>& DOpE::DWRDataContainerBase< VECTOR >::GetErrorIndicators ( ) const
inline

Returns the vector of the error indicators. You have to call ReleaseLock() prior to this function.

Returns
Vector of raw error indicators (i.e. with sign)
template<typename VECTOR >
Vector<double>& DOpE::DWRDataContainerBase< VECTOR >::GetErrorIndicators ( unsigned int  i)
inline

Returns the vector of the error indicators. You have to call ReleaseLock() prior to this function.

Returns
Vector of raw error indicators given by the index 0 = primal, 1 = dual, 2 = control
template<typename VECTOR >
const Vector<double>& DOpE::DWRDataContainerBase< VECTOR >::GetErrorIndicators ( unsigned int  i) const
inline
template<typename VECTOR >
virtual std::string DOpE::DWRDataContainerBase< VECTOR >::GetName ( ) const
pure virtual
template<typename VECTOR >
unsigned int DOpE::DWRDataContainerBase< VECTOR >::GetNErrorComps ( ) const
inline
template<typename VECTOR >
virtual ControlVector<VECTOR>& DOpE::DWRDataContainerBase< VECTOR >::GetPI_h_q ( )
protectedpure virtual
template<typename VECTOR >
virtual StateVector<VECTOR>& DOpE::DWRDataContainerBase< VECTOR >::GetPI_h_u ( )
protectedpure virtual
template<typename VECTOR >
virtual StateVector<VECTOR>& DOpE::DWRDataContainerBase< VECTOR >::GetPI_h_z ( )
protectedpure virtual
template<typename VECTOR >
double DOpE::DWRDataContainerBase< VECTOR >::GetPrimalError ( ) const
inline

This function sums up the entries of the vector of the error indicators. So make sure this vector is correctly filled (reminder: after computing the error indicators, make sure that you call ReleaseLock()1)

@ return Error in the previously specified functional.

template<typename VECTOR >
Vector<double>& DOpE::DWRDataContainerBase< VECTOR >::GetPrimalErrorIndicators ( )
inline

Returns the vector of the error indicators. You have to call ReleaseLock() prior to this function.

Returns
Vector of raw primal error indicators (i.e. with sign)
template<typename VECTOR >
const Vector<double>& DOpE::DWRDataContainerBase< VECTOR >::GetPrimalErrorIndicators ( ) const
inline
template<typename VECTOR >
virtual DOpEtypes::ResidualEvaluation DOpE::DWRDataContainerBase< VECTOR >::GetResidualEvaluation ( ) const
pure virtual
template<typename VECTOR >
virtual DOpEtypes::WeightComputation DOpE::DWRDataContainerBase< VECTOR >::GetWeightComputation ( ) const
pure virtual
template<typename VECTOR >
const std::map<std::string, const VECTOR*>& DOpE::DWRDataContainerBase< VECTOR >::GetWeightData ( ) const
inline

Returns the FE-VECTORS of the weights used in the error evaluation.

Returns
maps between string and VECTOR-pointer, where the latter hold the information of the weight-functions.
template<typename VECTOR >
virtual bool DOpE::DWRDataContainerBase< VECTOR >::NeedDual ( ) const
pure virtual

Specifies, if we need the solution of the adjoint equation. Pure virtual.

Returns
Do we need the computation of a adjoint equation?

Implemented in DOpE::H1ResidualErrorContainer< STH, VECTOR, dim >, DOpE::HigherOrderDWRContainerControl< STH, IDC, EDC, FDC, VECTOR >, DOpE::HigherOrderDWRContainer< STH, IDC, EDC, FDC, VECTOR >, and DOpE::L2ResidualErrorContainer< STH, VECTOR, dim >.

template<typename VECTOR >
virtual void DOpE::DWRDataContainerBase< VECTOR >::PreparePI_h_q ( const ControlVector< VECTOR > &  q)
protectedpure virtual
template<typename VECTOR >
virtual void DOpE::DWRDataContainerBase< VECTOR >::PreparePI_h_u ( const StateVector< VECTOR > &  u)
protectedpure virtual
template<typename VECTOR >
virtual void DOpE::DWRDataContainerBase< VECTOR >::PreparePI_h_z ( const StateVector< VECTOR > &  z)
protectedpure virtual
template<typename VECTOR >
void DOpE::DWRDataContainerBase< VECTOR >::PrepareWeights ( const StateVector< VECTOR > &  u,
const StateVector< VECTOR > &  z 
)
inline

Computes the functions that compute the weights and puts them into weight_data_.

Parameters
uThe FE-vector of the primal solution.
zThe FE-vector of the dual solution.
template<typename VECTOR >
void DOpE::DWRDataContainerBase< VECTOR >::PrepareWeights ( const ControlVector< VECTOR > &  q)
inline

Computes the functions that compute the weights and puts them into weight_data_.

Parameters
qThe FE-vector of the control.
template<typename VECTOR >
void DOpE::DWRDataContainerBase< VECTOR >::ReInit ( unsigned int  n_elements)
virtual

This initializes the vector of the error indicators and locks them. The vector of the error indicators can only get returned if the lock is released (see ReleaseLock()).

Reimplemented in DOpE::H1ResidualErrorContainer< STH, VECTOR, dim >, DOpE::L2ResidualErrorContainer< STH, VECTOR, dim >, DOpE::HigherOrderDWRContainerControl< STH, IDC, EDC, FDC, VECTOR >, and DOpE::HigherOrderDWRContainer< STH, IDC, EDC, FDC, VECTOR >.

template<typename VECTOR >
void DOpE::DWRDataContainerBase< VECTOR >::ReleaseLock ( )
inline

Releases the lock and fills the vector of error indicators accordingly to the previously given EETerms-enum (see dopetypes.h). It basically sums up the primal and dual error indicators using the rule given by EETerms.


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