From b8990cfa6d64e375ea79ddf18a41dae2ea81db8e Mon Sep 17 00:00:00 2001
From: Oliver Sander <oliver.sander@tu-dresden.de>
Date: Thu, 21 Jan 2021 14:39:17 +0100
Subject: [PATCH] Make FEAssembler store a const reference of the basis

... rather than a copy.  This allows to assemble with bases
that are not copyable, as for example the RaviartThomasBasis

See https://gitlab.dune-project.org/staging/dune-functions/-/issues/58
---
 CHANGELOG.md                              | 3 +++
 dune/elasticity/assemblers/feassembler.hh | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 23d7579..f893330 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,9 @@
 - Introduce class `LocalIntegralEnergy` to work with the densities
 - Local energies and FE assemblers use now `dune-functions` power bases instead of scalar `dune-fufem` bases; the key element is the `LocalView` which contains the information for each element
 - Introduce class `LocalHyperDualStiffness` and `hyperdual` to calculate gradient and hessian using hyper-dual numbers
+- The class `FEAssembler` now stores a `const` reference to the basis, rather than a value.
+  This allows to use the assembler with bases that are not copyable
+  (as, e.g., the `RaviartThomasBasis`, see [dune-functions issue 58](https://gitlab.dune-project.org/staging/dune-functions/-/issues/58)).
 
 ## Deprecations and removals
 
diff --git a/dune/elasticity/assemblers/feassembler.hh b/dune/elasticity/assemblers/feassembler.hh
index 73ee296..43a50ac 100644
--- a/dune/elasticity/assemblers/feassembler.hh
+++ b/dune/elasticity/assemblers/feassembler.hh
@@ -33,7 +33,7 @@ class FEAssembler {
 
 public:
 
-    const Basis basis_;
+    const Basis& basis_;
 
     /** \brief Partition type on which to assemble
      *
-- 
GitLab