SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
Generalised Sparse Grids

This example creates a generalised grid.

The first CLI argument is the number of dimensions, the second the level and the third the parameter T. It then prints out the grid size.

#include <cstdlib>
#include <iostream>
int main(int argc, char **argv) {
auto dimensions = ((argc >= 2) ? std::atoi(argv[1]) : 2);
auto level = ((argc >= 3) ? std::atoi(argv[2]) : 3);
double T = ((argc >= 4) ? std::atof(argv[3]) : 0);
auto& generator = grid->getGenerator();
generator.regular(level, T);
std::cout << grid->getSize() << std::endl;
}
static Grid * createModLinearGrid(size_t dim)
creates a modified linear grid
Definition Grid.cpp:99
int main()
Definition densityMultiplication.cpp:22
uint32_t level
Definition multHPX.cpp:26
std::unique_ptr< sgpp::base::Grid > grid(nullptr)