OpenFCST: The open-source Fuel Cell Simulation Toolbox
|
Base class for non-terminal applications. More...
#include <application_copy.h>
Public Member Functions | |
ApplicationCopy (ApplicationBase &ex_app) | |
Constructor for a derived application. | |
~ApplicationCopy () | |
virtual void | declare_parameters (ParameterHandler ¶m) |
Declare parameters for a parameter file. | |
virtual void | initialize (ParameterHandler ¶m) |
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. | |
![]() | |
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 ¶m, 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< ApplicationBase > | app |
Pointer to the application this one depends upon. | |
![]() | |
boost::shared_ptr < ApplicationData > | data |
Object for auxiliary data. | |
Event | notifications |
Accumulate reasons for reassembling here. | |
Additional Inherited Members | |
![]() | |
void | print_caller_name (const std::string &caller_name) const |
Print caller name. | |
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.
|
inline |
Constructor for a derived application.
A SmartPointer to app
is stored in the copy. Therefore, app
must live longer than the ApplicationCopy object.
|
inline |
|
inlinevirtual |
Write data in the format specified by the ParameterHandler.
Reimplemented from AppFrame::ApplicationBase.
Reimplemented in AppFrame::DoFMeshLoop< dim >, and AppFrame::MeshLoop.
|
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.
|
inlinevirtual |
Error estimation.
Reimplemented from AppFrame::ApplicationBase.
|
inlinevirtual |
Evaluate whatever the simulation was made for.
Reimplemented from AppFrame::ApplicationBase.
|
inlinevirtual |
Write the mesh in the format specified by the ParameterHandler.
Reimplemented from AppFrame::ApplicationBase.
|
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.
|
inlinevirtual |
Initialize vector to problem size.
Reimplemented from AppFrame::ApplicationBase.
|
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.
|
inlinevirtual |
Add a reason for assembling.
The new reason is binary or'd with the previous ones.
Reimplemented from AppFrame::ApplicationBase.
|
inlinevirtual |
Generates the next mesh depending on the mesh generation parameters.
Reimplemented from AppFrame::ApplicationBase.
|
inlinevirtual |
Reimplemented in AppFrame::ThetaTimestepping, AppFrame::Newton, and AppFrame::newtonBase.
|
inlinevirtual |
Solve the system assembled with right hand side rhs
and return the result in start
.
Reimplemented from AppFrame::ApplicationBase.
Reimplemented in AppFrame::ThetaTimestepping, AppFrame::Random, AppFrame::Newton, AppFrame::NewtonBasic, AppFrame::newtonBase, AppFrame::MeshLoop, AppFrame::NewtonLineSearch, AppFrame::RungeKuttaExplicit, AppFrame::Newton3pp, and AppFrame::Newton3ppC.
|
inlinevirtual |
Initialize vector to problem size.
Reimplemented from AppFrame::ApplicationBase.
|
inlinevirtual |
Solve the dual system assembled with right hand side rhs
and return the result in start
.
Reimplemented from AppFrame::ApplicationBase.
|
protected |
Pointer to the application this one depends upon.