MonteCarloTransport.h 1.2 KB
Newer Older
1
2
3
4
5
#ifndef MLMC_MONTECARLOTRANSPORT_HPP
#define MLMC_MONTECARLOTRANSPORT_HPP

#include "MonteCarlo.h"
#include "assemble/DGTransportAssemble.h"
niklas.baumgarten's avatar
niklas.baumgarten committed
6
#include "TimeIntegrator.h"
7

8

9
class MonteCarloTransport : public MonteCarlo {
10
private:
niklas.baumgarten's avatar
niklas.baumgarten committed
11
12
    Plot plot;

13
    void solveTransport(int l, double &valueQ, double &cost, Vector &solution);
14

15
16
public:
    DGTransportAssemble *assemble;
17
    TimeSeries timeSeries;
18

niklas.baumgarten's avatar
niklas.baumgarten committed
19
    MatrixGraphs fluxMatrixGraphs;
20
21
    CellMatrixGraphs solMatrixGraphs;

niklas.baumgarten's avatar
niklas.baumgarten committed
22

23
24
25
    Transfer *transfer;

    MonteCarloTransport(int l, int dM, bool baseLevel, Meshes *meshes,
26
27
28
                        StochasticField *stochFields, DGTransportAssemble *assemble) :
        MonteCarlo(l, dM, baseLevel, meshes, stochFields),
        assemble(assemble),
niklas.baumgarten's avatar
niklas.baumgarten committed
29
30
31
        fluxMatrixGraphs(MatrixGraphs(*meshes, dof("cell", 3))),
        solMatrixGraphs(*meshes, *assemble->disc),
        plot(Plot((*meshes)[l], meshes->dim())) {
32

33
34
//        transfer = new MatrixTransfer(*assemble);
//        transfer->Construct((solMatrixGraphs)[l - pLevel], (solMatrixGraphs)[l - pLevel - 1]);
35
36
    }

37
    ~MonteCarloTransport() {
38
39
40
41
        transfer->Destruct();
        delete transfer;
    }

42
    void Method() override;
43
44
45
};

#endif //MLMC_MONTECARLOTRANSPORT_HPP