OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Protected Member Functions | Protected Attributes | List of all members
FuelCellShop::PostProcessing::BaseResponse< dim > Class Template Referenceabstract

Virtual class used to develop a common interface to a set of functions used to evaluate functionals that are obtained at postprocessing. More...

#include <base_response.h>

Inheritance diagram for FuelCellShop::PostProcessing::BaseResponse< dim >:
Inheritance graph
[legend]
Collaboration diagram for FuelCellShop::PostProcessing::BaseResponse< dim >:
Collaboration graph
[legend]

Protected Member Functions

 BaseResponse (const FuelCell::SystemManagement &sm)
 Constructor. More...
 
virtual ~BaseResponse ()
 Destructor. More...
 
Initalization
virtual void declare_parameters (ParameterHandler &param) const
 Declare any necessary parameters to compute the functional. More...
 
virtual void initialize (ParameterHandler &param)
 Initialize class parameters. More...
 
Compute functional
virtual void compute_responses (const typename DoFApplication< dim >::CellInfo &info, FuelCellShop::Layer::BaseLayer< dim > *const layer, std::map< FuelCellShop::PostProcessing::ResponsesNames, double > &resp) const =0
 Compute several functionals (response) at a given finite element using the information in CellInfo in layer specified in parameter. More...
 
virtual void compute_responses (std::vector< FuelCellShop::SolutionVariable > solution_variables, const typename DoFApplication< dim >::CellInfo &info, FuelCellShop::Layer::BaseLayer< dim > *const layer, std::map< FuelCellShop::PostProcessing::ResponsesNames, double > &resp) const =0
 In rare instances, the user would like to specify a given solution vector that is not the final solution to the problem. More...
 

Protected Attributes

const FuelCell::SystemManagementsystem_management
 Pointer to system management. More...
 

Detailed Description

template<int dim>
class FuelCellShop::PostProcessing::BaseResponse< dim >

Virtual class used to develop a common interface to a set of functions used to evaluate functionals that are obtained at postprocessing.

Examples of functionals would be the current density, the water sorbed in the catalyst layer by the ionomer, the friction factor at the channel, etc.

Usage

In order to use this classes, first add them to your application as an object.

* #include "postprocessing/responses.h"
*
* (...)
*
*

In the class constructor, construct the class passing an object SystemManagement. This object is used in order to find the solution variables as appropriate.

* //---------------------------------------------------------------------------
* template <int dim>
* NAME::AppCathode<dim>::AppCathode(boost::shared_ptr<FuelCell::ApplicationCore::ApplicationData> data)
* :
* OptimizationBlockMatrixApplication<dim>(data),
* system_management(this->block_info, this->cell_couplings, this->flux_couplings),
* ORRCurrent(system_management)
* {}
*

Next, the object has to be initialized once SystemManagement has already been initialized correctly:

* // Initialize parameters in system management:
* //Initialize post-processing routines:
* ORRCurrent.initialize(param);
* this->remesh_dofs();
* this->remesh_matrices();
*

Finally, the object is ready for use in cell_responses in your application:

* / Compute ORR responses in the CL
* std::map<FuelCellShop::PostProcessing::ResponsesNames, double> ORR_responses;
* if (CCL->belongs_to_material(material_id)) //the material is the catalyst layer
* ORRCurrent.compute_responses(info, CCL.get(), ORR_responses);
*
Author
M. Secanell, 2014

Constructor & Destructor Documentation

template<int dim>
FuelCellShop::PostProcessing::BaseResponse< dim >::BaseResponse ( const FuelCell::SystemManagement sm)
inlineprotected

Constructor.

Usually, all constructors will contain a pointer to SystemManagement and a pointer to a child of BaseLayer

template<int dim>
virtual FuelCellShop::PostProcessing::BaseResponse< dim >::~BaseResponse ( )
inlineprotectedvirtual

Destructor.

Member Function Documentation

template<int dim>
virtual void FuelCellShop::PostProcessing::BaseResponse< dim >::compute_responses ( const typename DoFApplication< dim >::CellInfo &  info,
FuelCellShop::Layer::BaseLayer< dim > *const  layer,
std::map< FuelCellShop::PostProcessing::ResponsesNames, double > &  resp 
) const
protectedpure virtual
template<int dim>
virtual void FuelCellShop::PostProcessing::BaseResponse< dim >::compute_responses ( std::vector< FuelCellShop::SolutionVariable solution_variables,
const typename DoFApplication< dim >::CellInfo &  info,
FuelCellShop::Layer::BaseLayer< dim > *const  layer,
std::map< FuelCellShop::PostProcessing::ResponsesNames, double > &  resp 
) const
protectedpure virtual
template<int dim>
virtual void FuelCellShop::PostProcessing::BaseResponse< dim >::declare_parameters ( ParameterHandler &  param) const
inlineprotectedvirtual
template<int dim>
virtual void FuelCellShop::PostProcessing::BaseResponse< dim >::initialize ( ParameterHandler &  param)
inlineprotectedvirtual

Member Data Documentation

template<int dim>
const FuelCell::SystemManagement* FuelCellShop::PostProcessing::BaseResponse< dim >::system_management
protected

Pointer to system management.


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