$extrastylesheet
Dakota
Version 6.2
|
Derived application interface class which spawns simulation codes and testers using direct procedure calls. More...
Public Member Functions | |
DirectApplicInterface (const ProblemDescDB &problem_db) | |
constructor | |
~DirectApplicInterface () | |
destructor | |
void | derived_map (const Variables &vars, const ActiveSet &set, Response &response, int fn_eval_id) |
Called by map() and other functions to execute the simulation in synchronous mode. The portion of performing an evaluation that is specific to a derived class. | |
void | derived_map_asynch (const ParamResponsePair &pair) |
Called by map() and other functions to execute the simulation in asynchronous mode. The portion of performing an asynchronous evaluation that is specific to a derived class. | |
void | wait_local_evaluations (PRPQueue &prp_queue) |
For asynchronous function evaluations, this method is used to detect completion of jobs and process their results. It provides the processing code that is specific to derived classes. This version waits for at least one completion. | |
void | test_local_evaluations (PRPQueue &prp_queue) |
For asynchronous function evaluations, this method is used to detect completion of jobs and process their results. It provides the processing code that is specific to derived classes. This version is nonblocking and will return without any completions if none are immediately available. | |
int | synchronous_local_analysis (int analysis_id) |
const StringArray & | analysis_drivers () const |
retrieve the analysis drivers specification for application interfaces | |
void | init_communicators_checks (int max_eval_concurrency) |
void | set_communicators_checks (int max_eval_concurrency) |
Protected Member Functions | |
virtual int | derived_map_if (const Dakota::String &if_name) |
execute the input filter portion of a direct evaluation invocation | |
virtual int | derived_map_ac (const Dakota::String &ac_name) |
execute an analysis code portion of a direct evaluation invocation | |
virtual int | derived_map_of (const Dakota::String &of_name) |
execute the output filter portion of a direct evaluation invocation | |
virtual void | set_local_data (const Variables &vars, const ActiveSet &set) |
convenience function for local test simulators which sets per-evaluation variable and active set attributes; derived classes reimplementing this likely need to invoke the base class API | |
virtual void | set_local_data (const Response &response) |
convenience function for local test simulators which sets per-evaluation response attributes; derived classes reimplementing this likely need to invoke the base class API | |
virtual void | set_local_data (const Variables &vars, const ActiveSet &set, const Response &response) |
convenience function for local test simulators which sets per-evaluation variable, active set, and response attributes; derived classes reimplementing this likely need to invoke the base class API | |
void | overlay_response (Response &response) |
convenience function for local test simulators which overlays response contributions from multiple analyses using MPI_Reduce | |
Protected Attributes | |
String | iFilterName |
name of the direct function input filter | |
String | oFilterName |
name of the direct function output filter | |
driver_t | iFilterType |
enum type of the direct function input filter | |
driver_t | oFilterType |
enum type of the direct function output filter | |
bool | gradFlag |
signals use of fnGrads in direct simulator functions | |
bool | hessFlag |
signals use of fnHessians in direct simulator functions | |
size_t | numFns |
number of functions in fnVals | |
size_t | numVars |
total number of continuous and discrete variables | |
size_t | numACV |
total number of continuous variables | |
size_t | numADIV |
total number of discete integer variables | |
size_t | numADRV |
total number of discete real variables | |
size_t | numDerivVars |
number of active derivative variables | |
unsigned short | localDataView |
bit-wise record of which local data views are active; see enum local_data_t | |
RealVector | xC |
continuous variables used within direct simulator fns | |
IntVector | xDI |
discrete int variables used within direct simulator fns | |
RealVector | xDR |
discrete real variables used within direct simulator fns | |
StringMultiArray | xCLabels |
continuous variable labels | |
StringMultiArray | xDILabels |
discrete integer variable labels | |
StringMultiArray | xDRLabels |
discrete real variable labels | |
std::map< String, var_t > | varTypeMap |
map from variable label to enum | |
std::map< String, driver_t > | driverTypeMap |
map from driver name to enum | |
std::map< var_t, Real > | xCM |
map from var_t enum to continuous value | |
std::map< var_t, int > | xDIM |
map from var_t enum to discrete int value | |
std::map< var_t, Real > | xDRM |
map from var_t enum to discrete real value | |
std::vector< var_t > | varTypeDVV |
var_t enumerations corresponding to DVV components | |
std::vector< var_t > | xCMLabels |
var_t enumerations corresponding to continuous variable labels | |
std::vector< var_t > | xDIMLabels |
var_t enumerations corresponding to discrete integer variable labels | |
std::vector< var_t > | xDRMLabels |
var_t enumerations corresponding to discrete real variable labels | |
ShortArray | directFnASV |
class scope active set vector | |
SizetArray | directFnDVV |
class scope derivative variables vector | |
RealVector | fnVals |
response fn values within direct simulator fns | |
RealMatrix | fnGrads |
response fn gradients w/i direct simulator fns | |
RealSymMatrixArray | fnHessians |
response fn Hessians within direct fns | |
StringArray | analysisDrivers |
the set of analyses within each function evaluation (from the analysis_drivers interface specification) | |
std::vector< driver_t > | analysisDriverTypes |
conversion of analysisDrivers to driver_t | |
size_t | analysisDriverIndex |
the index of the active analysis driver within analysisDrivers | |
String2DArray | analysisComponents |
the set of optional analysis components used by the analysis drivers (from the analysis_components interface specification) |
Derived application interface class which spawns simulation codes and testers using direct procedure calls.
DirectApplicInterface uses a few linkable simulation codes and several internal member functions to perform parameter to response mappings.
int synchronous_local_analysis | ( | int | analysis_id | ) | [inline, virtual] |
This code provides the derived function used by ApplicationInterface::serve_analyses_synch().
Reimplemented from ApplicationInterface.
References DirectApplicInterface::analysisDriverIndex, DirectApplicInterface::analysisDrivers, and DirectApplicInterface::derived_map_ac().
void init_communicators_checks | ( | int | max_eval_concurrency | ) | [inline, virtual] |
Process init issues as warnings since some contexts (e.g., HierarchSurrModel) initialize more configurations than will be used and DirectApplicInterface allows override by derived plug-ins.
Reimplemented from ApplicationInterface.
References ApplicationInterface::check_asynchronous(), and ApplicationInterface::check_multiprocessor_asynchronous().
void set_communicators_checks | ( | int | max_eval_concurrency | ) | [inline, virtual] |
Process run-time issues as hard errors.
Reimplemented from ApplicationInterface.
Reimplemented in SerialDirectApplicInterface, and ParallelDirectApplicInterface.
References Dakota::abort_handler(), ApplicationInterface::check_asynchronous(), and ApplicationInterface::check_multiprocessor_asynchronous().
int derived_map_ac | ( | const Dakota::String & | ac_name | ) | [protected, virtual] |
execute an analysis code portion of a direct evaluation invocation
When a direct analysis/filter is a member function, the (vars,set,response) data does not need to be passed through the API. If, however, non-member analysis/filter functions are added, then pass (vars,set,response) through to the non-member fns:
// API declaration int sim(const Variables& vars, const ActiveSet& set, Response& response); // use of API within derived_map_ac() if (ac_name == "sim") fail_code = sim(directFnVars, directFnActSet, directFnResponse);
Reimplemented in SerialDirectApplicInterface, ParallelDirectApplicInterface, MatlabInterface, PythonInterface, TestDriverInterface, and ScilabInterface.
References Dakota::abort_handler(), and ApplicationInterface::analysisServerId.
Referenced by DirectApplicInterface::derived_map(), and DirectApplicInterface::synchronous_local_analysis().