$extrastylesheet
Dakota  Version 6.2
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
ApproximationInterface Class Reference

Derived class within the interface class hierarchy for supporting approximations to simulation-based results. More...

Inheritance diagram for ApproximationInterface:
Interface

List of all members.

Public Member Functions

 ApproximationInterface (ProblemDescDB &problem_db, const Variables &am_vars, bool am_cache, const String &am_interface_id, size_t num_fns)
 primary constructor
 ApproximationInterface (const String &approx_type, const UShortArray &approx_order, const Variables &am_vars, bool am_cache, const String &am_interface_id, size_t num_fns, short data_order, short output_level)
 alternate constructor for instantiations on the fly
 ~ApproximationInterface ()
 destructor

Protected Member Functions

void map (const Variables &vars, const ActiveSet &set, Response &response, bool asynch_flag=false)
 the function evaluator: provides an approximate "mapping" from the variables to the responses using functionSurfaces
int minimum_points (bool constraint_flag) const
 returns the minimum number of samples required to build the functionSurfaces
int recommended_points (bool constraint_flag) const
 returns the recommended number of samples recommended to build the functionSurfaces
void approximation_function_indices (const IntSet &approx_fn_indices)
 set the (currently active) approximation function index set
void update_approximation (const Variables &vars, const IntResponsePair &response_pr)
void update_approximation (const RealMatrix &samples, const IntResponseMap &resp_map)
void update_approximation (const VariablesArray &vars_array, const IntResponseMap &resp_map)
void append_approximation (const Variables &vars, const IntResponsePair &response_pr)
void append_approximation (const RealMatrix &samples, const IntResponseMap &resp_map)
void append_approximation (const VariablesArray &vars_array, const IntResponseMap &resp_map)
void build_approximation (const RealVector &c_l_bnds, const RealVector &c_u_bnds, const IntVector &di_l_bnds, const IntVector &di_u_bnds, const RealVector &dr_l_bnds, const RealVector &dr_u_bnds)
void rebuild_approximation (const BoolDeque &rebuild_deque)
void pop_approximation (bool save_surr_data)
void restore_approximation ()
bool restore_available ()
 queries the approximation for the ability to restore a previous increment
void finalize_approximation ()
 finalizes the approximation by applying all trial increments
void store_approximation ()
 move the current approximation into storage for later combination
void combine_approximation (short corr_type)
 combine the current approximation with one previously stored
void clear_current ()
 clears current data from an approximation interface
void clear_all ()
 clears all data from an approximation interface
void clear_saved ()
 clears saved data (from pop invocations) from an approximation interface
SharedApproxDatashared_approximation ()
 retrieve the SharedApproxData within an ApproximationInterface
std::vector< Approximation > & approximations ()
 retrieve the Approximations within an ApproximationInterface
const Pecos::SurrogateData & approximation_data (size_t index)
 retrieve the approximation data from a particular Approximation within an ApproximationInterface
const RealVectorArray & approximation_coefficients (bool normalized=false)
 retrieve the approximation coefficients from each Approximation within an ApproximationInterface
void approximation_coefficients (const RealVectorArray &approx_coeffs, bool normalized=false)
 set the approximation coefficients within each Approximation within an ApproximationInterface
const RealVector & approximation_variances (const Variables &vars)
 retrieve the approximation variances from each Approximation within an ApproximationInterface
const IntResponseMap & synch ()
 recovers data from a series of asynchronous evaluations (blocking)
const IntResponseMap & synch_nowait ()
 recovers data from a series of asynchronous evaluations (nonblocking)

Private Member Functions

void mixed_add (const Variables &vars, const Response &response, bool anchor)
 add variables/response data to functionSurfaces using a mixture of shallow and deep copies
void mixed_add (const Real *c_vars, const Response &response, bool anchor)
 add variables/response data to functionSurfaces using a mixture of shallow and deep copies
void shallow_add (const Variables &vars, const Response &response, bool anchor)
 add variables/response data to functionSurfaces using a shallow copy
void sample_to_variables (const Real *sample_c_vars, size_t num_cv, Variables &vars)
 populate continuous variables within vars from sample_c_vars
void update_pop_counts (const IntResponseMap &resp_map)
 append to the popCountStack within each of the functionSurfaces based on the active set definitions within resp_map
void read_challenge_points (bool active_only)
 Load approximation test points from user challenge points file.

Private Attributes

IntSet approxFnIndices
 for incomplete approximation sets, this array specifies the response function subset that is approximated
SharedApproxData sharedData
 data that is shared among all functionSurfaces
std::vector< ApproximationfunctionSurfaces
 list of approximations, one per response function
RealVectorArray functionSurfaceCoeffs
 array of approximation coefficient vectors, one per response function
RealVector functionSurfaceVariances
 vector of approximation variances, one value per response function
String challengeFile
 data file for user-supplied challenge data (per interface, since may contain multiple responses)
unsigned short challengeFormat
 tabular format of the challenge points file
bool challengeActiveOnly
 whether to import active only
RealMatrix challengePoints
 container for the challenge points data
Variables actualModelVars
 copy of the actualModel variables object used to simplify conversion among differing variable views
bool actualModelCache
 indicates usage of an evaluation cache by the actualModel
String actualModelInterfaceId
 the interface id from the actualModel used for ordered PRPCache lookups
IntResponseMap beforeSynchResponseMap
 bookkeeping map to catalogue responses generated in map() for use in synch() and synch_nowait(). This supports pseudo-asynchronous operations (approximate responses are always computed synchronously, but asynchronous virtual functions are supported through bookkeeping).

Detailed Description

Derived class within the interface class hierarchy for supporting approximations to simulation-based results.

ApproximationInterface provides an interface class for building a set of global/local/multipoint approximations and performing approximate function evaluations using them. It contains a list of Approximation objects, one for each response function.


Member Function Documentation

void update_approximation ( const Variables vars,
const IntResponsePair &  response_pr 
) [protected, virtual]

This function populates/replaces each Approximation::anchorPoint with the incoming variables/response data point.

Reimplemented from Interface.

References ApproximationInterface::actualModelCache, ApproximationInterface::actualModelInterfaceId, Dakota::data_pairs, Dakota::lookup_by_ids(), ApproximationInterface::mixed_add(), and ApproximationInterface::shallow_add().

void update_approximation ( const RealMatrix &  samples,
const IntResponseMap &  resp_map 
) [protected, virtual]
void update_approximation ( const VariablesArray &  vars_array,
const IntResponseMap &  resp_map 
) [protected, virtual]
void append_approximation ( const Variables vars,
const IntResponsePair &  response_pr 
) [protected, virtual]
void append_approximation ( const RealMatrix &  samples,
const IntResponseMap &  resp_map 
) [protected, virtual]
void append_approximation ( const VariablesArray &  vars_array,
const IntResponseMap &  resp_map 
) [protected, virtual]
void build_approximation ( const RealVector &  c_l_bnds,
const RealVector &  c_u_bnds,
const IntVector &  di_l_bnds,
const IntVector &  di_u_bnds,
const RealVector &  dr_l_bnds,
const RealVector &  dr_u_bnds 
) [protected, virtual]
void rebuild_approximation ( const BoolDeque &  rebuild_deque) [protected, virtual]

This function updates the coefficients for each Approximation based on data increments provided by {update,append}_approximation().

Reimplemented from Interface.

References ApproximationInterface::approxFnIndices, ApproximationInterface::functionSurfaces, SharedApproxData::rebuild(), and ApproximationInterface::sharedData.

void pop_approximation ( bool  save_surr_data) [inline, protected, virtual]

This function removes data provided by a previous append_approximation() call, possibly different numbers for each function, or as specified in pop_count, which is assumed to be the same for all functions.

Reimplemented from Interface.

References ApproximationInterface::approxFnIndices, ApproximationInterface::functionSurfaces, SharedApproxData::pop(), and ApproximationInterface::sharedData.

void restore_approximation ( ) [inline, protected, virtual]

This function updates the coefficients for each Approximation based on data increments provided by {update,append}_approximation().

Reimplemented from Interface.

References ApproximationInterface::approxFnIndices, ApproximationInterface::functionSurfaces, SharedApproxData::post_restore(), SharedApproxData::pre_restore(), and ApproximationInterface::sharedData.

void read_challenge_points ( bool  active_only) [private]

Member Data Documentation

std::vector<Approximation> functionSurfaces [private]

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