Commit 675d50d7 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

cleaning logging

parent a1c6a3ec
......@@ -2,44 +2,42 @@
void MonteCarlo::Method() {
mout.StartBlock("MC Method l=" + to_string(level.fine));
vout(1) << aggregate;
vout(1) << "Run" << endl;
method();
aggregate.UpdateParallel();
vout(1) << aggregate;
// sums.UpdateParallel(ctr);
vout(2) << sums;
avgs.Update(sums, aggregate.M);
vout(1) << avgs;
vars.Update(avgs);
vout(1) << vars;
kurtosis.Update(avgs, vars);
vout(2) << kurtosis;
mout.EndBlock(verbose == 0);
mout.StartBlock("MonteCarlo l=" + to_string(level.fine));
vout(1) << "Start with: " << aggregate;
method();
aggregate.UpdateParallel();
// sums.UpdateParallel(ctr);
vout(2) << sums;
avgs.Update(sums, aggregate.M);
vars.Update(avgs);
kurtosis.Update(avgs, vars);
aggregate.MeanQ = avgs.Q;
aggregate.SVarQ = vars.Q;
aggregate.MeanY = avgs.Y;
aggregate.SVarY = vars.Y;
vout(1) << "End with: " << aggregate;
mout.EndBlock(verbose == 0, "Took");
}
void MonteCarlo::method() {
SampleSolution coarseSolution(pdeSolver->GetDisc(), coarseId);
SampleSolution fineSolution(pdeSolver->GetDisc(), fineId);
while(aggregate.dMcomm != 0) {
computeSampleSolution(aggregate.index(), fineId, fineSolution);
if (onlyFine) coarseSolution.Init();
else computeSampleSolution(aggregate.index(), coarseId, coarseSolution);
sums.Update(fineSolution, coarseSolution);
vout(3) << sums;
aggregate.Update(fineSolution, coarseSolution);
}
SampleSolution coarseSolution(pdeSolver->GetDisc(), coarseId);
SampleSolution fineSolution(pdeSolver->GetDisc(), fineId);
while (aggregate.dMcomm != 0) {
computeSampleSolution(aggregate.index(), fineId, fineSolution);
if (onlyFine) coarseSolution.Init();
else computeSampleSolution(aggregate.index(), coarseId, coarseSolution);
sums.Update(fineSolution, coarseSolution);
vout(3) << sums;
aggregate.Update(fineSolution, coarseSolution);
}
}
void MonteCarlo::computeSampleSolution(int m, SampleID &id, SampleSolution &solution) {
id.number = m;
solution.id = id;
pdeSolver->DrawSample(id);
pdeSolver->Run(solution);
id.number = m;
solution.id = id;
pdeSolver->DrawSample(id);
pdeSolver->Run(solution);
}
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