![]()  | 
  
    SG++-Doxygen-Documentation
    
   | 
 
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... | |
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.
| sgpp::base::DirichletGridConverter::DirichletGridConverter | ( | ) | 
Constructor.
| sgpp::base::DirichletGridConverter::~DirichletGridConverter | ( | ) | 
Destructor.
| 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.
| BoundaryGrid | the boundary grid whose inner should be extracted | 
| BoundaryCoefs | the boundary's grid coefficients | 
| InnerGrid | Pointer to the inner grid, initialized in this method | 
| InnerCoefs | Pointer 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().
| 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.
| BoundaryCoefs | the boundary grid's coefficients | 
| InnerCoefs | the 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().
| 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.
| BoundaryGrid | the boundary grid whose inner should be extracted | 
| BoundaryCoefs | the boundary's grid coefficients | 
| InnerGrid | Pointer to the inner grid, initialized in this method | 
| InnerCoefs | Pointer 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.
| 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.
| BoundaryCoefs | the boundary grid's coefficients | 
| InnerCoefs | the 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().