Am Montag, 13. Mai 2022, finden Wartungsarbeiten am Gitlab-Server (Update auf neue Version statt). Der Dienst wird daher am Montag für einige Zeit nicht verfügbar sein.
On Monday, May 13th 2022, the Gitlab server will be updated. The service will therefore not be accessible for some time on Monday.

Commit 4f88335b authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

cleanup oldSolution in ProblemInstat, so that it can be used in expressions...

cleanup oldSolution in ProblemInstat, so that it can be used in expressions and allows interpolation during grid changes
parent 138c15d3
......@@ -53,10 +53,18 @@ namespace AMDiS
ProblemType& problemStat() { return *problemStat_; }
ProblemType const& problemStat() const { return *problemStat_; }
/// Returns \ref oldSolution.
/// Returns mutable-ref of \ref oldSolution.
SystemVector& oldSolutionVector()
{
test_exit_dbg(bool(oldSolution_),
"OldSolution need to be created. Call initialize with INIT_UH_OLD.");
return *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_;
}
......@@ -74,7 +82,7 @@ namespace AMDiS
auto oldSolution(TreePath path = {}) const
{
auto&& tp = makeTreePath(path);
return makeDOFVectorView(oldSolutionVector(), tp);
return makeDiscreteFunction(oldSolutionVector(), tp);
}
/// Implementation of \ref ProblemTimeInterface::transferInitialSolution().
......
......@@ -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));
}
......
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