Doxygen 1.9.1
Toolkit for Adaptive Stochastic Modeling and Non-Intrusive ApproximatioN: Tasmanian v8.2 (development)
TasGrid::DynamicConstructorDataGlobal Class Reference

Helper class that stores data from dynamic construction of a Global grid. More...

#include <tsgDConstructGridGlobal.hpp>

Public Types

enum class  AddPointResult { tensor_incomplete , tensor_complete , tensor_missing }
 Defines the result of adding a point to the list of know points with values. More...
 

Public Member Functions

 DynamicConstructorDataGlobal (size_t cnum_dimensions, size_t cnum_outputs)
 Constructor, requires that the dimension and the number of model outputs is specified.
 
template<typename iomode >
 DynamicConstructorDataGlobal (std::istream &is, size_t cnum_dimensions, size_t cnum_outputs, iomode)
 Read constructor.
 
 ~DynamicConstructorDataGlobal ()=default
 Default destructor, release all used memory and erase all stored data.
 
template<bool use_ascii>
void write (std::ostream &os) const
 Write the data to a stream using ascii or binary format.
 
void restrictData (int ibegin, int iend)
 Restrict data between ibegin and iend entries.
 
int getMaxTensor () const
 Returns the maximum index of any of the stored tensors.
 
double getMaxTensorWeight () const
 Returns the maximum tensor weight.
 
void reloadPoints (std::function< int(int)> getNumPoints)
 Called after read, reinitializes the points and loaded structures for the tensors.
 
void clearTesnors ()
 Delete the tensors with non-negative weights, i.e., clear all but the tensors selected by the initial grid.
 
MultiIndexSet getInitialTensors () const
 Get a set of all tensors with negative weight, i.e., the tensors selected for the initial run.
 
void addTensor (const int *tensor, std::function< int(int)> getNumPoints, double weight)
 Add a new tensor to the candidates, with the given weight and using getNumPoints() to define the associated nodes.
 
MultiIndexSet getNodesIndexes ()
 Get the node indexes of the points associated with the candidate tensors, the order is the same as the tensors sorted by ascending weight.
 
AddPointResult addNewNode (const std::vector< int > &point, const std::vector< double > &value)
 Add a new data point with the index and the value, returns information about the tensor.
 
void ejectCompleteTensor (MultiIndexSet const &current_tensors, MultiIndexSet &new_tensors, MultiIndexSet &new_points, StorageSet &vals)
 Returns a new set of tensors, points and values that can be added to the current tensors.
 

Detailed Description

Helper class that stores data from dynamic construction of a Global grid.

The class stores candidate tensors with corresponding weights as well as the model data provided by the user. When enough data has been computed to complete a tensor, the tensor can be ejected with the points and model data returned in a format that is easy to incorporate within the data structures of the GridGlobal class.

Member Enumeration Documentation

◆ AddPointResult

Defines the result of adding a point to the list of know points with values.

Enumerator
tensor_incomplete 

Indicates the point was added to an existing tensor but more points are needed before processing the tensor.

tensor_complete 

Indicates the point was added to an existing tensor and the tensor is ready for processing.

tensor_missing 

Indicates the point is associated with an unknown tensor.


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