Doxygen 1.9.8
Toolkit for Adaptive Stochastic Modeling and Non-Intrusive ApproximatioN: Tasmanian v8.2
 
Loading...
Searching...
No Matches
Sparse Grids
Collaboration diagram for Sparse Grids:

Modules

 Sparse Grid Class
 
 Enumerated types
 
 Miscellaneous utility templates
 
 Math functions and constants
 
 Multi-Index data structures
 
 Multi-Index manipulation algorithms
 
 Hierarchical multi-Index manipulation algorithms
 
 Templates for common I/O methods, simple binary/ascii switch provided for all templates
 
 Classes and functions used for acceleration methods
 
 Core meta-data for Gauuss, Chebyshev and custom rules
 
 Linear solvers
 
 Refinement related classes, structures, and methods
 
 Greedy Sequences
 

Files

file  TasmanianSparseGrid.hpp
 Main header for the Sparse Grid module.
 

Namespaces

namespace  TasGrid
 Encapsulates the Tasmanian Sparse Grid module.
 

Functions

TasmanianSparseGrid TasGrid::makeEmpty ()
 Returns an empty sparse grid.
 
TasmanianSparseGrid TasGrid::makeGlobalGrid (int dimensions, int outputs, int depth, TypeDepth type, TypeOneDRule rule, std::vector< int > const &anisotropic_weights=std::vector< int >(), double alpha=0.0, double beta=0.0, const char *custom_filename=nullptr, std::vector< int > const &level_limits=std::vector< int >())
 Factory method, creates a new grid and calls TasmanianSparseGrid::makeGlobalGrid().
 
TasmanianSparseGrid TasGrid::makeSequenceGrid (int dimensions, int outputs, int depth, TypeDepth type, TypeOneDRule rule, std::vector< int > const &anisotropic_weights=std::vector< int >(), std::vector< int > const &level_limits=std::vector< int >())
 Factory method, creates a new grid and calls TasmanianSparseGrid::makeSequenceGrid().
 
TasmanianSparseGrid TasGrid::makeLocalPolynomialGrid (int dimensions, int outputs, int depth, int order=1, TypeOneDRule rule=rule_localp, std::vector< int > const &level_limits=std::vector< int >())
 Factory method, creates a new grid and calls TasmanianSparseGrid::makeLocalPolynomialGrid().
 
TasmanianSparseGrid TasGrid::makeWaveletGrid (int dimensions, int outputs, int depth, int order=1, std::vector< int > const &level_limits=std::vector< int >())
 Factory method, creates a new grid and calls TasmanianSparseGrid::makeWaveletGrid().
 
TasmanianSparseGrid TasGrid::makeFourierGrid (int dimensions, int outputs, int depth, TypeDepth type, std::vector< int > const &anisotropic_weights=std::vector< int >(), std::vector< int > const &level_limits=std::vector< int >())
 Factory method, creates a new grid and calls TasmanianSparseGrid::makeFourierGrid().
 
TasmanianSparseGrid TasGrid::readGrid (const char *filename)
 Factory method, creates a new grid and calls TasmanianSparseGrid::read().
 
TasmanianSparseGrid TasGrid::readGrid (std::string const &filename)
 Overload using std::string.
 
TasmanianSparseGrid TasGrid::copyGrid (TasmanianSparseGrid const &source, int outputs_begin=0, int outputs_end=-1)
 Returns a grid that is a copy of the source.
 

Variables

constexpr bool TasGrid::mode_ascii = false
 Constant allowing for more expressive selection of ascii and binary mode in IO methods.
 
constexpr bool TasGrid::mode_binary = true
 Constant allowing for more expressive selection of ascii and binary mode in IO methods.
 

Detailed Description

Sparse Grids
A family of algorithms for multidimensional integration and interpolation where the operator is constructed as a linear combination of tensors with different number of points in each direction. The combination of tensors is chosen to include a specific function space that is optimal for approximation of the target model. For more details of the sparse grid construction, refer to the .pdf manual available at http://tasmanian.ornl.gov/

Function Documentation

◆ makeEmpty()

TasmanianSparseGrid TasGrid::makeEmpty ( )
inline

Returns an empty sparse grid.

Usage:

auto grid = TasGrid::makeEmpty(); // equivalent to TasGrid::TasmanianSparseGrid grid;
grid = TasGrid::makeEmpty(); // equivalent to grid.clear();
TasmanianSparseGrid makeEmpty()
Returns an empty sparse grid.
Definition TasmanianSparseGrid.hpp:2270

Useful for some MPI calls where some MPI ranks must pass a dummy empty grid.

◆ makeGlobalGrid()

TasmanianSparseGrid TasGrid::makeGlobalGrid ( int  dimensions,
int  outputs,
int  depth,
TypeDepth  type,
TypeOneDRule  rule,
std::vector< int > const &  anisotropic_weights = std::vector<int>(),
double  alpha = 0.0,
double  beta = 0.0,
const char *  custom_filename = nullptr,
std::vector< int > const &  level_limits = std::vector<int>() 
)
inline

Factory method, creates a new grid and calls TasmanianSparseGrid::makeGlobalGrid().

Allows for one-line initialization, i.e.,

auto grid = TasGrid::makeGlobalGrid(...);
TasmanianSparseGrid makeGlobalGrid(int dimensions, int outputs, int depth, TypeDepth type, TypeOneDRule rule, std::vector< int > const &anisotropic_weights=std::vector< int >(), double alpha=0.0, double beta=0.0, const char *custom_filename=nullptr, std::vector< int > const &level_limits=std::vector< int >())
Factory method, creates a new grid and calls TasmanianSparseGrid::makeGlobalGrid().
Definition TasmanianSparseGrid.hpp:2287

as opposed to

grid.makeGlobalGrid(...);
The master-class that represents an instance of a Tasmanian sparse grid.
Definition TasmanianSparseGrid.hpp:293
void makeGlobalGrid(int dimensions, int outputs, int depth, TypeDepth type, TypeOneDRule rule, std::vector< int > const &anisotropic_weights, double alpha=0.0, double beta=0.0, const char *custom_filename=nullptr, std::vector< int > const &level_limits=std::vector< int >())
Make a Global Grid using Lagrange polynomials with support over the entire domain.

◆ makeSequenceGrid()

TasmanianSparseGrid TasGrid::makeSequenceGrid ( int  dimensions,
int  outputs,
int  depth,
TypeDepth  type,
TypeOneDRule  rule,
std::vector< int > const &  anisotropic_weights = std::vector<int>(),
std::vector< int > const &  level_limits = std::vector<int>() 
)
inline

Factory method, creates a new grid and calls TasmanianSparseGrid::makeSequenceGrid().

Allows for one-line initialization, see TasGrid::makeGlobalGrid().

◆ makeLocalPolynomialGrid()

TasmanianSparseGrid TasGrid::makeLocalPolynomialGrid ( int  dimensions,
int  outputs,
int  depth,
int  order = 1,
TypeOneDRule  rule = rule_localp,
std::vector< int > const &  level_limits = std::vector<int>() 
)
inline

Factory method, creates a new grid and calls TasmanianSparseGrid::makeLocalPolynomialGrid().

Allows for one-line initialization, see TasGrid::makeGlobalGrid().

◆ makeWaveletGrid()

TasmanianSparseGrid TasGrid::makeWaveletGrid ( int  dimensions,
int  outputs,
int  depth,
int  order = 1,
std::vector< int > const &  level_limits = std::vector<int>() 
)
inline

Factory method, creates a new grid and calls TasmanianSparseGrid::makeWaveletGrid().

Allows for one-line initialization, see TasGrid::makeGlobalGrid().

◆ makeFourierGrid()

TasmanianSparseGrid TasGrid::makeFourierGrid ( int  dimensions,
int  outputs,
int  depth,
TypeDepth  type,
std::vector< int > const &  anisotropic_weights = std::vector<int>(),
std::vector< int > const &  level_limits = std::vector<int>() 
)
inline

Factory method, creates a new grid and calls TasmanianSparseGrid::makeFourierGrid().

Allows for one-line initialization, see TasGrid::makeGlobalGrid().

◆ readGrid() [1/2]

TasmanianSparseGrid TasGrid::readGrid ( const char *  filename)
inline

Factory method, creates a new grid and calls TasmanianSparseGrid::read().

Allows for one-line initialization, makes a new grid and reads from a file.

Parameters
filenamesame as TasmanianSparseGrid::read().
Returns
a new grid that is read from the file.

◆ readGrid() [2/2]

TasmanianSparseGrid TasGrid::readGrid ( std::string const &  filename)
inline

Overload using std::string.

Same as readGrid() but the filename is given as a string.

◆ copyGrid()

TasmanianSparseGrid TasGrid::copyGrid ( TasmanianSparseGrid const &  source,
int  outputs_begin = 0,
int  outputs_end = -1 
)
inline

Returns a grid that is a copy of the source.

Creates a new grid and calls TasmanianSparseGrid::copyGrid() from the source.

Parameters
sourceis the grid to copy from.
outputs_beginsame as TasmanianSparseGrid::copyGrid().
outputs_endsame as TasmanianSparseGrid::copyGrid().
Returns
a new grid that is a copy of the source.