SG++
List of different Grid Types

This example is supposed to simply demonstrate the available grid, boundary and basis function types.

First, we include the meta-header sgpp_base.hpp, which includes itself all headers from the base module and set a few parameters.

#include <sgpp_base.hpp>
int main() {
size_t dim = 2;
size_t level = 3;
size_t polyDegree = 4;

LinearGrid

createLinearGrid_C2J-small.png

LinearBoundaryGrid

createLinearBoundaryGrid_C2,_1J-small.png

LinearStretchedGrid

createLinearStretchedGrid_C2J-small.png

LinearStretchedBoundaryGrid

createLinearStretchedBoundaryGrid_C2J-small.png

WaveletGrid

createWaveletGrid_C2J-small.png

WaveletBoundaryGrid

createWaveletBoundaryGrid_C2J-small.png

SquareRootGrid

createSquareRootGrid_C2J-small.png

PrewaveletGrid

createPrewaveletGrid_C2J-small.png

PolyGrid

createPolyGrid_C2,_3J-small.png

grid = sgpp::base::Grid::createPolyGrid(dim, polyDegree);
grid->getGenerator().regular(level);

PolyBoundaryGrid

createPolyBoundaryGrid_C2,_3J-small.png

grid->getGenerator().regular(level);

PeriodicGrid

createPeriodicGrid_C2J-small.png

ModWaveletGrid

createModWaveletGrid_C2J-small.png

ModPolyGrid

createModPolyGrid_C2,_3J-small.png

grid = sgpp::base::Grid::createModPolyGrid(dim, polyDegree);
grid->getGenerator().regular(level);

ModLinearGridStencil

createModLinearGridStencil_C2J-small.png

ModLinearGrid

createModLinearGrid_C2J-small.png

ModFundamentalSplineGrid

createModFundamentalSplineGrid_C2,_3J-small.png

ModBsplineGrid

createModBsplineGrid_C2,_3J-small.png

grid = sgpp::base::Grid::createModBsplineGrid(dim, polyDegree);
grid->getGenerator().regular(level);

ModBsplineClenshawCurtisGrid

createModBsplineClenshawCurtisGrid_C2,_3J-small.png

LinearTruncatedBoundaryGrid

createLinearTruncatedBoundaryGrid_C2J-small.png

LinearGridStencil

createLinearGridStencil_C2J-small.png

LinearClenshawCurtisGrid

createLinearClenshawCurtisGrid_C2J-small.png

FundamentalSplineGrid

createFundamentalSplineGrid_C2,_3J-small.png

grid->getGenerator().regular(level);

BsplineGrid

createBsplineGrid_C2,_3J-small.png

grid = sgpp::base::Grid::createBsplineGrid(dim, polyDegree);
grid->getGenerator().regular(level);

BsplineClenshawCurtisGrid

createBsplineClenshawCurtisGrid_C2,_3J-small.png

BsplineBoundaryGrid

createBsplineBoundaryGrid_C2,_3J-small.png

grid->getGenerator().regular(level);
}