OpenFCST: The open-source Fuel Cell Simulation Toolbox
|
This class implements either iterative or time-stepping wrapper of applications. More...
#include <application_wrapper.h>
Public Member Functions | |
ApplicationWrapper (ApplicationBase &app) | |
Constructor for a derived application. More... | |
~ApplicationWrapper () | |
Destructor. More... | |
virtual void | declare_parameters (ParameterHandler ¶m) |
Declare parameters for a parameter file. More... | |
virtual void | initialize (ParameterHandler ¶m) |
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 ¶m, 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< ApplicationBase > | get_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< ApplicationBase > | app |
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... | |
This class implements either iterative or time-stepping wrapper of applications.
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.
|
virtual |
Write data in the format specified by the ParameterHandler.
Pure virtual.
Reimplemented from FuelCell::ApplicationCore::ApplicationBase.
|
virtual |
Declare parameters for a parameter file.
Current implementation simply calls the declare_parameters of the derived application.
Reimplemented from FuelCell::ApplicationCore::ApplicationBase.
Reimplemented in FuelCell::ApplicationCore::newtonBase, FuelCell::ApplicationCore::Newton3pp, FuelCell::ApplicationCore::NewtonLineSearch, FuelCell::ApplicationCore::ThetaScheme, FuelCell::ApplicationCore::PicardBase, FuelCell::ApplicationCore::Picard, FuelCell::ApplicationCore::TransientBase, and FuelCell::ApplicationCore::NewtonBasic.
|
virtual |
Estimate cell-wise errors.
Pure virtual.
Reimplemented from FuelCell::ApplicationCore::ApplicationBase.
|
virtual |
|
inlineprotected |
Gain access to the inner application.
|
virtual |
|
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:
then,
Reimplemented from FuelCell::ApplicationCore::ApplicationBase.
|
virtual |
Initialize vector to problem size.
Pure virtual.
Reimplemented from FuelCell::ApplicationCore::ApplicationBase.
|
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.
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 |
Add a reason for assembling.
Reimplemented from FuelCell::ApplicationCore::ApplicationBase.
|
virtual |
Generate the next mesh depending on the mesh generation parameters.
Pure virtual.
Reimplemented from FuelCell::ApplicationCore::ApplicationBase.
|
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 |
Solve the system assembled with right hand side in FEVectors src
and return the result in FEVector dst
.
Pure virtual.
Implements FuelCell::ApplicationCore::ApplicationBase.
Reimplemented in FuelCell::ApplicationCore::newtonBase, FuelCell::ApplicationCore::Newton3pp, FuelCell::ApplicationCore::NewtonLineSearch, FuelCell::ApplicationCore::ThetaScheme, FuelCell::ApplicationCore::PicardBase, FuelCell::ApplicationCore::TransientBase, FuelCell::ApplicationCore::Picard, and FuelCell::ApplicationCore::NewtonBasic.
|
virtual |
Solve the dual system assembled with right hand side rhs
and return the result in start
.
Pure virtual.
Reimplemented from FuelCell::ApplicationCore::ApplicationBase.
|
protected |
Pointer to the application this one depends upon.