From 0d828a55d4483f41f88167b913260dd44a4eb621 Mon Sep 17 00:00:00 2001
From: Jonathan Youett <youett@math.fu-berlin.de>
Date: Wed, 25 Mar 2015 16:54:22 +0100
Subject: [PATCH] Store a const pointer for the external forces

---
 dune/elasticity/common/nonlinearelasticityproblem.hh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dune/elasticity/common/nonlinearelasticityproblem.hh b/dune/elasticity/common/nonlinearelasticityproblem.hh
index 7c5e864..921efe4 100644
--- a/dune/elasticity/common/nonlinearelasticityproblem.hh
+++ b/dune/elasticity/common/nonlinearelasticityproblem.hh
@@ -16,7 +16,8 @@ public:
     typedef typename VectorType::field_type field_type;
     typedef std::shared_ptr<BasisGridFunction<Basis,VectorType> > GridFunctionPtr;
 
-                         VectorType& extForces):
+    NonlinearElasticityProblem(MaterialType& material,
+                         const VectorType& extForces):
         material_(Dune::stackobject_to_shared_ptr(material)),
         extForces_(Dune::stackobject_to_shared_ptr(extForces))
     {}
@@ -51,7 +52,7 @@ private:
     //! The involved materials
     std::shared_ptr<MaterialType> material_;
     //! The external forces
-    std::shared_ptr<VectorType> extForces_;
+    std::shared_ptr<const VectorType> extForces_;
 };
 
 #include "nonlinearelasticityproblem.cc"
-- 
GitLab