Public Member Functions | Protected 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 &actual_model_vars, size_t num_fns)
 primary constructor
 ApproximationInterface (const String &approx_type, const UShortArray &approx_order, const Variables &actual_model_vars, size_t num_fns, unsigned short data_order)
 alternate constructor for instantiations on the fly
 ~ApproximationInterface ()
 destructor

Protected Member Functions

void map (const Variables &vars, const ActiveSet &set, Response &response, const 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 Response &response)
void update_approximation (const RealMatrix &samples, const ResponseArray &resp_array)
void update_approximation (const VariablesArray &vars_array, const ResponseArray &resp_array)
void append_approximation (const Variables &vars, const Response &response)
void append_approximation (const RealMatrix &samples, const ResponseArray &resp_array)
void append_approximation (const VariablesArray &vars_array, const ResponseArray &resp_array)
void build_approximation (const BoolDeque &rebuild_deque, const RealVector &lower_bnds, const RealVector &upper_bnds)
void rebuild_approximation (const BoolDeque &rebuild_deque)
void pop_approximation (bool save_sdp_set)
void restore_approximation ()
bool restore_available ()
void finalize_approximation ()
 finalizes the approximation by applying all trial increments
void clear_current ()
 clears current data from an approximation interface
void clear_all ()
 clears all data from an approximation interface
bool anchor () const
 queries the presence of an anchorPoint within an approximation interface
const Pecos::SurrogateDataPoint & anchor_point () const
 returns the anchorPoint used within an approximation interface
std::vector< Approximation > & approximations ()
 retrieve the Approximations within an ApproximationInterface
const RealVectorArray & approximation_coefficients ()
 retrieve the approximation coefficients from each Approximation within an ApproximationInterface
void approximation_coefficients (const RealVectorArray &approx_coeffs)
 set the approximation coefficients within each Approximation within an ApproximationInterface
const RealVector & approximation_variances (const RealVector &c_vars)
 retrieve the approximation variances from each Approximation within an ApproximationInterface
const SDPList & approximation_data (size_t index)
 retrieve the approximation data from a particular 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 Attributes

IntSet approxFnIndices
 for incomplete approximation sets, this array specifies the response function subset that is approximated
std::vector< ApproximationfunctionSurfaces
 list of approximations, one per response function
RealVectorArray functionSurfaceCoeffs
 array of approximation coefficient vectors, one vector per response function
RealVector functionSurfaceVariances
 vector of approximation variances, one value per response function
SDPList functionSurfaceDataPoints
 list of surrogate data points used in building the approximation for a particular response function
StringArray diag_list
 List of diagnostic metrics.
Variables actualModelVars
 copy of the actualModel variables object used to simplify conversion among differing variable views
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 Response response 
) [protected, virtual]

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

Reimplemented from Interface.

References ApproximationInterface::approxFnIndices, and ApproximationInterface::functionSurfaces.

void update_approximation ( const RealMatrix &  samples,
const ResponseArray &  resp_array 
) [protected, virtual]

This function populates/replaces each Approximation::currentPoints with the incoming variables/response arrays.

Reimplemented from Interface.

References Dakota::abort_handler(), ApproximationInterface::approxFnIndices, and ApproximationInterface::functionSurfaces.

void update_approximation ( const VariablesArray &  vars_array,
const ResponseArray &  resp_array 
) [protected, virtual]

This function populates/replaces each Approximation::currentPoints with the incoming variables/response arrays.

Reimplemented from Interface.

References Dakota::abort_handler(), ApproximationInterface::approxFnIndices, and ApproximationInterface::functionSurfaces.

void append_approximation ( const Variables vars,
const Response response 
) [protected, virtual]

This function appends to each Approximation::currentPoints with one incoming variables/response data point.

Reimplemented from Interface.

References ApproximationInterface::approxFnIndices, and ApproximationInterface::functionSurfaces.

void append_approximation ( const RealMatrix &  samples,
const ResponseArray &  resp_array 
) [protected, virtual]

This function appends to each Approximation::currentPoints with multiple incoming variables/response data points.

Reimplemented from Interface.

References Dakota::abort_handler(), ApproximationInterface::approxFnIndices, and ApproximationInterface::functionSurfaces.

void append_approximation ( const VariablesArray &  vars_array,
const ResponseArray &  resp_array 
) [protected, virtual]

This function appends to each Approximation::currentPoints with multiple incoming variables/response data points.

Reimplemented from Interface.

References Dakota::abort_handler(), ApproximationInterface::approxFnIndices, and ApproximationInterface::functionSurfaces.

void build_approximation ( const BoolDeque &  rebuild_deque,
const RealVector &  lower_bnds,
const RealVector &  upper_bnds 
) [protected, virtual]

This function finds the coefficients for each Approximation based on the data passed through update_approximation() calls. The bounds are used only for graphics visualization.

Reimplemented from Interface.

References ApproximationInterface::approxFnIndices, ApproximationInterface::diag_list, ApproximationInterface::functionSurfaces, and Interface::outputLevel.

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, and ApproximationInterface::functionSurfaces.

void pop_approximation ( bool  save_sdp_set) [protected, virtual]

This function removes data provided by a previous call to append_approximation().

Reimplemented from Interface.

References ApproximationInterface::approxFnIndices, and ApproximationInterface::functionSurfaces.

void restore_approximation ( ) [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, and ApproximationInterface::functionSurfaces.

bool restore_available ( ) [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, and ApproximationInterface::functionSurfaces.


Member Data Documentation

std::vector<Approximation> functionSurfaces [private]

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