StochasticProblem.cpp 1.25 KB
Newer Older
1
2
3
4
5
6
7
#include "StochasticProblem.hpp"
#include "stochastics/CirculantEmbedding.hpp"
#include "stochastics/HybridFluxGenerator.hpp"


template<typename Sample>
SampleGenerator<Sample> *IStochasticProblemT<Sample>
8
9
::createGenerator(int l, GeneratorName genName) {
    if (genName == "CirculantEmbedding1D")
10
        return new CirculantEmbedding1D(l, meshes);
11
    if (genName == "CirculantEmbedding2D")
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
        return new CirculantEmbedding2D(l, meshes);
//    if (generatorName == "HybridFluxGenerator1D")
//        return new HybridFluxGenerator1D(l, meshes);
//    if (generatorName == "HybridFluxGenerator2D")
//        return new HybridFluxGenerator2D(l, meshes);
    Exit("Generator not implemented")
}

template<>
SampleGenerator<Vector> *IStochasticProblemT<Vector>
::createGenerator(int l, GeneratorName generatorName) {
    if (generatorName == "CirculantEmbedding1D")
        return new CirculantEmbedding1D(l, meshes);
    if (generatorName == "CirculantEmbedding2D")
        return new CirculantEmbedding2D(l, meshes);
//    if (generatorName == "HybridFluxGenerator1D")
//        return new HybridFluxGenerator1D(l, meshes);
//    if (generatorName == "HybridFluxGenerator2D")
//        return new HybridFluxGenerator2D(l, meshes);
    Exit("Generator not implemented")
}