SG++
sgpp::base::GridPrinterForStretching Class Reference

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

#include <GridPrinterForStretching.hpp>

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

Public Member Functions

 GridPrinterForStretching (Grid &SparseGrid)
 Std-Constructor. More...
 
void printGrid (DataVector &alpha, std::string tFilename, size_t PointsPerDimension) override
 Print the grid with its function to a file; front end. More...
 
void printGridDomain (DataVector &alpha, std::string tFilename, BoundingBox &GridArea, size_t PointsPerDimension) override
 This function is not used for stretching grid printing, use printGridDomainStretching instead. More...
 
void printGridDomainStretching (DataVector &alpha, std::string tFilename, Stretching &GridArea, size_t PointsPerDimension)
 Print the grid with its function to a file; front end. More...
 
void printSparseGrid (DataVector &alpha, std::string tFilename, bool bSurplus) override
 Prints the Grid Points of the Sparse Grid either with their node basis value or their hierarchical surplus. More...
 
void printSparseGridExpTransform (DataVector &alpha, std::string tFilename, bool bSurplus) override
 Prints the Grid Points of the Sparse Grid either with their node basis value or their hierarchical surplus. More...
 
 ~GridPrinterForStretching () override
 Std-Destructor. More...
 
- Public Member Functions inherited from sgpp::base::GridPrinter
 GridPrinter (Grid &SparseGrid)
 Std-Constructor. More...
 
virtual void printLevelIndexGrid (std::string tFilename)
 Print the grid points in level/index format to a file; front end. More...
 
virtual ~GridPrinter ()
 Std-Destructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from sgpp::base::GridPrinter
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::GridPrinterForStretching::GridPrinterForStretching ( Grid SparseGrid)
explicit

Std-Constructor.

Parameters
SparseGridReference to a Spare Grid, that should be printed

References sgpp::base::GridPrinter::myGrid.

sgpp::base::GridPrinterForStretching::~GridPrinterForStretching ( )
override

Std-Destructor.

Member Function Documentation

void sgpp::base::GridPrinterForStretching::printGrid ( DataVector alpha,
std::string  tFilename,
size_t  PointsPerDimension 
)
overridevirtual

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 from sgpp::base::GridPrinter.

References sgpp::op_factory::createOperationEval(), sgpp::base::BoundingBox::getBoundary(), sgpp::base::Grid::getDimension(), sgpp::base::Grid::getSize(), sgpp::base::Grid::getStretching(), sgpp::base::BoundingBox1D::leftBoundary, sgpp::base::GridPrinter::myGrid, python.leja::points, and sgpp::base::BoundingBox1D::rightBoundary.

Referenced by sgpp::pde::HeatEquationSolverWithStretching::printGrid().

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

This function is not used for stretching grid printing, use printGridDomainStretching instead.

Reimplemented from sgpp::base::GridPrinter.

void sgpp::base::GridPrinterForStretching::printGridDomainStretching ( DataVector alpha,
std::string  tFilename,
Stretching GridArea,
size_t  PointsPerDimension 
)

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

References sgpp::op_factory::createOperationEval(), sgpp::base::BoundingBox::getBoundary(), sgpp::base::Grid::getDimension(), sgpp::base::Grid::getSize(), sgpp::base::BoundingBox1D::leftBoundary, sgpp::base::GridPrinter::myGrid, and sgpp::base::BoundingBox1D::rightBoundary.

Referenced by sgpp::pde::HeatEquationSolverWithStretching::printGridDomainStretching().

void sgpp::base::GridPrinterForStretching::printSparseGrid ( DataVector alpha,
std::string  tFilename,
bool  bSurplus 
)
overridevirtual

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 from sgpp::base::GridPrinter.

References sgpp::op_factory::createOperationHierarchisation(), sgpp::base::OperationHierarchisation::doDehierarchisation(), sgpp::base::HashGridStorage::getCoordinates(), sgpp::base::Grid::getDimension(), sgpp::base::HashGridStorage::getPoint(), sgpp::base::Grid::getSize(), sgpp::base::Grid::getStorage(), sgpp::base::GridPrinter::myGrid, and analyse_erg::tmp.

Referenced by sgpp::pde::HeatEquationSolverWithStretching::printSparseGrid().

void sgpp::base::GridPrinterForStretching::printSparseGridExpTransform ( DataVector alpha,
std::string  tFilename,
bool  bSurplus 
)
overridevirtual

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 from sgpp::base::GridPrinter.

References sgpp::op_factory::createOperationHierarchisation(), sgpp::base::OperationHierarchisation::doDehierarchisation(), sgpp::base::HashGridStorage::getCoordinates(), sgpp::base::Grid::getDimension(), sgpp::base::HashGridStorage::getPoint(), sgpp::base::Grid::getSize(), sgpp::base::Grid::getStorage(), sgpp::base::GridPrinter::myGrid, and analyse_erg::tmp.

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


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