OpenFCST: The open-source Fuel Cell Simulation Toolbox
|
Classes used to interface the fuel cell analysis code with DAKOTA (an optimization toolbox). More...
#include <dakota_interface.h>
Public Member Functions | |
DakotaInterface (const std::string input_file, ParameterHandler ¶m, 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 ¶m) |
Declare all parameters that are needed for: More... | |
void | initialize (ParameterHandler ¶m) |
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 ¶m) |
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::ApplicationWrapper * | app |
Pointer to nonlinear application. More... | |
ParameterHandler * | param |
Pointer to parameter handler object. More... | |
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.
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
|
inline |
Destructor.
|
private |
Member function that is used to read the file from Dakota and perform the necessary changes on the ParameterHandler file.
|
private |
Member function that is used to write the Dakota output file.
|
private |
Declare all parameters that are needed for:
|
private |
Set up how many equations are needed and read in parameters for the parameter handler in order to initialize data.
void SIM::DakotaInterface< dim >::run | ( | ) |
|
private |
Pointer to nonlinear application.
|
private |
Pointer to application.
|
private |
|
private |
Name of the parameters file from DAKOTA.
|
private |
Name of the results file to DAKOTA.
|
private |
Dakota version used.
|
private |
Gradients necessary?
|
private |
Name of the analysis file.
|
private |
Number of refinements.
|
private |
Pointer to parameter handler object.