Commit de229bd0 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

rmv unique ptr

parent 3b79f992
......@@ -9,12 +9,12 @@ void MainProgram::Initialize() {
problem = createStochasticProblem();
assemble = createAssemble();
plotter = make_shared<MultilevelPlotter>(*meshes);
mlmc = make_unique<MultilevelMonteCarlo>(initLevels, initSampleAmount,
meshes, assemble);
plotter = new MultilevelPlotter(*meshes);
mlmc = new MultilevelMonteCarlo(initLevels, initSampleAmount, meshes, assemble);
meshes->PrintInfo();
mlmc->PrintInfo();
problem->PrintInfo();
assemble->PrintInfo();
}
......@@ -100,7 +100,7 @@ IDiscretization *MainProgram::createDiscretization() {
IStochasticProblemT<Vector> *MainProgram::createStochasticProblem() {
if (problemName == "StochasticLaplace1D")
return new StochasticLaplace1D(*meshes);
if (problemName =="StochasticLaplace2D")
if (problemName == "StochasticLaplace2D")
return new StochasticLaplace2D(*meshes);
// if (problemName.find("StochasticPollution1D") != string::npos ||
// problemName.find("DeterministicPollution1D") != string::npos)
......
......@@ -37,8 +37,7 @@ public:
IDiscretization *disc;
IStochasticProblemT<Vector> *problem;
IAssemble *assemble;
unique_ptr<MultilevelMonteCarlo> mlmc;
MultilevelMonteCarlo *mlmc;
MainProgram() {
config.get("MainVerbose", verbose);
......@@ -62,6 +61,8 @@ public:
delete disc;
delete problem;
delete assemble;
delete plotter; // Todo manage in another way
delete mlmc;
}
void Initialize();
......
Markdown is supported
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