TestPDESolver.cpp 2.01 KB
Newer Older
niklas.baumgarten's avatar
niklas.baumgarten committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#include "montecarlo/PDESolver.hpp"

#include "assemble/IStochasticEllipticAssemble.hpp"
#include "assemble/LagrangeEllipticAssemble.hpp"
#include "assemble/MixedEllipticAssemble.hpp"
#include "assemble/HybridEllipticAssemble.hpp"
#include "assemble/DGEllipticAssemble.hpp"

#include "TestEnvironment.hpp"

typedef std::vector<std::vector<double>> MeshPoints;

typedef std::vector<std::vector<int>> MeshCells;

typedef std::vector<std::vector<int>> MeshFaces;

static MeshPoints pointsInt{{0.0}, {1.0}};

static MeshPoints pointsQuad{{0.0, 0.0}, {1, 0, 0.0}, {1.0, 1.0}, {0.0, 1, 0}};

static MeshCells cellsInt{{2, 1, 0, 1}};

static MeshCells cellsQuad{{4, 1, 0, 1, 2, 3}};

static MeshFaces facesInt{{1, 1, 0}, {1, 1, 1}};

static MeshFaces facesQuad{{2, 1, 0, 1}, {2, 1, 1, 2}, {2, 1, 2, 3}, {2, 1, 3, 0}};


class TestPDESolver : public Test {
protected:
    IDiscretization *disc;
    PDESolver *pdeSolver;

    void SetUp() override {
        // Todo
    }

    void TearDown() override {
        // Todo
    }
};

class TestEllipticPDESolver : public TestPDESolver {
protected:
    IStochasticEllipticProblem *problem;
    IStochasticEllipticAssemble *assemble;

    void SetUp() override {
        // Todo
    }

    void InitLagrangeTest() {
        Meshes meshes(pointsQuad, cellsQuad, facesQuad, 0, 0);
        disc = new LagrangeDiscretization(meshes, 1);
        problem = new StochasticLaplace1D(meshes);
        assemble = new LagrangeEllipticAssemble(disc, problem);
        pdeSolver = new EllipticPDESolver(assemble);
    }

    void TearDown() override {
        // Todo
    }
};



class TestTransportPDESolver : public TestPDESolver {
    void SetUp() override {
        // Todo
    }

    void TearDown() override {
        // Todo
    }
};



TEST_F(TestEllipticPDESolver, TestLagrangeDiscretization) {
//    SampleSolution solution();
//    pdeSolver->Run(solution);
}

int main(int argc, char **argv) {
    MppTest mppTest = MppTestBuilder(argc, argv).WithPPM().
        WithScreenLogging();
    return mppTest.RUN_ALL_MPP_TESTS();
}