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

#include <outputhandler.h>

Inheritance diagram for DOpE::ReducedProblemInterface_Base< VECTOR >:
DOpE::PDEProblemInterface< PROBLEM, VECTOR, dealdim > DOpE::ReducedProblemInterface< PROBLEM, VECTOR > DOpE::StatPDEProblem< NONLINEARSOLVER, INTEGRATOR, PROBLEM, VECTOR, dealdim > DOpE::InstatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim > DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >

Public Member Functions

 ReducedProblemInterface_Base ()
 
virtual ~ReducedProblemInterface_Base ()
 
virtual void StateSizeInfo (std::stringstream &out)=0
 
virtual void WriteToFile (const VECTOR &v, std::string name, std::string outfile, std::string dof_type, std::string filetype)=0
 
virtual void WriteToFileElementwise (const Vector< double > &, std::string, std::string, std::string, std::string)
 
virtual void WriteToFile (const ControlVector< VECTOR > &v, std::string name, std::string dof_type)=0
 
virtual void WriteToFile (const std::vector< double > &v, std::string outfile)=0
 
void RegisterOutputHandler (DOpEOutputHandler< VECTOR > *OH)
 
void RegisterExceptionHandler (DOpEExceptionHandler< VECTOR > *OH)
 
DOpEExceptionHandler< VECTOR > * GetExceptionHandler ()
 
DOpEOutputHandler< VECTOR > * GetOutputHandler ()
 
double GetFunctionalValue (std::string name) const
 
const std::vector< double > & GetTimeFunctionalValue (std::string name) const
 
void AddUserDomainData (std::string name, const VECTOR *new_data)
 
void DeleteUserDomainData (std::string name)
 

Protected Member Functions

void InitializeFunctionalValues (unsigned int N)
 
std::vector< std::vector
< double > > & 
GetFunctionalValues ()
 
const std::vector< std::vector
< double > > & 
GetFunctionalValues () const
 
const std::map< std::string,
const VECTOR * > & 
GetUserDomainData () const
 
virtual const std::map
< std::string, unsigned int > & 
GetFunctionalPosition () const
 

Detailed Description

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

The base class for all solvers. Defines the non dimension dependent interface for the output handling

Constructor & Destructor Documentation

template<typename VECTOR>
DOpE::ReducedProblemInterface_Base< VECTOR >::ReducedProblemInterface_Base ( )
inline
template<typename VECTOR>
virtual DOpE::ReducedProblemInterface_Base< VECTOR >::~ReducedProblemInterface_Base ( )
inlinevirtual

Member Function Documentation

template<typename VECTOR>
void DOpE::ReducedProblemInterface_Base< VECTOR >::AddUserDomainData ( std::string  name,
const VECTOR *  new_data 
)
inline

The user can add his own Domain Data (for example the coefficient vector of a finite element function). The user has to make sure that the vector new_data has the appropriate length. This data is the accessible in the integrator routines.

Parameters
nameThe unique identifier for the data-vector.
new_dataThe vector one wishes to add.
template<typename VECTOR>
void DOpE::ReducedProblemInterface_Base< VECTOR >::DeleteUserDomainData ( std::string  name)
inline

This function allows to delete user-given domain data vectors, see AddUserDomainData.

template<typename VECTOR>
DOpEExceptionHandler<VECTOR>* DOpE::ReducedProblemInterface_Base< VECTOR >::GetExceptionHandler ( )
inline
template<typename VECTOR>
virtual const std::map<std::string, unsigned int>& DOpE::ReducedProblemInterface_Base< VECTOR >::GetFunctionalPosition ( ) const
inlineprotectedvirtual

This has to get implemented in the derived classes like optproblem, pdeproblemcontainer etc. It returns a map connecting the names of the added functionals with their position in functional_values_. If a cost functional is present, its values are always stored in functional_values_[0]. Auxiliary functionals are stored after the cost functional (present or not!) in the order as they are added.

Reimplemented in DOpE::ReducedProblemInterface< PROBLEM, VECTOR >, and DOpE::PDEProblemInterface< PROBLEM, VECTOR, dealdim >.

template<typename VECTOR>
double DOpE::ReducedProblemInterface_Base< VECTOR >::GetFunctionalValue ( std::string  name) const
inline

Grants access to the computed value of the functional named 'name'. This method should be used in the stationary case, see GetTimeFunctionalValue for the instationary one.

Returns
Value of the functional in question.
Parameters
nameName of the functional in question.
template<typename VECTOR>
std::vector<std::vector<double> >& DOpE::ReducedProblemInterface_Base< VECTOR >::GetFunctionalValues ( )
inlineprotected
template<typename VECTOR>
const std::vector<std::vector<double> >& DOpE::ReducedProblemInterface_Base< VECTOR >::GetFunctionalValues ( ) const
inlineprotected
template<typename VECTOR>
DOpEOutputHandler<VECTOR>* DOpE::ReducedProblemInterface_Base< VECTOR >::GetOutputHandler ( )
inline
template<typename VECTOR>
const std::vector<double>& DOpE::ReducedProblemInterface_Base< VECTOR >::GetTimeFunctionalValue ( std::string  name) const
inline

Grants access to the computed value of the functional named 'name'. This should be used in the instationary case.

Returns
Value of the functional in question.
Parameters
nameName of the functional in question.
template<typename VECTOR>
const std::map<std::string, const VECTOR*>& DOpE::ReducedProblemInterface_Base< VECTOR >::GetUserDomainData ( ) const
inlineprotected
template<typename VECTOR>
void DOpE::ReducedProblemInterface_Base< VECTOR >::InitializeFunctionalValues ( unsigned int  N)
inlineprotected

Resets the functional_values_ to their proper size.

@ param N Number of functionals (aux + cost).

template<typename VECTOR>
void DOpE::ReducedProblemInterface_Base< VECTOR >::RegisterExceptionHandler ( DOpEExceptionHandler< VECTOR > *  OH)
inline
template<typename VECTOR>
void DOpE::ReducedProblemInterface_Base< VECTOR >::RegisterOutputHandler ( DOpEOutputHandler< VECTOR > *  OH)
inline
template<typename VECTOR>
virtual void DOpE::ReducedProblemInterface_Base< VECTOR >::StateSizeInfo ( std::stringstream &  out)
pure virtual
template<typename VECTOR>
virtual void DOpE::ReducedProblemInterface_Base< VECTOR >::WriteToFile ( const VECTOR &  v,
std::string  name,
std::string  outfile,
std::string  dof_type,
std::string  filetype 
)
pure virtual

Basic function to write vectors in files.

Parameters
vThe BlockVector to write to a file.
nameThe names of the variables, e.g., in a fluid problem: v1, v2, p.
outfileThe basic name for the output file to print.
dof_typeHas the DoF type: state or control.
filetypeThe filetype. Actually, *.vtk outputs are possible.

Implemented in DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >, DOpE::InstatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >, and DOpE::StatPDEProblem< NONLINEARSOLVER, INTEGRATOR, PROBLEM, VECTOR, dealdim >.

template<typename VECTOR>
virtual void DOpE::ReducedProblemInterface_Base< VECTOR >::WriteToFile ( const ControlVector< VECTOR > &  v,
std::string  name,
std::string  dof_type 
)
pure virtual
template<typename VECTOR>
virtual void DOpE::ReducedProblemInterface_Base< VECTOR >::WriteToFile ( const std::vector< double > &  v,
std::string  outfile 
)
pure virtual
template<typename VECTOR>
virtual void DOpE::ReducedProblemInterface_Base< VECTOR >::WriteToFileElementwise ( const Vector< double > &  ,
std::string  ,
std::string  ,
std::string  ,
std::string   
)
inlinevirtual

Basic function to write vectors containing element-related data in files.

Parameters
vThe BlockVector to write to a file.
nameThe names of the variables, e.g., in a fluid problem: v1, v2, p.
outfileThe basic name for the output file to print.
dof_typeHas the DoF type: state or control.
filetypeThe filetype. Actually, *.vtk outputs are possible.

Reimplemented in DOpE::StatPDEProblem< NONLINEARSOLVER, INTEGRATOR, PROBLEM, VECTOR, dealdim >.


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