OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SIM::DakotaInterface< dim > Class Template Reference

Classes used to interface the fuel cell analysis code with DAKOTA (an optimization toolbox). More...

#include <dakota_interface.h>

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

Public Member Functions

 DakotaInterface (const std::string input_file, ParameterHandler &param, const std::string dakota_parameters, const std::string dakota_results, FuelCell::ApplicationCore::OptimizationBlockMatrixApplication< dim > &app_lin, FuelCell::ApplicationCore::ApplicationWrapper &app)
 Constructor for an object of this class. More...
 
 ~DakotaInterface ()
 Destructor. More...
 
void run ()
 

Private Member Functions

void declare_parameters (ParameterHandler &param)
 Declare all parameters that are needed for: More...
 
void initialize (ParameterHandler &param)
 Set up how many equations are needed and read in parameters for the parameter handler in order to initialize data. More...
 
void DakotaReadIn (const std::string dakota_parameters, FuelCell::ApplicationCore::OptimizationBlockMatrixApplication< dim > &app, ParameterHandler &param)
 Member function that is used to read the file from Dakota and perform the necessary changes on the ParameterHandler file. More...
 
void DakotaWriteOut (const std::string dakota_results, const std::vector< double > &responses, const std::vector< std::vector< double > > &dresponses_dl)
 Member function that is used to write the Dakota output file. More...
 

Private Attributes

bool gradients
 Gradients necessary? More...
 
unsigned int n_ref
 Number of refinements. More...
 
std::string dakota_version
 Dakota version used. More...
 
const std::string input_file
 Name of the analysis file. More...
 
const std::string dakota_parameters
 Name of the parameters file from DAKOTA. More...
 
const std::string dakota_results
 Name of the results file to DAKOTA. More...
 
std::vector< int > ASV
 
FuelCell::ApplicationCore::OptimizationBlockMatrixApplication
< dim > * 
app_linear
 Pointer to application. More...
 
FuelCell::ApplicationCore::ApplicationWrapperapp
 Pointer to nonlinear application. More...
 
ParameterHandler * param
 Pointer to parameter handler object. More...
 

Detailed Description

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

Classes used to interface the fuel cell analysis code with DAKOTA (an optimization toolbox).

This class reads 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.

Constructor & Destructor Documentation

template<int dim>
SIM::DakotaInterface< dim >::DakotaInterface ( const std::string  input_file,
ParameterHandler &  param,
const std::string  dakota_parameters,
const std::string  dakota_results,
FuelCell::ApplicationCore::OptimizationBlockMatrixApplication< dim > &  app_lin,
FuelCell::ApplicationCore::ApplicationWrapper app 
)

Constructor for an object of this class.

In order to be able to read and write the objects needs to know where the Dakota files are. Furthermore, the design variables modify the analysis parameters, so the input file location is also necessary

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

Destructor.

Member Function Documentation

template<int dim>
void SIM::DakotaInterface< dim >::DakotaReadIn ( const std::string  dakota_parameters,
FuelCell::ApplicationCore::OptimizationBlockMatrixApplication< dim > &  app,
ParameterHandler &  param 
)
private

Member function that is used to read the file from Dakota and perform the necessary changes on the ParameterHandler file.

template<int dim>
void SIM::DakotaInterface< dim >::DakotaWriteOut ( const std::string  dakota_results,
const std::vector< double > &  responses,
const std::vector< std::vector< double > > &  dresponses_dl 
)
private

Member function that is used to write the Dakota output file.

template<int dim>
void SIM::DakotaInterface< dim >::declare_parameters ( ParameterHandler &  param)
private

Declare all parameters that are needed for:

  • the computation of the equation coefficients
  • the control of the linear system solution
  • ...
template<int dim>
void SIM::DakotaInterface< dim >::initialize ( ParameterHandler &  param)
private

Set up how many equations are needed and read in parameters for the parameter handler in order to initialize data.

template<int dim>
void SIM::DakotaInterface< dim >::run ( )

Member Data Documentation

Pointer to nonlinear application.

Pointer to application.

template<int dim>
std::vector<int> SIM::DakotaInterface< dim >::ASV
private
template<int dim>
const std::string SIM::DakotaInterface< dim >::dakota_parameters
private

Name of the parameters file from DAKOTA.

template<int dim>
const std::string SIM::DakotaInterface< dim >::dakota_results
private

Name of the results file to DAKOTA.

template<int dim>
std::string SIM::DakotaInterface< dim >::dakota_version
private

Dakota version used.

template<int dim>
bool SIM::DakotaInterface< dim >::gradients
private

Gradients necessary?

template<int dim>
const std::string SIM::DakotaInterface< dim >::input_file
private

Name of the analysis file.

template<int dim>
unsigned int SIM::DakotaInterface< dim >::n_ref
private

Number of refinements.

template<int dim>
ParameterHandler* SIM::DakotaInterface< dim >::param
private

Pointer to parameter handler object.


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