IStochasticTransportAssemble.hpp 1.44 KB
Newer Older
1
2
3
#ifndef ISTOCHASTICTRANSPORTASSEMBLE_HPP
#define ISTOCHASTICTRANSPORTASSEMBLE_HPP

niklas.baumgarten's avatar
niklas.baumgarten committed
4
#include "Assemble.hpp"
niklas.baumgarten's avatar
niklas.baumgarten committed
5
#include "Plot.hpp"
niklas.baumgarten's avatar
niklas.baumgarten committed
6
#include "Elements.hpp"
niklas.baumgarten's avatar
niklas.baumgarten committed
7
#include "discretization/IDiscretization.hpp"
niklas.baumgarten's avatar
niklas.baumgarten committed
8
#include "problems/StochasticTransportProblem.hpp"
niklas.baumgarten's avatar
niklas.baumgarten committed
9
#include "TimeSeries.hpp"
10
11


12
13
typedef std::pair<double, double> RatePair;

niklas.baumgarten's avatar
niklas.baumgarten committed
14
class IStochasticLinearTransportAssemble : public ILinearTimeAssemble {
15
protected:
niklas.baumgarten's avatar
niklas.baumgarten committed
16
  InfoEntries entries;
17

niklas.baumgarten's avatar
niklas.baumgarten committed
18
  IStochasticTransportProblem *problem;
19
20

public:
niklas.baumgarten's avatar
niklas.baumgarten committed
21
  explicit IStochasticLinearTransportAssemble(IStochasticTransportProblem *problem) :
22
    ILinearTimeAssemble(),
niklas.baumgarten's avatar
niklas.baumgarten committed
23
24
    problem(problem) {
  };
25

niklas.baumgarten's avatar
niklas.baumgarten committed
26
27
28
  void DrawSample(const SampleID &id) {
    problem->DrawSample(id);
  }
29

niklas.baumgarten's avatar
niklas.baumgarten committed
30
31
32
  IStochasticTransportProblem *GetProblem() {
    return problem;
  };
33

34
35
36
37
  void SetTimeSeries(const Vector &u) {
    timeSeries = TimeSeries(problem->GetStartTime(), problem->GetEndTime(),
                            problem->GetStepSize(u.GetMesh().MaxMeshWidth()),
                            "UniformTimeSeries");
niklas.baumgarten's avatar
niklas.baumgarten committed
38
  }
39

niklas.baumgarten's avatar
niklas.baumgarten committed
40
  virtual IDiscretization *GetDisc() = 0;
niklas.baumgarten's avatar
niklas.baumgarten committed
41

niklas.baumgarten's avatar
niklas.baumgarten committed
42
  virtual ~IStochasticLinearTransportAssemble() = default;
43

niklas.baumgarten's avatar
niklas.baumgarten committed
44
  virtual double Energy(const Vector &u) const = 0;
45

niklas.baumgarten's avatar
niklas.baumgarten committed
46
  virtual double Mass(const Vector &u) const = 0;
47

niklas.baumgarten's avatar
niklas.baumgarten committed
48
  virtual double Error(double t, const Vector &u) const = 0;
49

niklas.baumgarten's avatar
niklas.baumgarten committed
50
  virtual RatePair InflowOutflow(const Vector &u) const = 0;
51
52
};

niklas.baumgarten's avatar
niklas.baumgarten committed
53
54
55
class IStochasticNonLinearTransportAssemble : public INonLinearTimeAssemble {
};

56
#endif //ISTOCHASTICTRANSPORTASSEMBLE_HPP