Inheritance diagram for Interface:

Public Member Functions | |
| Interface () | |
| default constructor | |
| Interface (ProblemDescDB &problem_db) | |
| standard constructor for envelope | |
| Interface (const Interface &interface) | |
| copy constructor | |
| virtual | ~Interface () |
| destructor | |
| Interface | operator= (const Interface &interface) |
| assignment operator | |
| virtual void | map (const Variables &vars, const ActiveSet &set, Response &response, const bool asynch_flag=false) |
| variables to the responses. | |
| virtual const IntResponseMap & | synch () |
| recovers data from a series of asynchronous evaluations (blocking) | |
| virtual const IntResponseMap & | synch_nowait () |
| recovers data from a series of asynchronous evaluations (nonblocking) | |
| virtual void | serve_evaluations () |
| evaluation server function for multiprocessor executions | |
| virtual void | stop_evaluation_servers () |
| send messages from iterator rank 0 to terminate evaluation servers | |
| virtual void | init_communicators (const IntArray &message_lengths, const int &max_iterator_concurrency) |
| iterator and concurrent multiprocessor analyses within an evaluation. | |
| virtual void | set_communicators (const IntArray &message_lengths) |
| (the partitions are already allocated in ParallelLibrary). | |
| virtual void | free_communicators () |
| iterator and concurrent multiprocessor analyses within an evaluation. | |
| virtual void | init_serial () |
| reset certain defaults for serial interface objects. | |
| virtual int | asynch_local_evaluation_concurrency () const |
| return the user-specified concurrency for asynch local evaluations | |
| virtual String | interface_synchronization () const |
| return the user-specified interface synchronization | |
| virtual int | minimum_points (bool constraint_flag) const |
| ApproximationInterface (used by DataFitSurrModels). | |
| virtual int | recommended_points (bool constraint_flag) const |
| ApproximationInterface (used by DataFitSurrModels). | |
| virtual void | approximation_function_indices (const IntSet &approx_fn_indices) |
| set the (currently active) approximation function index set | |
| virtual void | update_approximation (const Variables &vars, const Response &response) |
| updates the anchor point for an approximation | |
| virtual void | update_approximation (const RealMatrix &samples, const ResponseArray &resp_array) |
| updates the current data points for an approximation | |
| virtual void | update_approximation (const VariablesArray &vars_array, const ResponseArray &resp_array) |
| updates the current data points for an approximation | |
| virtual void | append_approximation (const Variables &vars, const Response &response) |
| appends a single point to an existing approximation | |
| virtual void | append_approximation (const RealMatrix &samples, const ResponseArray &resp_array) |
| appends multiple points to an existing approximation | |
| virtual void | append_approximation (const VariablesArray &vars_array, const ResponseArray &resp_array) |
| appends multiple points to an existing approximation | |
| virtual void | build_approximation (const BoolDeque &rebuild_deque, const RealVector &lower_bnds, const RealVector &upper_bnds) |
| builds the approximation | |
| virtual void | rebuild_approximation (const BoolDeque &rebuild_deque) |
| rebuilds the approximation after a data update | |
| virtual void | pop_approximation (bool save_sdp_set) |
| removes data from last append from the approximation | |
| virtual void | restore_approximation () |
| restores the approximation to a selected previous state | |
| virtual bool | restore_available () |
| queries the approximation for the ability to restore a previous increment | |
| virtual void | finalize_approximation () |
| finalizes the approximation by applying all trial increments | |
| virtual void | clear_current () |
| clears current data from an approximation interface | |
| virtual void | clear_all () |
| clears all data from an approximation interface | |
| virtual bool | anchor () const |
| queries the presence of an anchorPoint within an approximation interface | |
| virtual const Pecos::SurrogateDataPoint & | anchor_point () const |
| returns the anchorPoint used within an approximation interface | |
| virtual std::vector< Approximation > & | approximations () |
| retrieve the Approximations within an ApproximationInterface | |
| virtual const RealVectorArray & | approximation_coefficients () |
| within an ApproximationInterface | |
| virtual void | approximation_coefficients (const RealVectorArray &approx_coeffs) |
| within an ApproximationInterface | |
| virtual const RealVector & | approximation_variances (const RealVector &c_variables) |
| within an ApproximationInterface | |
| virtual const SDPList & | approximation_data (size_t index) |
| within an ApproximationInterface | |
| virtual const StringArray & | analysis_drivers () const |
| retrieve the analysis drivers specification for application interfaces | |
| virtual const AnalysisCode * | analysis_code () const |
| return AnalysisCode::fileNameMap when defined for derived Interface class | |
| void | assign_rep (Interface *interface_rep, bool ref_count_incr=true) |
| replaces existing letter with a new one | |
| const String & | interface_type () const |
| returns the interface type | |
| const String & | interface_id () const |
| returns the interface identifier | |
| int | evaluation_id () const |
| returns the current function evaluation id for the interface | |
| void | fine_grained_evaluation_counters (size_t num_fns) |
| set fineGrainEvalCounters to true and initialize counters if needed | |
| void | init_evaluation_counters (size_t num_fns) |
| initialize fine grained evaluation counters | |
| void | set_evaluation_reference () |
| set evaluation count reference points for the interface | |
| void | print_evaluation_summary (std::ostream &s, bool minimal_header, bool relative_count) const |
| print an evaluation summary for the interface | |
| bool | multi_proc_eval_flag () const |
| returns a flag signaling the use of multiprocessor evaluation partitions | |
| bool | iterator_eval_dedicated_master_flag () const |
| iterator-evaluation scheduling level | |
| bool | is_null () const |
| function to check interfaceRep (does this envelope contain a letter?) | |
Protected Member Functions | |
| Interface (BaseConstructor, const ProblemDescDB &problem_db) | |
| derived class constructors - Coplien, p. 139) | |
| Interface (NoDBBaseConstructor, size_t num_fns) | |
| (NoDBBaseConstructor used for on the fly instantiations without a DB) | |
| void | init_algebraic_mappings (const Variables &vars, const Response &response) |
| Define algebraicACVIndices, algebraicACVIds, and algebraicFnIndices. | |
| void | asv_mapping (const ActiveSet &total_set, ActiveSet &algebraic_set, ActiveSet &core_set) |
| from the total Interface evaluation requirements (total_set) | |
| void | algebraic_mappings (const Variables &vars, const ActiveSet &algebraic_set, Response &algebraic_response) |
| and the data extracted from the algebraic_mappings file | |
| void | response_mapping (const Response &algebraic_response, const Response &core_response, Response &total_response) |
| from derived_map() to create the total response | |
Protected Attributes | |
| String | interfaceType |
| the interface type: system, fork, direct, grid, or approximation | |
| String | idInterface |
| the interface specification identifier string from the DAKOTA input file | |
| bool | algebraicMappings |
| Interface's parameter to response mapping that is explicit and algebraic. | |
| bool | coreMappings |
| ApplicationInterface or functionSurfaces for ApproximationInterface). | |
| bool | fineGrainEvalCounters |
| controls use of fn val/grad/hess counters | |
| int | fnEvalId |
| total interface evaluation counter | |
| int | newFnEvalId |
| new (non-duplicate) interface evaluation counter | |
| int | fnEvalIdRefPt |
| iteration reference point for fnEvalId | |
| int | newFnEvalIdRefPt |
| iteration reference point for newFnEvalId | |
| IntArray | fnValCounter |
| number of value evaluations by resp fn | |
| IntArray | fnGradCounter |
| number of gradient evaluations by resp fn | |
| IntArray | fnHessCounter |
| number of Hessian evaluations by resp fn | |
| IntArray | newFnValCounter |
| number of new value evaluations by resp fn | |
| IntArray | newFnGradCounter |
| number of new gradient evaluations by resp fn | |
| IntArray | newFnHessCounter |
| number of new Hessian evaluations by resp fn | |
| IntArray | fnValRefPt |
| iteration reference point for fnValCounter | |
| IntArray | fnGradRefPt |
| iteration reference point for fnGradCounter | |
| IntArray | fnHessRefPt |
| iteration reference point for fnHessCounter | |
| IntArray | newFnValRefPt |
| iteration reference point for newFnValCounter | |
| IntArray | newFnGradRefPt |
| iteration reference point for newFnGradCounter | |
| IntArray | newFnHessRefPt |
| iteration reference point for newFnHessCounter | |
| IntResponseMap | rawResponseMap |
| of asynchronous evaluations. | |
| StringArray | fnLabels |
| print_evaluation_summary() and derived direct interface classes) | |
| bool | multiProcEvalFlag |
| flag for multiprocessor evaluation partitions (evalComm) | |
| bool | ieDedMasterFlag |
| flag for dedicated master partitioning at the iterator level | |
| short | outputLevel |
| output verbosity level: {SILENT,QUIET,NORMAL,VERBOSE,DEBUG}_OUTPUT | |
Private Member Functions | |
| Interface * | get_interface (ProblemDescDB &problem_db) |
| Used by the envelope to instantiate the correct letter class. | |
| int | algebraic_function_type (String) |
| evaluation call to make | |
Private Attributes | |
| StringArray | algebraicVarTags |
| set of variable tags from AMPL stub.col | |
| SizetArray | algebraicACVIndices |
| continuous variables | |
| SizetArray | algebraicACVIds |
| continuous variables | |
| StringArray | algebraicFnTags |
| set of function tags from AMPL stub.row | |
| IntArray | algebraicFnTypes |
| AMPL objval (conival) calls. | |
| SizetArray | algebraicFnIndices |
| DAKOTA response functions. | |
| RealArray | algebraicConstraintWeights |
| set of weights for computing Hessian matrices for algebraic constraints; | |
| int | numAlgebraicResponses |
| number of algebraic responses (objectives+constraints) | |
| Interface * | interfaceRep |
| pointer to the letter (initialized only for the envelope) | |
| int | referenceCount |
| number of objects sharing interfaceRep | |
| ASL * | asl |
| pointer to an AMPL solver library (ASL) object | |
The Interface class hierarchy provides the part of a Model that is responsible for mapping a set of Variables into a set of Responses. The mapping is performed using either a simulation-based application interface or a surrogate-based approximation interface. For memory efficiency and enhanced polymorphism, the interface hierarchy employs the "letter/envelope idiom" (see Coplien "Advanced C++", p. 133), for which the base class (Interface) serves as the envelope and one of the derived classes (selected in Interface::get_interface()) serves as the letter.
| Interface | ( | ProblemDescDB & | problem_db | ) |
standard constructor for envelope
Used in Model instantiation to build the envelope. This constructor only needs to extract enough data to properly execute get_interface, since Interface::Interface(BaseConstructor, problem_db) builds the actual base class data inherited by the derived interfaces.
copy constructor
Copy constructor manages sharing of interfaceRep and incrementing of referenceCount.
| ~Interface | ( | ) | [virtual] |
destructor
Destructor decrements referenceCount and only deletes interfaceRep if referenceCount is zero.
| Interface | ( | BaseConstructor | , | |
| const ProblemDescDB & | problem_db | |||
| ) | [protected] |
derived class constructors - Coplien, p. 139)
This constructor is the one which must build the base class data for all inherited interfaces. get_interface() instantiates a derived class letter and the derived constructor selects this base class constructor in its initialization list (to avoid the recursion of the base class constructor calling get_interface() again). Since this is the letter and the letter IS the representation, interfaceRep is set to NULL (an uninitialized pointer causes problems in ~Interface).
assignment operator
Assignment operator decrements referenceCount for old interfaceRep, assigns new interfaceRep, and increments referenceCount for new interfaceRep.
| void assign_rep | ( | Interface * | interface_rep, | |
| bool | ref_count_incr = true | |||
| ) |
replaces existing letter with a new one
Similar to the assignment operator, the assign_rep() function decrements referenceCount for the old interfaceRep and assigns the new interfaceRep. It is different in that it is used for publishing derived class letters to existing envelopes, as opposed to sharing representations among multiple envelopes (in particular, assign_rep is passed a letter object and operator= is passed an envelope object). Letter assignment supports two models as governed by ref_count_incr:
| Interface * get_interface | ( | ProblemDescDB & | problem_db | ) | [private] |
Used by the envelope to instantiate the correct letter class.
used only by the envelope constructor to initialize interfaceRep to the appropriate derived type.
IntResponseMap rawResponseMap [protected] |
of asynchronous evaluations.
The map is a full/partial set of completions which are identified through their fnEvalId key. The raw set is postprocessed (i.e., finite difference gradients merged) in Model::synchronize() where it becomes responseMap.
1.5.1