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 Attributes | List of all members
AppFrame::ApplicationCopy Class Reference

Base class for non-terminal applications. More...

#include <application_copy.h>

Inheritance diagram for AppFrame::ApplicationCopy:
Inheritance graph
[legend]
Collaboration diagram for AppFrame::ApplicationCopy:
Collaboration graph
[legend]

Public Member Functions

 ApplicationCopy (ApplicationBase &ex_app)
 Constructor for a derived application.
 
 ~ApplicationCopy ()
 
virtual void declare_parameters (ParameterHandler &param)
 Declare parameters for a parameter file.
 
virtual void initialize (ParameterHandler &param)
 Pure virtual initialization function.
 
virtual void remesh ()
 Generates the next mesh depending on the mesh generation parameters.
 
virtual void init_vector (FEVector &dst) const
 Initialize vector to problem size.
 
virtual void start_vector (FEVector &dst, std::string caller) const
 Initialize vector to problem size.
 
virtual double residual (FEVector &dst, const FEVectors &src)
 
virtual void solve (FEVector &start, const FEVectors &rhs)
 Solve the system assembled with right hand side rhs and return the result in start.
 
virtual void Tsolve (FEVector &start, const FEVectors &rhs)
 Solve the dual system assembled with right hand side rhs and return the result in start.
 
virtual double estimate (const FEVectors &src)
 Error estimation.
 
virtual double evaluate (const FEVectors &src)
 Evaluate whatever the simulation was made for.
 
virtual void grid_out (const std::string &filename) const
 Write the mesh in the format specified by the ParameterHandler.
 
virtual void data_out (const std::string &filename, const FEVectors &src)
 Write data in the format specified by the ParameterHandler.
 
virtual std::string id () const
 Return a unique identification string for this application.
 
virtual void notify (const Event &reason)
 Add a reason for assembling.
 
- Public Member Functions inherited from AppFrame::ApplicationBase
 ApplicationBase (boost::shared_ptr< ApplicationData > ex_data=boost::shared_ptr< ApplicationData >())
 Constructor for an application.
 
 ApplicationBase (const ApplicationBase &other)
 Copy constructor.
 
virtual ~ApplicationBase ()
 Virtual destructor.
 
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.
 
virtual double residual (FEVector &dst, const FEVectors &src, bool apply_boundaries=true)
 Compute residual of src and store it into dst.
 
virtual void data_out (const std::string &filename, const FEVectors &src, const std::vector< std::string >)
 
boost::shared_ptr
< ApplicationData
get_data ()
 Get access to the protected variable data.
 
const boost::shared_ptr
< ApplicationData
get_data () const
 Get read-only access to the protected variable data.
 
virtual void clear ()
 Reset the application class such that a call to initialize() is possible again and will produce the same result as if the object was fresh.
 
void clear_events ()
 Clear all notifications.
 

Protected Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from AppFrame::ApplicationBase
void print_caller_name (const std::string &caller_name) const
 Print caller name.
 

Detailed Description

Base class for non-terminal applications.

Whenever a derived class does not implement a function of the interface of ApplicationBase, this function is forwarded to the next application in the chain.

Constructor & Destructor Documentation

AppFrame::ApplicationCopy::ApplicationCopy ( ApplicationBase ex_app)
inline

Constructor for a derived application.

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

AppFrame::ApplicationCopy::~ApplicationCopy ( )
inline

Member Function Documentation

virtual void AppFrame::ApplicationCopy::data_out ( const std::string &  filename,
const FEVectors src 
)
inlinevirtual

Write data in the format specified by the ParameterHandler.

Reimplemented from AppFrame::ApplicationBase.

Reimplemented in AppFrame::DoFMeshLoop< dim >, and AppFrame::MeshLoop.

virtual void AppFrame::ApplicationCopy::declare_parameters ( ParameterHandler &  param)
inlinevirtual

Declare parameters for a parameter file.

Pure virtual function MUST be redeclared in derived classes.

Implements AppFrame::ApplicationBase.

Reimplemented in AppFrame::DoFMeshLoop< dim >, AppFrame::ThetaTimestepping, AppFrame::newtonBase, AppFrame::Newton, AppFrame::Random, AppFrame::MeshLoop, AppFrame::NewtonBasic, AppFrame::NewtonLineSearch, and AppFrame::RungeKuttaExplicit.

virtual double AppFrame::ApplicationCopy::estimate ( const FEVectors src)
inlinevirtual

Error estimation.

Reimplemented from AppFrame::ApplicationBase.

virtual double AppFrame::ApplicationCopy::evaluate ( const FEVectors src)
inlinevirtual

Evaluate whatever the simulation was made for.

Reimplemented from AppFrame::ApplicationBase.

virtual void AppFrame::ApplicationCopy::grid_out ( const std::string &  filename) const
inlinevirtual

Write the mesh in the format specified by the ParameterHandler.

Reimplemented from AppFrame::ApplicationBase.

virtual std::string AppFrame::ApplicationCopy::id ( ) const
inlinevirtual

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 AppFrame::ApplicationBase.

virtual void AppFrame::ApplicationCopy::init_vector ( FEVector dst) const
inlinevirtual

Initialize vector to problem size.

Reimplemented from AppFrame::ApplicationBase.

virtual void AppFrame::ApplicationCopy::initialize ( ParameterHandler &  param)
inlinevirtual

Pure virtual initialization function.

Here, the parameters declared in the constructor are actually read from ParameterHandler.

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 AppFrame::ApplicationBase.

Reimplemented in AppFrame::DoFMeshLoop< dim >, AppFrame::ThetaTimestepping, AppFrame::newtonBase, AppFrame::Newton, AppFrame::Random, AppFrame::MeshLoop, AppFrame::NewtonBasic, AppFrame::NewtonLineSearch, and AppFrame::RungeKuttaExplicit.

virtual void AppFrame::ApplicationCopy::notify ( const Event reason)
inlinevirtual

Add a reason for assembling.

The new reason is binary or'd with the previous ones.

Reimplemented from AppFrame::ApplicationBase.

virtual void AppFrame::ApplicationCopy::remesh ( )
inlinevirtual

Generates the next mesh depending on the mesh generation parameters.

Reimplemented from AppFrame::ApplicationBase.

virtual double AppFrame::ApplicationCopy::residual ( FEVector dst,
const FEVectors src 
)
inlinevirtual
virtual void AppFrame::ApplicationCopy::solve ( FEVector start,
const FEVectors rhs 
)
inlinevirtual
virtual void AppFrame::ApplicationCopy::start_vector ( FEVector dst,
std::string  caller 
) const
inlinevirtual

Initialize vector to problem size.

Reimplemented from AppFrame::ApplicationBase.

virtual void AppFrame::ApplicationCopy::Tsolve ( FEVector start,
const FEVectors rhs 
)
inlinevirtual

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

Reimplemented from AppFrame::ApplicationBase.

Member Data Documentation

SmartPointer<ApplicationBase> AppFrame::ApplicationCopy::app
protected

Pointer to the application this one depends upon.


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