From e81fece2f6798b73707ee113c6df0961ea03f511 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <github@naumov.de>
Date: Sat, 24 Jun 2017 17:22:15 +0200
Subject: [PATCH] [PL] Remove intermediate LocalAssemblerData.

Use SmallDeformationLocalAssembler directly instead.
---
 .../SmallDeformation/CreateLocalAssemblers.h  |  6 ++---
 .../SmallDeformation/LocalDataInitializer.h   |  8 +++----
 .../SmallDeformation/SmallDeformationFEM.h    | 24 -------------------
 .../SmallDeformationProcess-impl.h            |  4 ++--
 4 files changed, 8 insertions(+), 34 deletions(-)

diff --git a/ProcessLib/SmallDeformation/CreateLocalAssemblers.h b/ProcessLib/SmallDeformation/CreateLocalAssemblers.h
index efeb85943ba..6f048c54b5b 100644
--- a/ProcessLib/SmallDeformation/CreateLocalAssemblers.h
+++ b/ProcessLib/SmallDeformation/CreateLocalAssemblers.h
@@ -23,8 +23,7 @@ namespace SmallDeformation
 namespace detail
 {
 template <unsigned GlobalDim, int DisplacementDim,
-          template <typename, typename, unsigned, int>
-          class LocalAssemblerImplementation,
+          template <typename, typename, int> class LocalAssemblerImplementation,
           typename LocalAssemblerInterface, typename... ExtraCtorArgs>
 void createLocalAssemblers(
     NumLib::LocalToGlobalIndexMap const& dof_table,
@@ -66,8 +65,7 @@ void createLocalAssemblers(
  * Therefore they always have to be provided manually.
  */
 template <int DisplacementDim,
-          template <typename, typename, unsigned, int>
-          class LocalAssemblerImplementation,
+          template <typename, typename, int> class LocalAssemblerImplementation,
           typename LocalAssemblerInterface, typename... ExtraCtorArgs>
 void createLocalAssemblers(
     const unsigned dimension,
diff --git a/ProcessLib/SmallDeformation/LocalDataInitializer.h b/ProcessLib/SmallDeformation/LocalDataInitializer.h
index ee730dce4b7..baefa052d0f 100644
--- a/ProcessLib/SmallDeformation/LocalDataInitializer.h
+++ b/ProcessLib/SmallDeformation/LocalDataInitializer.h
@@ -110,7 +110,8 @@ namespace ProcessLib
 /// For example for MeshLib::Quad a local assembler data with template argument
 /// NumLib::ShapeQuad4 is created.
 template <typename LocalAssemblerInterface,
-          template <typename, typename, unsigned, int> class LocalAssemblerData,
+          template <typename, typename, int>
+          class SmallDeformationLocalAssembler,
           unsigned GlobalDim, int DisplacementDim, typename... ConstructorArgs>
 class LocalDataInitializer final
 {
@@ -245,9 +246,8 @@ private:
         typename ShapeFunction::MeshElement>::IntegrationMethod;
 
     template <typename ShapeFunction>
-    using LAData =
-        LocalAssemblerData<ShapeFunction, IntegrationMethod<ShapeFunction>,
-                           GlobalDim, DisplacementDim>;
+    using LAData = SmallDeformationLocalAssembler<
+        ShapeFunction, IntegrationMethod<ShapeFunction>, DisplacementDim>;
 
     /// A helper forwarding to the correct version of makeLocalAssemblerBuilder
     /// depending whether the global dimension is less than the shape function's
diff --git a/ProcessLib/SmallDeformation/SmallDeformationFEM.h b/ProcessLib/SmallDeformation/SmallDeformationFEM.h
index 3e22ead64f0..1ddad16f816 100644
--- a/ProcessLib/SmallDeformation/SmallDeformationFEM.h
+++ b/ProcessLib/SmallDeformation/SmallDeformationFEM.h
@@ -365,29 +365,5 @@ private:
     bool const _is_axially_symmetric;
 };
 
-template <typename ShapeFunction, typename IntegrationMethod,
-          unsigned GlobalDim, int DisplacementDim>
-class LocalAssemblerData final
-    : public SmallDeformationLocalAssembler<ShapeFunction, IntegrationMethod,
-                                            DisplacementDim>
-{
-public:
-    LocalAssemblerData(LocalAssemblerData const&) = delete;
-    LocalAssemblerData(LocalAssemblerData&&) = delete;
-
-    LocalAssemblerData(
-        MeshLib::Element const& e,
-        std::size_t const local_matrix_size,
-        bool is_axially_symmetric,
-        unsigned const integration_order,
-        SmallDeformationProcessData<DisplacementDim>& process_data)
-        : SmallDeformationLocalAssembler<ShapeFunction, IntegrationMethod,
-                                         DisplacementDim>(
-              e, local_matrix_size, is_axially_symmetric, integration_order,
-              process_data)
-    {
-    }
-};
-
 }  // namespace SmallDeformation
 }  // namespace ProcessLib
diff --git a/ProcessLib/SmallDeformation/SmallDeformationProcess-impl.h b/ProcessLib/SmallDeformation/SmallDeformationProcess-impl.h
index 63ca0f4aec4..bf943873ed9 100644
--- a/ProcessLib/SmallDeformation/SmallDeformationProcess-impl.h
+++ b/ProcessLib/SmallDeformation/SmallDeformationProcess-impl.h
@@ -51,8 +51,8 @@ void SmallDeformationProcess<DisplacementDim>::initializeConcreteProcess(
     MeshLib::Mesh const& mesh,
     unsigned const integration_order)
 {
-    ProcessLib::SmallDeformation::createLocalAssemblers<DisplacementDim,
-                                                        LocalAssemblerData>(
+    ProcessLib::SmallDeformation::createLocalAssemblers<
+        DisplacementDim, SmallDeformationLocalAssembler>(
         mesh.getDimension(), mesh.getElements(), dof_table, _local_assemblers,
         mesh.isAxiallySymmetric(), integration_order, _process_data);
 
-- 
GitLab