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
SIM::DakotaDirectInterface< dim > Class Template Reference

This class is used to read the input file from Dakota in its original format, use this inforamtion to launch the fuel cell simulator and finally from the data from the fuel cell simulator, write the output to Dakota. More...

#include <dakota_direct_interface.h>

Inheritance diagram for SIM::DakotaDirectInterface< dim >:
Inheritance graph
[legend]
Collaboration diagram for SIM::DakotaDirectInterface< dim >:
Collaboration graph
[legend]

Public Member Functions

 DakotaDirectInterface (DakotaApplication &fcst_interface, boost::shared_ptr< const Dakota::ProblemDescDB > problem_db, ParameterHandler &param, boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData > data, boost::shared_ptr< SimulationSelector< dim > > sim_selector, std::string &param_file)
 Default constructor for an object of this class. More...
 
 ~DakotaDirectInterface ()
 Destructor. More...
 

Protected Member Functions

int derived_map_ac (const Dakota::String &ac_name)
 Function called by DAKOTA's iterators in order to run the simulation code and assign the corresponding result values by using synchronize_variables(). More...
 
void dakota_adopt_parameters (boost::shared_ptr< FuelCell::ApplicationCore::OptimizationBlockMatrixApplication< dim > > app_linear)
 Member function that is used to get the design variable names and values and assigns the values to the parameter handler object. More...
 
void dakota_assign_results (const std::vector< double > &responses, const std::vector< std::vector< double > > &dresponses_dl)
 Member function that is used to assign the application responses and gradients to the result variables of DAKOTA. More...
 
void dakota_assign_results (const std::vector< double > &responses)
 Member function that is used to assign the application responses to the result variables of DAKOTA. More...
 

Protected Attributes

ParameterHandler * param
 Pointer to the Parameter Handler object. More...
 
boost::shared_ptr
< SimulationSelector
< deal_II_dimension > > 
sim_selector
 Pointer to the SimulationSelector object which gives access to the file names and selector functions for linear applications (CATHODE MODEL, NON-ISOTHERMAL CATHODE MODEL, MEA Model,...), newton solves (NewtonBasic, Newton3ppC, ...), and the meshing method that you would like to use (Adaptive Refinement). More...
 
DakotaApplicationfcst_interface
 Pointer to the DakotaApplication object, so that the design variables can be accessed with synchronize_variables(). More...
 
boost::shared_ptr< const
Dakota::ProblemDescDB > 
problem_db
 Pointer to the problem description data base. More...
 
std::string simulator_parameter_file_name
 
Timer eval_timer
 Object used to calculate the CPU and Run time for the optimization evaluation. More...
 
unsigned int n_dvar
 Number of design variables. More...
 
unsigned int n_resp
 Number of responses. More...
 
std::vector< std::string > name_design_var
 Member that stores the name of the design variables. More...
 
std::vector< std::string > name_responses
 Member that stores the name of the responses. More...
 
boost::shared_ptr
< FuelCell::ApplicationCore::ApplicationData
data
 Data structure storing information to be shared between applications. More...
 

Detailed Description

template<int dim>
class SIM::DakotaDirectInterface< dim >

This class is used to read the input file from Dakota in its original format, use this inforamtion to launch the fuel cell simulator and finally from the data from the fuel cell simulator, write the output to Dakota.

This application needs to be inherited from Dakota::DirectApplicInterface which belongs to the Dakota library.

These applications are selected in SimulatorBuilder<dim>::run_optimization() and they are assigned to Dakota in DakotaApplication::assign_interface(Dakota::DirectApplicInterface* optimization_interface)

For more information please visit the Dakota reference guide at http://dakota.sandia.gov/licensing/votd/html-dev/

Author
M. Krack, P. Dobson and M. Secanell, 2010-12

Constructor & Destructor Documentation

template<int dim>
SIM::DakotaDirectInterface< dim >::DakotaDirectInterface ( DakotaApplication fcst_interface,
boost::shared_ptr< const Dakota::ProblemDescDB >  problem_db,
ParameterHandler &  param,
boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData data,
boost::shared_ptr< SimulationSelector< dim > >  sim_selector,
std::string &  param_file 
)

Default constructor for an object of this class.

Constructor for an object of this class. Links the Dakota database with the linear applications and the solver.

template<int dim>
SIM::DakotaDirectInterface< dim >::~DakotaDirectInterface ( )
inline

Destructor.

Member Function Documentation

template<int dim>
void SIM::DakotaDirectInterface< dim >::dakota_adopt_parameters ( boost::shared_ptr< FuelCell::ApplicationCore::OptimizationBlockMatrixApplication< dim > >  app_linear)
protected

Member function that is used to get the design variable names and values and assigns the values to the parameter handler object.

template<int dim>
void SIM::DakotaDirectInterface< dim >::dakota_assign_results ( const std::vector< double > &  responses,
const std::vector< std::vector< double > > &  dresponses_dl 
)
protected

Member function that is used to assign the application responses and gradients to the result variables of DAKOTA.

template<int dim>
void SIM::DakotaDirectInterface< dim >::dakota_assign_results ( const std::vector< double > &  responses)
protected

Member function that is used to assign the application responses to the result variables of DAKOTA.

template<int dim>
int SIM::DakotaDirectInterface< dim >::derived_map_ac ( const Dakota::String &  ac_name)
protected

Function called by DAKOTA's iterators in order to run the simulation code and assign the corresponding result values by using synchronize_variables().

Member Data Documentation

template<int dim>
boost::shared_ptr<FuelCell::ApplicationCore::ApplicationData> SIM::DakotaDirectInterface< dim >::data
protected

Data structure storing information to be shared between applications.

template<int dim>
Timer SIM::DakotaDirectInterface< dim >::eval_timer
protected

Object used to calculate the CPU and Run time for the optimization evaluation.

template<int dim>
DakotaApplication* SIM::DakotaDirectInterface< dim >::fcst_interface
protected

Pointer to the DakotaApplication object, so that the design variables can be accessed with synchronize_variables().

template<int dim>
unsigned int SIM::DakotaDirectInterface< dim >::n_dvar
protected

Number of design variables.

template<int dim>
unsigned int SIM::DakotaDirectInterface< dim >::n_resp
protected

Number of responses.

template<int dim>
std::vector<std::string> SIM::DakotaDirectInterface< dim >::name_design_var
protected

Member that stores the name of the design variables.

template<int dim>
std::vector<std::string> SIM::DakotaDirectInterface< dim >::name_responses
protected

Member that stores the name of the responses.

template<int dim>
ParameterHandler* SIM::DakotaDirectInterface< dim >::param
protected

Pointer to the Parameter Handler object.

template<int dim>
boost::shared_ptr<const Dakota::ProblemDescDB> SIM::DakotaDirectInterface< dim >::problem_db
protected

Pointer to the problem description data base.

template<int dim>
boost::shared_ptr<SimulationSelector<deal_II_dimension> > SIM::DakotaDirectInterface< dim >::sim_selector
protected

Pointer to the SimulationSelector object which gives access to the file names and selector functions for linear applications (CATHODE MODEL, NON-ISOTHERMAL CATHODE MODEL, MEA Model,...), newton solves (NewtonBasic, Newton3ppC, ...), and the meshing method that you would like to use (Adaptive Refinement).

template<int dim>
std::string SIM::DakotaDirectInterface< dim >::simulator_parameter_file_name
protected

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