From 58c6869e39b8e9749d3ad7ee3ee8c059e0d9544b Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Wed, 16 May 2012 15:32:18 +0200
Subject: [PATCH] Typedef: dataptr

---
 dune/tectonic/globallaursennonlinearity.hh | 15 ++++++-----
 dune/tectonic/globalruinanonlinearity.hh   | 31 ++++++++++------------
 2 files changed, 22 insertions(+), 24 deletions(-)

diff --git a/dune/tectonic/globallaursennonlinearity.hh b/dune/tectonic/globallaursennonlinearity.hh
index 932c6152..b903d18a 100644
--- a/dune/tectonic/globallaursennonlinearity.hh
+++ b/dune/tectonic/globallaursennonlinearity.hh
@@ -16,13 +16,14 @@ namespace Dune {
 template <class OuterFunctionType, class VectorType, class MatrixType>
 class GlobalLaursenNonlinearity
     : public GlobalNonlinearity<VectorType, MatrixType> {
+private:
+  typedef shared_ptr<BlockVector<FieldVector<double, 1>> const> dataptr;
+
 public:
   using GlobalNonlinearity<VectorType, MatrixType>::dim;
 
-  GlobalLaursenNonlinearity(
-      shared_ptr<BlockVector<FieldVector<double, 1>> const> mu,
-      shared_ptr<BlockVector<FieldVector<double, 1>> const> normalStress,
-      shared_ptr<BlockVector<FieldVector<double, 1>> const> nodalIntegrals)
+  GlobalLaursenNonlinearity(dataptr mu, dataptr normalStress,
+                            dataptr nodalIntegrals)
       : mu(mu),
         normalStress(normalStress),
         nodalIntegrals(nodalIntegrals),
@@ -64,9 +65,9 @@ class GlobalLaursenNonlinearity
 private:
   shared_ptr<LocalNonlinearity<dim> const> const trivialNonlinearity;
 
-  shared_ptr<BlockVector<FieldVector<double, 1>> const> mu;
-  shared_ptr<BlockVector<FieldVector<double, 1>> const> normalStress;
-  shared_ptr<BlockVector<FieldVector<double, 1>> const> nodalIntegrals;
+  dataptr mu;
+  dataptr normalStress;
+  dataptr nodalIntegrals;
 
   std::vector<shared_ptr<LocalNonlinearity<dim> const>> mutable restrictions;
 };
diff --git a/dune/tectonic/globalruinanonlinearity.hh b/dune/tectonic/globalruinanonlinearity.hh
index 4787a4a0..c1eaf3c2 100644
--- a/dune/tectonic/globalruinanonlinearity.hh
+++ b/dune/tectonic/globalruinanonlinearity.hh
@@ -17,18 +17,15 @@ namespace Dune {
 template <class VectorType, class MatrixType>
 class GlobalRuinaNonlinearity
     : public GlobalNonlinearity<VectorType, MatrixType> {
+private:
+  typedef shared_ptr<BlockVector<FieldVector<double, 1>> const> dataptr;
+
 public:
   using GlobalNonlinearity<VectorType, MatrixType>::dim;
 
-  GlobalRuinaNonlinearity(
-      shared_ptr<BlockVector<FieldVector<double, 1>> const> nodalIntegrals,
-      shared_ptr<BlockVector<FieldVector<double, 1>> const> a,
-      shared_ptr<BlockVector<FieldVector<double, 1>> const> mu,
-      shared_ptr<BlockVector<FieldVector<double, 1>> const> eta,
-      shared_ptr<BlockVector<FieldVector<double, 1>> const> normalStress,
-      shared_ptr<BlockVector<FieldVector<double, 1>> const> b,
-      shared_ptr<BlockVector<FieldVector<double, 1>> const> state,
-      shared_ptr<BlockVector<FieldVector<double, 1>> const> L, double h)
+  GlobalRuinaNonlinearity(dataptr nodalIntegrals, dataptr a, dataptr mu,
+                          dataptr eta, dataptr normalStress, dataptr b,
+                          dataptr state, dataptr L, double h)
       : nodalIntegrals(nodalIntegrals),
         a(a),
         mu(mu),
@@ -67,14 +64,14 @@ class GlobalRuinaNonlinearity
 private:
   shared_ptr<LocalNonlinearity<dim> const> const trivialNonlinearity;
 
-  shared_ptr<BlockVector<FieldVector<double, 1>> const> nodalIntegrals;
-  shared_ptr<BlockVector<FieldVector<double, 1>> const> a;
-  shared_ptr<BlockVector<FieldVector<double, 1>> const> mu;
-  shared_ptr<BlockVector<FieldVector<double, 1>> const> eta;
-  shared_ptr<BlockVector<FieldVector<double, 1>> const> normalStress;
-  shared_ptr<BlockVector<FieldVector<double, 1>> const> b;
-  shared_ptr<BlockVector<FieldVector<double, 1>> const> state;
-  shared_ptr<BlockVector<FieldVector<double, 1>> const> L;
+  dataptr nodalIntegrals;
+  dataptr a;
+  dataptr mu;
+  dataptr eta;
+  dataptr normalStress;
+  dataptr b;
+  dataptr state;
+  dataptr L;
   double const h;
 
   std::vector<shared_ptr<LocalNonlinearity<dim> const>> mutable restrictions;
-- 
GitLab