Commit 4f466200 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

Newton method gets constructed after the initialisation of the model. This...

Newton method gets constructed after the initialisation of the model. This assures that the solution vector already has a meaningful size.

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@4550 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 010c38d1
......@@ -95,7 +95,6 @@ public:
}
model_ = new Model();
newtonMethod_ = new NewtonMethod(asImp_());
}
~BoxProblem()
......@@ -115,6 +114,7 @@ public:
{
// set the initial condition of the model
model().init(asImp_());
newtonMethod_ = new NewtonMethod(asImp_());
}
/*!
......
......@@ -87,7 +87,7 @@ public:
}
curWriter_ = new VtkWriter(gridView);
curWriter_ = new VtkWriter(gridView, Dune::VTKOptions::conforming);
++writerNum_;
curTime_ = t;
......
......@@ -61,7 +61,6 @@ class NewtonMethod
public:
NewtonMethod(Problem &problem)
: uOld_(problem.model().curSol()),
residual_(problem.model().curSol()),
problem_(problem)
{ }
......@@ -182,7 +181,6 @@ protected:
private:
SolutionVector uOld_;
SolutionVector residual_;
Problem &problem_;
};
......
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