diff --git a/src/amdis/ProblemInstat.hpp b/src/amdis/ProblemInstat.hpp index 1525044c056ec6009df6b4fc834395ae204f95fa..fe25972a9f897263d73a8ddb0fda49fa822b41c8 100644 --- a/src/amdis/ProblemInstat.hpp +++ b/src/amdis/ProblemInstat.hpp @@ -53,28 +53,20 @@ namespace AMDiS ProblemType& problemStat() { return *problemStat_; } ProblemType const& problemStat() const { return *problemStat_; } - /// Returns \ref oldSolution. + /// Returns const-ref of \ref oldSolution. SystemVector const& oldSolutionVector() const { - test_exit_dbg(oldSolution_, + test_exit_dbg(bool(oldSolution_), "OldSolution need to be created. Call initialize with INIT_UH_OLD."); return *oldSolution_; } - /// Return a mutable view to a oldSolution component - template <class TreePath = RootTreePath> - auto oldSolution(TreePath path = {}) - { - auto&& tp = makeTreePath(path); - return makeDOFVectorView(oldSolutionVector(), tp); - } - /// Return a const view to a oldSolution component template <class TreePath = RootTreePath> auto oldSolution(TreePath path = {}) const { auto&& tp = makeTreePath(path); - return makeDOFVectorView(oldSolutionVector(), tp); + return makeDiscreteFunction(oldSolutionVector(), tp); } /// Implementation of \ref ProblemTimeInterface::transferInitialSolution(). diff --git a/src/amdis/ProblemInstat.inc.hpp b/src/amdis/ProblemInstat.inc.hpp index ee125d4ddce029acfd1ddbba9c68bfcfa226a416..1b3a29dd5d057805ede3ac8e5eb8ef58dc76ea1c 100644 --- a/src/amdis/ProblemInstat.inc.hpp +++ b/src/amdis/ProblemInstat.inc.hpp @@ -45,7 +45,7 @@ void ProblemInstat<Traits>::createUhOld() if (oldSolution_) warning("oldSolution already created\n"); else // create oldSolution - oldSolution_.reset(new SystemVector(problemStat_->globalBasis())); + oldSolution_.reset(new SystemVector(problemStat_->globalBasis(), INTERPOLATE)); }