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.

## ◆ DirichletGridConverter()

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

Constructor.

## ◆ ~DirichletGridConverter()

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

Destructor.

## ◆ 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
 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

## ◆ 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
 BoundaryCoefs the boundary grid's coefficients InnerCoefs the inner grid's coefficients

## ◆ 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
 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

## ◆ 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
 BoundaryCoefs the boundary grid's coefficients InnerCoefs the inner grid's coefficients

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