Commit 86ccc954 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

bug fix main test

parent b23826fc
Pipeline #130259 passed with stages
in 7 minutes and 53 seconds
...@@ -45,26 +45,24 @@ public: ...@@ -45,26 +45,24 @@ public:
MonteCarlo(Level level, int dM, bool onlyFine) : MonteCarlo(Level level, int dM, bool onlyFine) :
level(level), level(level),
onlyFine(onlyFine), onlyFine(onlyFine),
ctr(SampleCounter(dM, parallel)),
pdeSolverCreator(PDESolverCreator()), pdeSolverCreator(PDESolverCreator()),
meshesCreator(MeshesCreator(pdeSolverCreator.GetMeshName()). meshesCreator(MeshesCreator(pdeSolverCreator.GetMeshName()).
WithCommSplit(ctr.commSplit). WithCommSplit(ctr.commSplit).
WithPLevel(level.coarse). WithPLevel(level.coarse).
WithLevel(level.fine)) { WithLevel(level.fine)) {
Init(); Init(dM);
} }
MonteCarlo(Level level, int dM, bool onlyFine, MonteCarlo(Level level, int dM, bool onlyFine,
MeshesCreator meshesCreator, PDESolverCreator pdeCreator) : MeshesCreator meshesCreator, PDESolverCreator pdeCreator) :
level(level), level(level),
ctr(SampleCounter(dM, parallel)),
onlyFine(onlyFine), onlyFine(onlyFine),
pdeSolverCreator(pdeCreator), pdeSolverCreator(pdeCreator),
meshesCreator(meshesCreator) { meshesCreator(meshesCreator) {
Init(); Init(dM);
} }
void Init() { void Init(int dM) {
config.get("MCPlotting", plotting); config.get("MCPlotting", plotting);
config.get("MCVerbose", verbose); config.get("MCVerbose", verbose);
config.get("MCParallel", parallel); config.get("MCParallel", parallel);
...@@ -76,6 +74,8 @@ public: ...@@ -76,6 +74,8 @@ public:
fineId.coarse = false; fineId.coarse = false;
coarseId.level = level; coarseId.level = level;
coarseId.coarse = true; coarseId.coarse = true;
ctr.parallel = parallel;
ctr.UpdateSampleCounter(dM);
} }
~MonteCarlo() { ~MonteCarlo() {
......
...@@ -12,12 +12,13 @@ const ConfigMap defaultEllipticConfigMap = { ...@@ -12,12 +12,13 @@ const ConfigMap defaultEllipticConfigMap = {
{"Experiment", "MLMCExperiment"}, {"Experiment", "MLMCExperiment"},
{"Problem", "StochasticLaplace1D"}, {"Problem", "StochasticLaplace1D"},
{"Model", "LagrangeElliptic"}, {"Model", "LagrangeElliptic"},
{"Functional", "L2"}, {"Quantity", "L2"},
{"degree", "1"}, {"degree", "1"},
{"plevel", "2"}, {"plevel", "2"},
// ----- Multilevel Monte Carlo ----- // ----- Multilevel Monte Carlo -----
{"maxLevel", "7"}, {"maxLevel", "7"},
{"MCParallel", "false"},
{"epsilon", "0.01"}, {"epsilon", "0.01"},
{"mcOnly", "false"}, {"mcOnly", "false"},
{"uniformSampleAmount", "100"}, {"uniformSampleAmount", "100"},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment