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 | Private Attributes | List of all members
SIM::DakotaLeastSquaresInterface< dim > Class Template Reference

This class is used to solve a least-squares parameter estimation problem. More...

#include <dakota_direct_interface.h>

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

Public Member Functions

 DakotaLeastSquaresInterface (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)
 Constructor. More...
 
 ~DakotaLeastSquaresInterface ()
 Destructor. More...
 
void _initialize (ParameterHandler &param)
 Local initialize function for this class. More...
 
- Public Member Functions inherited from 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. 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...
 
- Protected Member Functions inherited from SIM::DakotaDirectInterface< dim >
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...
 

Private Attributes

std::string NLS_data_file
 Experimental data file for NLS parameter estimation - Operating Conditions & output. More...
 
std::vector< double > NLS_residual
 Output vector storing residuals from experimental data and output. More...
 
std::string NLS_residual_option
 String storing the option of absolute, weighted, or no residuals (for sensitivity) More...
 
std::string NLS_residual_value
 String storing the choice of returning the residual vector (for NLS methods) or the L2 norm (for all other methods) More...
 
std::vector< double > experimental_current
 Vector to store experimental current density output values. More...
 
std::vector< std::string > OC_names
 Vector to store Operating Condition names (set in NLS_data_file) More...
 
std::vector< std::vector
< double > > 
OC_values
 Array to store Operating Condition values (set in NLS_data_file) More...
 
std::vector< std::string > param_names
 Vector to store the parameter names to set. More...
 
std::vector< double > param_values
 Vector to store the parameter values to set. More...
 
Timer nls_timer
 Object used to calculate the CPU and Run time for the NLS loop. More...
 
boost::shared_ptr
< FuelCell::ApplicationCore::ApplicationData
data
 Data structure storing information to be shared between applications. More...
 

Additional Inherited Members

- Protected Attributes inherited from SIM::DakotaDirectInterface< dim >
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::DakotaLeastSquaresInterface< dim >

This class is used to solve a least-squares parameter estimation problem.

Data is read in from file and the solve function loops over the data points and obtains a solution from the fuel cell simulator. The results are returned to DAKOTA for the optimization loop.

Constructor & Destructor Documentation

template<int dim>
SIM::DakotaLeastSquaresInterface< dim >::DakotaLeastSquaresInterface ( 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 
)

Constructor.

Destructor.

Member Function Documentation

template<int dim>
void SIM::DakotaLeastSquaresInterface< dim >::_initialize ( ParameterHandler &  param)

Local initialize function for this class.

template<int dim>
int SIM::DakotaLeastSquaresInterface< 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::DakotaLeastSquaresInterface< dim >::data
private

Data structure storing information to be shared between applications.

template<int dim>
std::vector<double> SIM::DakotaLeastSquaresInterface< dim >::experimental_current
private

Vector to store experimental current density output values.

template<int dim>
std::string SIM::DakotaLeastSquaresInterface< dim >::NLS_data_file
private

Experimental data file for NLS parameter estimation - Operating Conditions & output.

template<int dim>
std::vector<double> SIM::DakotaLeastSquaresInterface< dim >::NLS_residual
private

Output vector storing residuals from experimental data and output.

Used for NLS optimization iteration

template<int dim>
std::string SIM::DakotaLeastSquaresInterface< dim >::NLS_residual_option
private

String storing the option of absolute, weighted, or no residuals (for sensitivity)

template<int dim>
std::string SIM::DakotaLeastSquaresInterface< dim >::NLS_residual_value
private

String storing the choice of returning the residual vector (for NLS methods) or the L2 norm (for all other methods)

template<int dim>
Timer SIM::DakotaLeastSquaresInterface< dim >::nls_timer
private

Object used to calculate the CPU and Run time for the NLS loop.

template<int dim>
std::vector<std::string> SIM::DakotaLeastSquaresInterface< dim >::OC_names
private

Vector to store Operating Condition names (set in NLS_data_file)

template<int dim>
std::vector<std::vector<double> > SIM::DakotaLeastSquaresInterface< dim >::OC_values
private

Array to store Operating Condition values (set in NLS_data_file)

template<int dim>
std::vector<std::string> SIM::DakotaLeastSquaresInterface< dim >::param_names
private

Vector to store the parameter names to set.

template<int dim>
std::vector<double> SIM::DakotaLeastSquaresInterface< dim >::param_values
private

Vector to store the parameter values to set.


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