16 #ifndef dakota_direct_interface_h
17 #define dakota_direct_interface_h
27 #include<base/parameter_handler.h>
28 #include <base/timer.h>
40 #include "DirectApplicInterface.H"
41 #include "ApplicationInterface.H"
71 class DakotaDirectInterface :
public Dakota::DirectApplicInterface
78 DakotaDirectInterface(boost::shared_ptr<const Dakota::ProblemDescDB > problem_db);
85 DakotaDirectInterface(DakotaApplication &fcst_interface,
86 boost::shared_ptr<const Dakota::ProblemDescDB > problem_db,
87 ParameterHandler& param,
89 std::string ¶m_file);
92 ~DakotaDirectInterface()
102 int derived_map_ac(
const Dakota::String& ac_name);
115 void dakota_assign_results(
const std::vector<double>& responses,
116 const std::vector<std::vector<double> >& dresponses_dl);
121 void dakota_assign_results(
const std::vector<double>& responses);
126 ParameterHandler* param;
134 boost::shared_ptr<SimulationSelector<deal_II_dimension> > sim_selector;
140 DakotaApplication* fcst_interface;
145 boost::shared_ptr<const Dakota::ProblemDescDB> problem_db;
147 std::string simulator_parameter_file_name;
165 std::vector<std::string> name_design_var;
169 std::vector<std::string> name_responses;
183 class DakotaLeastSquaresInterface :
public DakotaDirectInterface<dim>
189 DakotaLeastSquaresInterface(DakotaApplication &fcst_interface,
190 boost::shared_ptr<const Dakota::ProblemDescDB > problem_db,
191 ParameterHandler& param,
193 std::string ¶m_file);
198 ~DakotaLeastSquaresInterface()
205 void _initialize(ParameterHandler& param);
212 int derived_map_ac(
const Dakota::String& ac_name);
219 std::string NLS_data_file;
224 std::vector<double> NLS_residual;
228 std::string NLS_residual_option;
232 std::string NLS_residual_value;
236 std::vector<double> experimental_current;
240 std::vector<std::string> OC_names;
244 std::vector<std::vector<double> > OC_values;
248 std::vector<std::string> param_names;
252 std::vector<double> param_values;