From 67b2b3866fd90a2fb2dc0678c252b89c0f079bb1 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Mon, 3 Jun 2013 11:58:37 +0200 Subject: [PATCH] Get rid of dataref --- dune/tectonic/globalnonlinearity.hh | 6 +++--- dune/tectonic/globalruinanonlinearity.hh | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dune/tectonic/globalnonlinearity.hh b/dune/tectonic/globalnonlinearity.hh index 0e1b71e0..c09e1f0e 100644 --- a/dune/tectonic/globalnonlinearity.hh +++ b/dune/tectonic/globalnonlinearity.hh @@ -14,8 +14,8 @@ namespace Dune { template <class MatrixTypeTEMPLATE, class VectorTypeTEMPLATE> class GlobalNonlinearity { -private: - using dataref = BlockVector<FieldVector<double, 1>> const &; +protected: + using SingletonVectorType = BlockVector<FieldVector<double, 1>>; public: using MatrixType = MatrixTypeTEMPLATE; @@ -78,7 +78,7 @@ class GlobalNonlinearity { return res->regularity(x); } - virtual void updateState(dataref state) = 0; + virtual void updateState(SingletonVectorType const &state) = 0; }; } #endif diff --git a/dune/tectonic/globalruinanonlinearity.hh b/dune/tectonic/globalruinanonlinearity.hh index f57e447c..23c541e2 100644 --- a/dune/tectonic/globalruinanonlinearity.hh +++ b/dune/tectonic/globalruinanonlinearity.hh @@ -18,13 +18,15 @@ template <class MatrixType, class VectorType> class GlobalRuinaNonlinearity : public GlobalNonlinearity<MatrixType, VectorType> { private: - using dataref = BlockVector<FieldVector<double, 1>> const &; + using typename GlobalNonlinearity<MatrixType, + VectorType>::SingletonVectorType; public: using GlobalNonlinearity<MatrixType, VectorType>::dim; GlobalRuinaNonlinearity(Dune::BitSetVector<1> const &frictionalNodes, - dataref nodalIntegrals, FrictionData const &fd) + SingletonVectorType const &nodalIntegrals, + FrictionData const &fd) : restrictions(nodalIntegrals.size()) { auto trivialNonlinearity = make_shared<LocalFriction<dim>>(make_shared<TrivialFunction>()); @@ -37,7 +39,7 @@ class GlobalRuinaNonlinearity } } - void updateState(dataref state) override { + void updateState(SingletonVectorType const &state) override { for (size_t i = 0; i < restrictions.size(); ++i) restrictions[i]->updateState(state[i]); } -- GitLab