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

This class handles the conversion of a boundary grid with dirichlet boundary conditions into an inner. More...

#include <DirichletGridConverter.hpp>

Public Member Functions

void buildInnerGridWithCoefs (Grid &BoundaryGrid, DataVector &BoundaryCoefs, Grid **InnerGrid, DataVector **InnerCoefs)
 builds a sparse grid without any boundaries from a sparse grid with boundaries. More...
 
void calcInnerCoefs (DataVector &BoundaryCoefs, DataVector &InnerCoefs)
 copies the boundary grid's inner coefficients to the inner grid coefficients More...
 
 DirichletGridConverter ()
 Constructor. More...
 
void rebuildInnerGridWithCoefs (Grid &BoundaryGrid, DataVector &BoundaryCoefs, Grid **InnerGrid, DataVector **InnerCoefs)
 rebuilds a sparse grid without any boundaries from a sparse grid with boundaries. More...
 
void updateBoundaryCoefs (DataVector &BoundaryCoefs, DataVector &InnerCoefs)
 copies the inner grid's coefficients to the identical (inner) ansatzfunctions in the boundary grid. More...
 
 ~DirichletGridConverter ()
 Destructor. More...
 

Detailed Description

This class handles the conversion of a boundary grid with dirichlet boundary conditions into an inner.

This is useful in case of solving a linear system of the grid's ansatzfunctions' coefficients: Here the boundary points are needed during solving the system (they constant because dirichlet boundary conditions), so a lot of work can be saved if only the inner points are used.

Constructor & Destructor Documentation

◆ DirichletGridConverter()

sgpp::base::DirichletGridConverter::DirichletGridConverter ( )

Constructor.

◆ ~DirichletGridConverter()

sgpp::base::DirichletGridConverter::~DirichletGridConverter ( )

Destructor.

Member Function Documentation

◆ buildInnerGridWithCoefs()

void sgpp::base::DirichletGridConverter::buildInnerGridWithCoefs ( Grid BoundaryGrid,
DataVector BoundaryCoefs,
Grid **  InnerGrid,
DataVector **  InnerCoefs 
)

builds a sparse grid without any boundaries from a sparse grid with boundaries.

In addition the coefficient vector is also created and initialized for the inner grid.

Parameters
BoundaryGridthe boundary grid whose inner should be extracted
BoundaryCoefsthe boundary's grid coefficients
InnerGridPointer to the inner grid, initialized in this method
InnerCoefsPointer to the inner grid's coefficients, initialized in this mehtod

References sgpp::base::DataVector::get(), sgpp::base::Grid::getAlgorithmicDimensions(), sgpp::base::Grid::getBoundingBox(), sgpp::base::HashGridStorage::getNumberOfInnerPoints(), sgpp::base::HashGridStorage::getSize(), sgpp::base::Grid::getStorage(), sgpp::base::Grid::getStretching(), sgpp::base::Grid::getType(), python.statsfileInfo::i, sgpp::base::HashGridPoint::isInnerPoint(), sgpp::base::LinearBoundary, sgpp::base::LinearL0Boundary, sgpp::base::LinearStretchedBoundary, and sgpp::base::Grid::setAlgorithmicDimensions().

◆ calcInnerCoefs()

void sgpp::base::DirichletGridConverter::calcInnerCoefs ( DataVector BoundaryCoefs,
DataVector InnerCoefs 
)

copies the boundary grid's inner coefficients to the inner grid coefficients

Here a very check, due to performance issues, is implemented to sync both vectors by checking the size of both vectors. It must match to the creation size determined in buildInnerGridWithCoefs.

Parameters
BoundaryCoefsthe boundary grid's coefficients
InnerCoefsthe inner grid's coefficients

References sgpp::base::DataVector::get(), python.statsfileInfo::i, and sgpp::base::DataVector::set().

Referenced by sgpp::pde::HeatEquationParabolicPDESolverSystemParallelOMP::generateRHS(), sgpp::pde::OperationEllipticPDESolverSystemDirichlet::generateRHS(), sgpp::pde::OperationParabolicPDESolverSystemDirichlet::generateRHS(), and sgpp::pde::OperationParabolicPDESolverSystemDirichlet::getGridCoefficientsForCG().

◆ rebuildInnerGridWithCoefs()

void sgpp::base::DirichletGridConverter::rebuildInnerGridWithCoefs ( Grid BoundaryGrid,
DataVector BoundaryCoefs,
Grid **  InnerGrid,
DataVector **  InnerCoefs 
)

rebuilds a sparse grid without any boundaries from a sparse grid with boundaries.

In addition the coefficient vector is also created and initialized for the inner grid.

Parameters
BoundaryGridthe boundary grid whose inner should be extracted
BoundaryCoefsthe boundary's grid coefficients
InnerGridPointer to the inner grid, initialized in this method
InnerCoefsPointer to the inner grid's coefficients, initialized in this mehtod

References sgpp::base::DataVector::get(), sgpp::base::Grid::getAlgorithmicDimensions(), sgpp::base::HashGridStorage::getNumberOfInnerPoints(), sgpp::base::HashGridStorage::getSize(), sgpp::base::Grid::getStorage(), sgpp::base::Grid::getType(), python.statsfileInfo::i, sgpp::base::HashGridPoint::isInnerPoint(), sgpp::base::LinearBoundary, sgpp::base::LinearL0Boundary, and sgpp::base::LinearStretchedBoundary.

◆ updateBoundaryCoefs()

void sgpp::base::DirichletGridConverter::updateBoundaryCoefs ( DataVector BoundaryCoefs,
DataVector InnerCoefs 
)

copies the inner grid's coefficients to the identical (inner) ansatzfunctions in the boundary grid.

Here a very check, due to performance issues, is implemented to sync both vectors by checking the size of both vectors. It must match to the creation size determined in buildInnerGridWithCoefs.

Parameters
BoundaryCoefsthe boundary grid's coefficients
InnerCoefsthe inner grid's coefficients

References sgpp::base::DataVector::get(), python.statsfileInfo::i, and sgpp::base::DataVector::set().

Referenced by sgpp::pde::HeatEquationParabolicPDESolverSystem::finishTimestep(), sgpp::pde::HeatEquationParabolicPDESolverSystemParallelOMP::finishTimestep(), and sgpp::pde::OperationEllipticPDESolverSystemDirichlet::getSolutionBoundGrid().


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