|
TasmanianSparseGrid | makeEmpty () |
| Returns an empty sparse grid. More...
|
|
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(). More...
|
|
TasmanianSparseGrid | 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(). More...
|
|
TasmanianSparseGrid | 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(). More...
|
|
TasmanianSparseGrid | 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(). More...
|
|
TasmanianSparseGrid | 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(). More...
|
|
TasmanianSparseGrid | readGrid (const char *filename) |
| Factory method, creates a new grid and calls TasmanianSparseGrid::read(). More...
|
|
TasmanianSparseGrid | readGrid (std::string const &filename) |
| Overload using std::string. More...
|
|
TasmanianSparseGrid | copyGrid (TasmanianSparseGrid const &source, int outputs_begin=0, int outputs_end=-1) |
| Returns a grid that is a copy of the source. More...
|
|
template<typename T > |
std::vector< T > | spltVector2D (std::vector< T > const &x, size_t stride, int ibegin, int iend) |
| Take a vector logically organized into stips and strides and extract a sub-strip from every strip. More...
|
|
template<typename > |
void | deleteHandle (int *) |
| Deletes the handle, specialized for each TPL backend and tag in TasGrid::AccHandle namepace. More...
|
|
CustomTabulated | getSubrules (CustomTabulated &ct, int start_index, int stride, std::string description) |
| Generates a subset of rules as a CustomTabulated object. The subset has a short description string given by description and takes the levels of the input ct starting from level start_index with distance stride between consecutive levels. More...
|
|
template<class T > |
std::vector< const T * > | makeReverseReferenceVector (const std::forward_list< T > &list) |
| Takes a list and creates a vector of references in reversed order, needed for I/O so that read can be followed by push_front. . More...
|
|
template<bool use_ascii> |
void | writeNodeDataList (const std::forward_list< NodeData > &data, std::ostream &os) |
| Writes a NodeData std::forward_list to a file using either binary or ascii format. . More...
|
|
template<typename iomode > |
std::forward_list< NodeData > | readNodeDataList (std::istream &is, size_t num_dimensions, size_t num_outputs) |
| Reads a NodeData std::forward_list from a file using either binary or ascii format. . More...
|
|
template<typename iomode > |
std::forward_list< TensorData > | readTensorDataList (std::istream &is, size_t num_dimensions) |
| Reads a TensorData std::forward_list from a file using either binary or ascii format. More...
|
|
template<class RuleLike > |
std::vector< double > | listToNodes (std::forward_list< NodeData > const &node_list, size_t num_dimensions, RuleLike const &rule) |
| Using MultiIndexManipulations::indexesToNodes() convert the node_list to actual points according to the rule. More...
|
|
template<typename callable_method > |
std::vector< double > | listToLocalNodes (std::forward_list< NodeData > const &node_list, size_t num_dimensions, callable_method rule) |
| Using MultiIndexManipulations::indexesToNodes() convert the node_list to actual points according to the rule. More...
|
|
double | poly_eval (const std::vector< double > &roots, double x) |
| Evaluates a polynomial with roots given by roots at the point x. More...
|
|
double | lagrange_eval (size_t idx, const std::vector< double > &roots, double x) |
| Evaluates a Lagrange basis polynomial at a point x. More...
|
|
template<bool is_symmetric> |
void | getGaussNodesAndWeights (const int n, const std::vector< double > &ref_points, const std::vector< double > &ref_weights, std::vector< std::vector< double >> &points_cache, std::vector< std::vector< double >> &weights_cache) |
| Generates n levels of points and weights using orthogonal polynomials with respect to ref_points and ref_weights. More...
|
|
TasGrid::CustomTabulated | getShiftedExoticQuadrature (const int n, const double shift, const std::vector< double > &shifted_weights, const std::vector< double > &ref_points, const char *description, const bool is_symmetric=false) |
| Generate the exotic quadrature points and weights and load them into a TasGrid::CustomTabulated object. More...
|
|
void | shiftReferenceWeights (std::vector< double > const &vals, double shift, std::vector< double > &ref_weights) |
| Multiplies the reference quadrature weights by the shifted values of the weight function. More...
|
|
TasGrid::CustomTabulated | getExoticQuadrature (const int num_levels, const double shift, const TasGrid::TasmanianSparseGrid &grid, const char *description, const bool is_symmetric=false) |
| Constructs an exotic quadrature from a sparse grid object. More...
|
|
TasGrid::CustomTabulated | getExoticQuadrature (const int num_levels, const double shift, std::function< double(double)> weight_fn, const int num_ref_points, const char *description, const bool is_symmetric=false) |
| Similar to getExoticQuadrature() but the weight function is defined by a lambda expression. More...
|
|
template<bool parallel_construction, bool use_initial_guess> |
void | constructCommon (ModelSignature model, size_t max_num_points, size_t num_parallel_jobs, size_t max_samples_per_job, TasmanianSparseGrid &grid, std::function< std::vector< double >(TasmanianSparseGrid &)> candidates, std::string const &checkpoint_filename) |
| Construction algorithm using generic candidates procedure. More...
|
|
template<bool parallel_construction = TasGrid::mode_parallel, bool initial_guess = no_initial_guess> |
void | constructSurrogate (ModelSignature model, size_t max_num_points, size_t num_parallel_jobs, size_t max_samples_per_job, TasmanianSparseGrid &grid, double tolerance, TypeRefinement criteria, int output=-1, std::vector< int > const &level_limits=std::vector< int >(), std::string const &checkpoint_filename=std::string()) |
| Construct a sparse grid surrogate to the model defined by the lambda. More...
|
|
template<bool parallel_construction = TasGrid::mode_parallel, bool initial_guess = no_initial_guess> |
void | constructSurrogate (ModelSignature model, size_t max_num_points, size_t num_parallel_jobs, size_t max_samples_per_job, TasmanianSparseGrid &grid, TypeDepth type, std::vector< int > const &anisotropic_weights=std::vector< int >(), std::vector< int > const &level_limits=std::vector< int >(), std::string const &checkpoint_filename=std::string()) |
| Construct a sparse grid surrogate to the model defined by the lambda. More...
|
|
template<bool parallel_construction = TasGrid::mode_parallel, bool initial_guess = no_initial_guess> |
void | constructSurrogate (ModelSignature model, size_t max_num_points, size_t num_parallel_jobs, size_t max_samples_per_job, TasmanianSparseGrid &grid, TypeDepth type, int output, std::vector< int > const &level_limits=std::vector< int >(), std::string const &checkpoint_filename=std::string()) |
| Construct a sparse grid surrogate to the model defined by the lambda. More...
|
|
bool | hasGPUBasis (TasmanianSparseGrid const &grid) |
| Returns true if the grid has a GPU algorithm for computing the hierarchical basis. More...
|
|
template<typename scalar_type > |
void | generateCoefficientsGPU (double const data_points[], int num_data, scalar_type model_values[], double tolerance, TasmanianSparseGrid &grid) |
| Generates the coefficients and solves the least-squares problem. More...
|
|
template<typename scalar_type > |
Data2D< scalar_type > | generateCoefficients (double const data_points[], int num_data, double const model_values[], double tolerance, TasmanianSparseGrid &grid) |
| Generates the coefficients and solves the least-squares problem. More...
|
|
template<typename scalar_type > |
void | loadUnstructuredDataL2tmpl (double const data_points[], int num_data, double const model_values[], double tolerance, TasmanianSparseGrid &grid) |
| Template implementation that handles the case of Fourier grids vs. all other types. More...
|
|
void | loadUnstructuredDataL2 (double const data_points[], int num_data, double const model_values[], double tolerance, TasmanianSparseGrid &grid) |
| Construct a sparse grid surrogate using a least-squares fit. More...
|
|
void | loadUnstructuredDataL2 (std::vector< double > const &data_points, std::vector< double > const &model_values, double tolerance, TasmanianSparseGrid &grid) |
| Overload that used vectors and infers the number of data points from the size of the vectors. More...
|
|
template<bool use_initial_guess> |
void | mpiConstructCommon (ModelSignatureMPI model, int num_dimensions, int num_outputs, size_t max_num_points, size_t max_samples_per_job, size_t max_num_ranks, int tagx, int tagy, int root, MPI_Comm comm, TasmanianSparseGrid &grid, std::function< std::vector< double >(TasmanianSparseGrid &)> candidates, std::string const &checkpoint_filename) |
| MPI construction algorithm using generic candidates procedure. More...
|
|
template<bool use_initial_guess = no_initial_guess> |
void | mpiConstructSurrogate (ModelSignatureMPI model, int num_dimensions, int num_outputs, size_t max_num_points, size_t max_samples_per_job, size_t max_num_ranks, int tagx, int tagy, int root, MPI_Comm comm, TasmanianSparseGrid &grid, double tolerance, TypeRefinement criteria, int output=-1, std::vector< int > const &level_limits=std::vector< int >(), std::vector< double > const &scale_correction=std::vector< double >(), std::string const &checkpoint_filename=std::string()) |
| Construct a sparse grid surrogate to the model defined by the lambda, MPI version. More...
|
|
template<bool use_initial_guess = no_initial_guess> |
void | mpiConstructSurrogate (ModelSignatureMPI model, int num_dimensions, int num_outputs, size_t max_num_points, size_t max_samples_per_job, size_t max_num_ranks, int tagx, int tagy, int root, MPI_Comm comm, TasmanianSparseGrid &grid, TypeDepth type, std::vector< int > const &anisotropic_weights=std::vector< int >(), std::vector< int > const &level_limits=std::vector< int >(), std::string const &checkpoint_filename=std::string()) |
| Construct a sparse grid surrogate to the model defined by the lambda, MPI version. More...
|
|
template<bool use_initial_guess = no_initial_guess> |
void | mpiConstructSurrogate (ModelSignatureMPI model, int num_dimensions, int num_outputs, size_t max_num_points, size_t max_samples_per_job, size_t max_num_ranks, int tagx, int tagy, int root, MPI_Comm comm, TasmanianSparseGrid &grid, TypeDepth type, int output, std::vector< int > const &level_limits=std::vector< int >(), std::string const &checkpoint_filename=std::string()) |
| Construct a sparse grid surrogate to the model defined by the lambda, MPI version. More...
|
|
template<bool use_initial_guess = no_initial_guess> |
void | mpiConstructWorker (ModelSignatureMPI model, int num_dimensions, int num_outputs, size_t max_samples_per_job, size_t max_num_ranks, int tagx, int tagy, int root, MPI_Comm comm) |
| Executes the worker (i.e., non-root) portion of the MPI sampling. More...
|
|
int | getMPIRank (MPI_Comm comm) |
| Utility to return the rank within the given comm. More...
|
|
template<bool binary = TasGrid::mode_binary> |
int | MPIGridSend (TasmanianSparseGrid const &grid, int destination, int tag, MPI_Comm comm) |
| Send a grid to another process in the MPI comm. More...
|
|
template<bool binary = TasGrid::mode_binary> |
int | MPIGridRecv (TasmanianSparseGrid &grid, int source, int tag, MPI_Comm comm, MPI_Status *status=MPI_STATUS_IGNORE) |
| Receive a grid from another process in the MPI comm. More...
|
|
template<bool binary = TasGrid::mode_binary> |
int | MPIGridBcast (TasmanianSparseGrid &grid, int root, MPI_Comm comm) |
| Broadcast a grid to all processes in an MPI comm. More...
|
|
template<bool binary = TasGrid::mode_binary> |
int | MPIGridScatterOutputs (TasmanianSparseGrid const &source, TasmanianSparseGrid &destination, int root, int tag, MPI_Comm comm) |
| Split the grid across the comm where each rank receives an equal portion of the total outputs. More...
|
|
template<bool parallel_construction = true, bool overwrite_loaded = false> |
void | loadNeededValues (std::function< void(double const x[], double y[], size_t thread_id)> model, TasmanianSparseGrid &grid, size_t num_threads) |
| Loads the current grid with model values, does not perform any refinement. More...
|
|
template<bool parallel_construction = true, bool overwrite_loaded = false> |
void | loadNeededValues (std::function< void(std::vector< double > const &x, std::vector< double > &y, size_t thread_id)> model, TasmanianSparseGrid &grid, size_t num_threads) |
| Overload that uses vectors for the model inputs and outputs. More...
|
|
template<bool parallel_construction = true, bool overwrite_loaded = false> |
void | loadNeededPoints (std::function< void(double const x[], double y[], size_t thread_id)> model, TasmanianSparseGrid &grid, size_t num_threads) |
| Alias to loadNeededValues(), array variant.
|
|
template<bool parallel_construction = true, bool overwrite_loaded = false> |
void | loadNeededPoints (std::function< void(std::vector< double > const &x, std::vector< double > &y, size_t thread_id)> model, TasmanianSparseGrid &grid, size_t num_threads) |
| Alias to loadNeededValues(), vector variant.
|
|