LoAdSG
matrix.h
1//
2// Created by scherner on 01.03.21.
3//
4
5#ifndef GRUN_MATRIX_H
6#define GRUN_MATRIX_H
7
8//#include "prewavelet_matrix.h"
9#include "../sgrid/depth.h"
10#include "../sgrid/sparseGrid.h"
11
12class PrewaveletMatrixHomogen {
13public:
14 PrewaveletMatrixHomogen(int size_, Depth T_, AdaptiveSparseGrid_Base *grid_);
15
16 ~PrewaveletMatrixHomogen();
17
18 static int convert(int i, int j, int I);
19
20 void create(IndexDimension StartIndex, int dir);
21
22 void solve(double *x, double *b);
23
24
25 void createLR();
26
27 void print();
28
29
30protected:
31 double *M;
32 double *R;
33 double *L;
34 bool LRcreated;
35 bool Mcreated;
36 int size;
37 int size_R;
39
40 Depth T;
41 int k;
42};
43
44
45class PrewaveletMatrixInhomogen {
46public:
47 PrewaveletMatrixInhomogen(int size_, Depth T_, AdaptiveSparseGrid_Base *grid_);
48
49 ~PrewaveletMatrixInhomogen();
50
51 static int convert(int i, int j, int I);
52
53 void create(IndexDimension StartIndex, int dir);
54
55 void solve(double *x, double *b);
56
57
58 void createLR();
59
60 void print();
61
62 void printL();
63
64
65protected:
66 double *M;
67 double *R;
68 double *L;
69 bool LRcreated;
70 bool Mcreated;
71 int size;
72 int size_R;
74
75 Depth T;
76 int k;
77};
78
79
80#endif //GRUN_MATRIX_H
Definition sparseGrid.h:86