5#ifndef GRUN_MATRIXVECTORMULTIPLICATIONPREWAVELETS_H
6#define GRUN_MATRIXVECTORMULTIPLICATIONPREWAVELETS_H
8#include "../../indices/index.h"
9#include "../../sgrid/depth.h"
11#include "../../extemp/vector.h"
12#include "../../extemp/multilevelvector.h"
13#include "../../sgrid/multilevelSparseGrid.h"
14#include "../../mympi.h"
17#include "../../sgoperation/matrix.h"
18#include "../../BasisTransformations/BasisTransformations_inhomog.h"
19#include "../../BasisTransformations/BasisTransformations.h"
25 CasesIterator() { snum = 0; }
27 inline bool goon() {
return (snum < pow(2, DimensionSparseGrid)); }
29 inline void operator++() {
34 inline bool *getcase() {
35 static bool cases[DimensionSparseGrid];
38 for (
int i = 0; i < DimensionSparseGrid; ++i) cases[i] =
false;
40 for (
int i = 0; i < DimensionSparseGrid; ++i) {
44 if ((snum & (1 << i)) != 0) {
52 bool *getcase(
int snum_);
54 int getCaseNumber() {
return snum; };
81void MatrixVectorPrewavelet(VectorSparseG &prew, VectorSparseG &Ax, StencilType type, MultiLevelVector &gM);
89void MatrixVector_Case(VectorSparseG &prew, VectorSparseG &u, VectorSparseG &Ax, StencilType type,
bool *restrictions,
91 MultiLevelVector &nodal);
93void ApplyStencil(VectorSparseG &x, VectorSparseG &Ax, Depth &T, StencilType type);
95double CalcStencilValue(IndexDimension Index, Depth &T, VectorSparseG &u, StencilType type);
98IndexDimension GetStencilValueIndex(IndexDimension Index,
MultiDimCompass mc,
double *stencilvalue, Depth T,
int dir,
102void restriction(VectorSparseG &fine, VectorSparseG &coarse,
int t,
int d);
104void ConvertToPrewavelet(VectorSparseG &Ax_hier, VectorSparseG &Ax, Depth &T,
SubgridFixedDepth &subgrid);
106void ConvertToPrewavelet2(VectorSparseG &Ax_hier, VectorSparseG &Ax, Depth &T);
108void ConvertDualNodalToPrewavelet(VectorSparseG &Ax_hier, VectorSparseG &Ax, Depth &T);
110void MatrixVectorPrewavelet_inhomog(VectorSparseG &prew, VectorSparseG &Ax, StencilType type, MultiLevelVector &gM);
112void test_neumann(VectorSparseG &prew, VectorSparseG &Ax, StencilType type,
bool *restrictions, MultiLevelVector &gM);
117 Stencil(Depth T_, StencilType type_);
128void ApplyStencil_inhomog(VectorSparseG &x, VectorSparseG &Ax, Depth &T, StencilType type);
130double CalcStencilValue_Boundary(IndexDimension Index, Depth &T, VectorSparseG &u, StencilType type, Stencil stencil);
133GetStencilValueIndex_Boundary(IndexDimension Index,
MultiDimCompass mc,
double *stencilvalue, Depth T,
int dir,
140bool getNextIndex(IndexDimension Index,
MultiDimCompass mc, Depth T, IndexDimension &NextIndex );
142void restriction_neumann(VectorSparseG &fine, VectorSparseG &coarse,
int t,
int d);
144void ConvertToNeumannPrewavelet(VectorSparseG &Ax_hier, VectorSparseG &Ax, Depth &T);
150void ApplyStencil(VectorSparseG &x, VectorSparseG &Ax, StencilType type);
152void restriction_local(VectorSparseG &fine, VectorSparseG &coarse, Depth Tfine, Depth Tcoarse);
154void matrixmult_prew_fullgrid(VectorSparseG &x, VectorSparseG &Ax, StencilType type);
Definition ListOfDepthOrderedGrids.h:115
Definition ListOfDepthOrderedGrids.h:31