SG++-Doxygen-Documentation
sgpp::base::GridPrinter Class Reference

This class implements a utility that allows you to print a grid to file. More...

#include <GridPrinter.hpp>

Inheritance diagram for sgpp::base::GridPrinter:
sgpp::base::GridPrinterForStretching

Public Member Functions

 GridPrinter (Grid &SparseGrid)
 Std-Constructor. More...
 
virtual void printGrid (DataVector &alpha, std::string tFilename, size_t PointsPerDimension)
 Print the grid with its function to a file; front end. More...
 
virtual void printGridDomain (DataVector &alpha, std::string tFilename, BoundingBox &GridArea, size_t PointsPerDimension)
 Print the grid with its function to a file; front end. More...
 
virtual void printLevelIndexGrid (std::string tFilename)
 Print the grid points in level/index format to a file; front end. More...
 
virtual void printSparseGrid (DataVector &alpha, std::string tFilename, bool bSurplus)
 Prints the Grid Points of the Sparse Grid either with their node basis value or their hierarchical surplus. More...
 
virtual void printSparseGridExpTransform (DataVector &alpha, std::string tFilename, bool bSurplus)
 Prints the Grid Points of the Sparse Grid either with their node basis value or their hierarchical surplus. More...
 
virtual ~GridPrinter ()
 Std-Destructor. More...
 

Protected Attributes

GridmyGrid
 Pointer to the grid Object, which should be printed. More...
 

Detailed Description

This class implements a utility that allows you to print a grid to file.

These files can be plotted with gnuplot.

Constructor & Destructor Documentation

sgpp::base::GridPrinter::GridPrinter ( Grid SparseGrid)
explicit

Std-Constructor.

Parameters
SparseGridReference to a Spare Grid, that should be printed
sgpp::base::GridPrinter::~GridPrinter ( )
virtual

Std-Destructor.

Member Function Documentation

void sgpp::base::GridPrinter::printGrid ( DataVector alpha,
std::string  tFilename,
size_t  PointsPerDimension 
)
virtual

Print the grid with its function to a file; front end.

Parameters
alphathe coefficients of the grid's ansatzfunctions
tFilenameabsolute path to the file the grid is written into
PointsPerDimensionspecifies how many functions evaluations in every dimension should be calculated

Reimplemented in sgpp::base::GridPrinterForStretching.

References sgpp::op_factory::createOperationEval(), sgpp::base::BoundingBox::getBoundary(), sgpp::base::Grid::getBoundingBox(), sgpp::base::Grid::getDimension(), sgpp::base::Grid::getSize(), python.statsfileInfo::i, python.utils.statsfile2gnuplot::j, sgpp::base::BoundingBox1D::leftBoundary, myGrid, chess::point, python.leja::points, and sgpp::base::BoundingBox1D::rightBoundary.

Referenced by sgpp::datadriven::LearnerBaseSP::dumpFunction(), sgpp::datadriven::LearnerBase::dumpFunction(), and sgpp::pde::PDESolver::printGrid().

void sgpp::base::GridPrinter::printGridDomain ( DataVector alpha,
std::string  tFilename,
BoundingBox GridArea,
size_t  PointsPerDimension 
)
virtual

Print the grid with its function to a file; front end.

Parameters
alphathe coefficients of the grid's ansatzfunctions
tFilenameabsolute path to the file the grid is written into
GridAreaThe area in which the function should be plotted
PointsPerDimensionspecifies how many functions evaluations in every dimension should be calculated

Reimplemented in sgpp::base::GridPrinterForStretching.

References sgpp::op_factory::createOperationEval(), sgpp::base::BoundingBox::getBoundary(), sgpp::base::Grid::getDimension(), sgpp::base::Grid::getSize(), python.statsfileInfo::i, python.utils.statsfile2gnuplot::j, sgpp::base::BoundingBox1D::leftBoundary, myGrid, chess::point, and sgpp::base::BoundingBox1D::rightBoundary.

Referenced by sgpp::pde::PDESolver::printGridDomain().

void sgpp::base::GridPrinter::printLevelIndexGrid ( std::string  tFilename)
virtual
void sgpp::base::GridPrinter::printSparseGrid ( DataVector alpha,
std::string  tFilename,
bool  bSurplus 
)
virtual

Prints the Grid Points of the Sparse Grid either with their node basis value or their hierarchical surplus.

Parameters
alphathe coefficients of the grid's ansatzfunctions
tFilenameabsoulte path to the file the grid is written into
bSurplusspecifies whether the surplus (true) or the node basis value (false) is written

Reimplemented in sgpp::base::GridPrinterForStretching.

References sgpp::op_factory::createOperationHierarchisation(), chess::dim, python.toolsExtended::doDehierarchisation(), sgpp::base::HashGridStorage::getCoordinates(), sgpp::base::Grid::getDimension(), sgpp::base::HashGridStorage::getPoint(), sgpp::base::Grid::getSize(), sgpp::base::Grid::getStorage(), python.statsfileInfo::i, python.utils.statsfile2gnuplot::j, myGrid, and analyse_erg::tmp.

Referenced by sgpp::datadriven::LearnerBaseSP::dumpGrid(), sgpp::datadriven::LearnerBase::dumpGrid(), sgpp::pde::PDESolver::printSparseGrid(), and sgpp::solver::Euler::solve().

void sgpp::base::GridPrinter::printSparseGridExpTransform ( DataVector alpha,
std::string  tFilename,
bool  bSurplus 
)
virtual

Prints the Grid Points of the Sparse Grid either with their node basis value or their hierarchical surplus.

The coordinates of the grid points are pushed the exp function. So log transformed grids can be plotted in cartesion coordinates.

Parameters
alphathe coefficients of the grid's ansatzfunctions
tFilenameabsoulte path to the file the grid is written into
bSurplusspecifies whether the surplus (true) or the node basis value (false) is written

Reimplemented in sgpp::base::GridPrinterForStretching.

References sgpp::op_factory::createOperationHierarchisation(), chess::dim, python.toolsExtended::doDehierarchisation(), sgpp::base::HashGridStorage::getCoordinates(), sgpp::base::Grid::getDimension(), sgpp::base::HashGridStorage::getPoint(), sgpp::base::Grid::getSize(), sgpp::base::Grid::getStorage(), python.statsfileInfo::i, python.utils.statsfile2gnuplot::j, myGrid, and analyse_erg::tmp.

Referenced by sgpp::pde::PDESolver::printSparseGridExpTransform().

Member Data Documentation


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