From 48bb39245de43a0adcb7205bb33140660ec89257 Mon Sep 17 00:00:00 2001 From: Simon Praetorius <simon.praetorius@tu-dresden.de> Date: Thu, 19 Jul 2018 14:58:22 +0200 Subject: [PATCH] Cached type of ProblemStat::getSolutionVector() from shared_ptr to reference --- examples/stokes0.cc | 4 ++-- examples/stokes1.cc | 4 ++-- examples/vecellipt.cc | 4 ++-- src/amdis/ProblemInstat.inc.hpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/stokes0.cc b/examples/stokes0.cc index fbcc5fb8..7118684a 100644 --- a/examples/stokes0.cc +++ b/examples/stokes0.cc @@ -78,8 +78,8 @@ int main(int argc, char** argv) // write matrix to file mtl::io::matrix_market_ostream out("matrix_stokes0.mtx"); - out << prob.getSystemMatrix()->getMatrix(); - std::cout << prob.getSystemMatrix()->getMatrix() << '\n'; + out << prob.getSystemMatrix().getMatrix(); + std::cout << prob.getSystemMatrix().getMatrix() << '\n'; prob.solve(adaptInfo); diff --git a/examples/stokes1.cc b/examples/stokes1.cc index cd62b4cd..e0effcce 100644 --- a/examples/stokes1.cc +++ b/examples/stokes1.cc @@ -79,8 +79,8 @@ int main(int argc, char** argv) // write matrix to file mtl::io::matrix_market_ostream out("matrix_stokes1.mtx"); - out << prob.getSystemMatrix()->getMatrix(); - std::cout << prob.getSystemMatrix()->getMatrix() << '\n'; + out << prob.getSystemMatrix().getMatrix(); + std::cout << prob.getSystemMatrix().getMatrix() << '\n'; prob.solve(adaptInfo); diff --git a/examples/vecellipt.cc b/examples/vecellipt.cc index 8ea86360..e87f870d 100644 --- a/examples/vecellipt.cc +++ b/examples/vecellipt.cc @@ -41,9 +41,9 @@ int main(int argc, char** argv) // write matrix to file if (Parameters::get<int>("elliptMesh->global refinements").value_or(0) < 4) { mtl::io::matrix_market_ostream out("matrix.mtx"); - out << prob.getSystemMatrix()->getMatrix(); + out << prob.getSystemMatrix().getMatrix(); - std::cout << prob.getSystemMatrix()->getMatrix() << '\n'; + std::cout << prob.getSystemMatrix().getMatrix() << '\n'; } prob.solve(adaptInfo); diff --git a/src/amdis/ProblemInstat.inc.hpp b/src/amdis/ProblemInstat.inc.hpp index 47c2d4f9..e6ee9c7f 100644 --- a/src/amdis/ProblemInstat.inc.hpp +++ b/src/amdis/ProblemInstat.inc.hpp @@ -53,7 +53,7 @@ template <class Traits> void ProblemInstat<Traits>::initTimestep(AdaptInfo&) { if (oldSolution) - oldSolution->copy(*problemStat.getSolutionVector()); + oldSolution->copy(problemStat.getSolutionVector()); } } // end namespace AMDiS -- GitLab