SG++-Doxygen-Documentation
|
Implements the upGradient Method needed for the Laplace operator on prewavelet grids. More...
#include <LaplaceUpGradientPrewavelet.hpp>
Public Member Functions | |
LaplaceUpGradientPrewavelet (sgpp::base::GridStorage *storage) | |
Constructor. More... | |
void | operator() (sgpp::base::DataVector &source, sgpp::base::DataVector &result, grid_iterator &index, size_t dim) |
This operations performs the calculation of upGradient in the direction of dimension dim More... | |
~LaplaceUpGradientPrewavelet () | |
Destructor. More... | |
Protected Types | |
typedef sgpp::base::GridStorage::grid_iterator | grid_iterator |
Protected Attributes | |
sgpp::base::GridStorage * | storage |
Pointer to sgpp::base::GridStorage object. More... | |
Implements the upGradient Method needed for the Laplace operator on prewavelet grids.
The calculation is done iterative and utilizes the following temp variables:
\[ t_{k,j}=-\frac{6}{10}u_{k,j\pm1}+t_{k+1,2j}\qquad(k,j)\notin G_{n}^{1} \]
The correct values are then calculated as follows:
\begin{eqnarray*} r_{k,j}&=&\frac{1}{h_{k}}\left(2t_{k+1,2j}-t_{k+1,2(j\pm1)}\right)\\&&-\frac{6}{10}\frac{1}{h_{k}}\left(-t_{k+1,2(j\pm2)}+2t_{k+1,2(j\pm1)}-2t_{k+1,2j}\right)\\&&+\frac{1}{10}\frac{1}{h_{k}}\left(-t_{k+1,2(j\pm1)}+2t_{k+1,2(j\pm2)}-t_{k+1,2(j\pm2)}\right) \end{eqnarray*}
In case of borders:
\begin{eqnarray*} r_{k,j}&=&\frac{9}{10}\frac{1}{h_{k}}\left(2t_{k+1,2j}-t_{k+1,2(j\pm1)}\right)\\&&-\frac{6}{10}\frac{1}{h_{k}}\left(-t_{k+1,2(j\pm2)}+2t_{k+1,2(j\pm1)}-t_{k+1,2j}\right)\\&&+\frac{1}{10}\frac{1}{h_{k}}\left(-t_{k+1,2(j\pm1)}+2t_{k+1,2(j\pm2)}-t_{k+1,2(j\pm2)}\right) \end{eqnarray*}
Please note, that all values of gridpoints outside of the sparse grid are treated as 0. The following picture depicts all involved grid points and temp values in order to calculate a specific point:
between grid points (green). The gray line indicates the support of the prewavelet."
|
protected |
|
explicit |
Constructor.
storage | the grid's sgpp::base::GridStorage object |
sgpp::pde::LaplaceUpGradientPrewavelet::~LaplaceUpGradientPrewavelet | ( | ) |
Destructor.
void sgpp::pde::LaplaceUpGradientPrewavelet::operator() | ( | sgpp::base::DataVector & | source, |
sgpp::base::DataVector & | result, | ||
grid_iterator & | index, | ||
size_t | dim | ||
) |
This operations performs the calculation of upGradient in the direction of dimension dim
source | sgpp::base::DataVector that contains the gridpoint's coefficients (values from the vector of the laplace operation) |
result | sgpp::base::DataVector that contains the result of the down operation |
index | a iterator object of the grid |
dim | current fixed dimension of the 'execution direction' |
References sgpp::base::HashGridIterator::get(), sgpp::base::HashGridIterator::getGridDepth(), h, python.statsfileInfo::i, sgpp::base::HashGridStorage::isInvalidSequenceNumber(), sgpp::base::HashGridIterator::seq(), sgpp::base::HashGridIterator::set(), and storage.
|
protected |
Pointer to sgpp::base::GridStorage object.
Referenced by operator()().