Commit 51f769a1 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

temp new strucutre

parent 2dd48084
......@@ -12,7 +12,28 @@ void MonteCarlo::Method() {
mout.EndBlock(verbose == 0);
}
void MonteCarlo::init() {
// SampleID coarseId;
// SampleID fineId;
// SampleSolution coarseSolution(*solMGraphs, level.mGcoarse);
// SampleSolution fineSolution(*solMGraphs, level.mGfine);
// fineId.level = level;
// fineId.coarse = false;
// coarseId.level = level;
// coarseId.coarse = true;
}
void MonteCarlo::method() {
SampleID coarseId;
SampleID fineId;
SampleSolution coarseSolution(*solMGraphs, level.mGcoarse);
SampleSolution fineSolution(*solMGraphs, level.mGfine);
fineId.level = level;
fineId.coarse = false;
coarseId.level = level;
coarseId.coarse = true;
for (int m = ctr.M; m < ctr.M + ctr.dM; m++) {
computeSampleSolution(m, fineId, fineSolution);
if (onlyFine) coarseSolution.Init();
......
......@@ -12,6 +12,8 @@ protected:
int plotting = 0;
int verbose = 1;
void init();
void method();
void computeSampleSolution(int m, SampleID &id, SampleSolution &solution);
......@@ -29,26 +31,23 @@ public:
PDESolver *pdeSolver;
MatrixGraphs *solMGraphs;
SampleID coarseId;
SampleID fineId;
SampleSolution coarseSolution;
SampleSolution fineSolution;
MonteCarlo(Level level, int dM, bool onlyFine,
MatrixGraphs *solMGraphs, PDESolver *pdeSolver) :
level(level), onlyFine(onlyFine),
solMGraphs(solMGraphs), pdeSolver(pdeSolver),
coarseSolution(SampleSolution(*solMGraphs, level.mGcoarse)),
fineSolution(SampleSolution(*solMGraphs, level.mGfine)) {
solMGraphs(solMGraphs), pdeSolver(pdeSolver) {
// coarseSolution(SampleSolution(*solMGraphs, level.mGcoarse)),
// fineSolution(SampleSolution(*solMGraphs, level.mGfine)) {
config.get("MCPlotting", plotting);
config.get("MCVerbose", verbose);
ctr.dM = dM;
fineId.level = level;
fineId.coarse = false;
coarseId.level = level;
coarseId.coarse = true;
// fineId.level = level;
// fineId.coarse = false;
// coarseId.level = level;
// coarseId.coarse = true;
}
void Method();
......
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