OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
FuelCell::ApplicationCore::ApplicationWrapper Class Reference

This class implements either iterative or time-stepping wrapper of applications. More...

#include <application_wrapper.h>

Inheritance diagram for FuelCell::ApplicationCore::ApplicationWrapper:
Inheritance graph
[legend]
Collaboration diagram for FuelCell::ApplicationCore::ApplicationWrapper:
Collaboration graph
[legend]

Public Member Functions

 ApplicationWrapper (ApplicationBase &app)
 Constructor for a derived application. More...
 
 ~ApplicationWrapper ()
 Destructor. More...
 
virtual void declare_parameters (ParameterHandler &param)
 Declare parameters for a parameter file. More...
 
virtual void initialize (ParameterHandler &param)
 Pure virtual initialization function. More...
 
virtual void remesh ()
 Generate the next mesh depending on the mesh generation parameters. More...
 
virtual void init_vector (FEVector &dst) const
 Initialize vector to problem size. More...
 
virtual double residual (FEVector &dst, const FEVectors &src, bool apply_boundaries=true)
 Compute residual of src and store it into dst. More...
 
virtual void solve (FEVector &dst, const FEVectors &src)
 Solve the system assembled with right hand side in FEVectors src and return the result in FEVector dst. More...
 
virtual void Tsolve (FEVector &dst, const FEVectors &src)
 Solve the dual system assembled with right hand side rhs and return the result in start. More...
 
virtual double estimate (const FEVectors &src)
 Estimate cell-wise errors. More...
 
virtual double evaluate (const FEVectors &src)
 Evaluate a functional. More...
 
virtual void grid_out (const std::string &filename) const
 
virtual void data_out (const std::string &filename, const FEVectors &src)
 Write data in the format specified by the ParameterHandler. More...
 
virtual std::string id () const
 Return a unique identification string for this application. More...
 
virtual void notify (const Event &reason)
 Add a reason for assembling. More...
 
- Public Member Functions inherited from FuelCell::ApplicationCore::ApplicationBase
 ApplicationBase (boost::shared_ptr< ApplicationData > data=boost::shared_ptr< ApplicationData >())
 Constructor for an application. More...
 
 ApplicationBase (const ApplicationBase &other)
 Copy constructor. More...
 
virtual ~ApplicationBase ()
 Virtual destructor. More...
 
void print_parameters_to_file (ParameterHandler &param, const std::string &file_name, const ParameterHandler::OutputStyle &style)
 Print default parameters for the application to a file. More...
 
virtual void start_vector (FEVector &dst, std::string) const
 Initialize vector to problem size. More...
 
virtual void grid_out (const std::string &)
 Write the mesh in the format specified by the ParameterHandler. More...
 
boost::shared_ptr
< ApplicationData
get_data ()
 Get access to the protected variable data. More...
 
const boost::shared_ptr
< ApplicationData
get_data () const
 Get read-only access to the protected variable data. More...
 
virtual void clear ()
 All true in notifications. More...
 
virtual void clear_events ()
 All false in notifications. More...
 
virtual unsigned int get_solution_index ()
 Returns solution index. More...
 

Protected Member Functions

SmartPointer< ApplicationBaseget_wrapped_application ()
 Gain access to the inner application. More...
 
- Protected Member Functions inherited from FuelCell::ApplicationCore::ApplicationBase
void print_caller_name (const std::string &caller_name) const
 Print caller name. More...
 

Protected Attributes

SmartPointer< ApplicationBaseapp
 Pointer to the application this one depends upon. More...
 
- Protected Attributes inherited from FuelCell::ApplicationCore::ApplicationBase
boost::shared_ptr
< ApplicationData
data
 Object for auxiliary data. More...
 
Event notifications
 Accumulate reasons for assembling here. More...
 

Detailed Description

This class implements either iterative or time-stepping wrapper of applications.

Author
Guido Kanschat

Constructor & Destructor Documentation

FuelCell::ApplicationCore::ApplicationWrapper::ApplicationWrapper ( ApplicationBase app)

Constructor for a derived application.

A SmartPointer to app is stored in the wrapper. Therefore, app must live longer than the ApplicationWrapper object.

FuelCell::ApplicationCore::ApplicationWrapper::~ApplicationWrapper ( )

Destructor.

Member Function Documentation

virtual void FuelCell::ApplicationCore::ApplicationWrapper::data_out ( const std::string &  filename,
const FEVectors src 
)
virtual

Write data in the format specified by the ParameterHandler.

Pure virtual.

Reimplemented from FuelCell::ApplicationCore::ApplicationBase.

virtual void FuelCell::ApplicationCore::ApplicationWrapper::declare_parameters ( ParameterHandler &  param)
virtual
virtual double FuelCell::ApplicationCore::ApplicationWrapper::estimate ( const FEVectors )
virtual

Estimate cell-wise errors.

Pure virtual.

Reimplemented from FuelCell::ApplicationCore::ApplicationBase.

virtual double FuelCell::ApplicationCore::ApplicationWrapper::evaluate ( const FEVectors )
virtual

Evaluate a functional.

Pure virtual.

Reimplemented from FuelCell::ApplicationCore::ApplicationBase.

SmartPointer<ApplicationBase> FuelCell::ApplicationCore::ApplicationWrapper::get_wrapped_application ( )
inlineprotected

Gain access to the inner application.

virtual void FuelCell::ApplicationCore::ApplicationWrapper::grid_out ( const std::string &  filename) const
virtual
virtual std::string FuelCell::ApplicationCore::ApplicationWrapper::id ( ) const
virtual

Return a unique identification string for this application.

In particular, it returns the name of the class in which the object you requested id() from belongs to.

For example:

* cBase* a = new cBase
* cBase* b = new cDerived
*

then,

* a->id() will return cBase and
* b->id() will return cDerived
*

Reimplemented from FuelCell::ApplicationCore::ApplicationBase.

virtual void FuelCell::ApplicationCore::ApplicationWrapper::init_vector ( FEVector ) const
virtual

Initialize vector to problem size.

Pure virtual.

Reimplemented from FuelCell::ApplicationCore::ApplicationBase.

virtual void FuelCell::ApplicationCore::ApplicationWrapper::initialize ( ParameterHandler &  param)
virtual

Pure virtual initialization function.

This member function is used to read the parameters declared in the constructor from ParameterHandler and then, used to initialize all object including the object that generates the mesh and Equation, Layer, Kinetics, Material objects.

Note
This function must be overloaded in any derived class using its own values from the parameter file.
Initialization functions of derived classes must make sure to call all functions initialize() of the base classes.

Implements FuelCell::ApplicationCore::ApplicationBase.

Reimplemented in FuelCell::ApplicationCore::newtonBase, FuelCell::ApplicationCore::Newton3pp, FuelCell::ApplicationCore::NewtonLineSearch, FuelCell::ApplicationCore::AdaptiveRefinement< dim >, FuelCell::ApplicationCore::ThetaScheme, FuelCell::ApplicationCore::PicardBase, FuelCell::ApplicationCore::TransientBase, FuelCell::ApplicationCore::Picard, and FuelCell::ApplicationCore::NewtonBasic.

virtual void FuelCell::ApplicationCore::ApplicationWrapper::notify ( const Event reason)
virtual

Add a reason for assembling.

Reimplemented from FuelCell::ApplicationCore::ApplicationBase.

virtual void FuelCell::ApplicationCore::ApplicationWrapper::remesh ( )
virtual

Generate the next mesh depending on the mesh generation parameters.

Pure virtual.

Reimplemented from FuelCell::ApplicationCore::ApplicationBase.

virtual double FuelCell::ApplicationCore::ApplicationWrapper::residual ( FEVector ,
const FEVectors ,
bool  apply_boundaries = true 
)
virtual

Compute residual of src and store it into dst.

The bool variable is used to specify if boundary conditions should be applied using FilteredMatrix.

Pure virtual.

Reimplemented from FuelCell::ApplicationCore::ApplicationBase.

virtual void FuelCell::ApplicationCore::ApplicationWrapper::solve ( FEVector dst,
const FEVectors src 
)
virtual
virtual void FuelCell::ApplicationCore::ApplicationWrapper::Tsolve ( FEVector ,
const FEVectors  
)
virtual

Solve the dual system assembled with right hand side rhs and return the result in start.

Pure virtual.

Reimplemented from FuelCell::ApplicationCore::ApplicationBase.

Member Data Documentation

SmartPointer<ApplicationBase> FuelCell::ApplicationCore::ApplicationWrapper::app
protected

Pointer to the application this one depends upon.


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