From 76195d07f3f12825a5f71881ae30660c8fce462b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Del=20Pino?= <stephane.delpino44@gmail.com>
Date: Mon, 14 Mar 2022 10:52:46 +0100
Subject: [PATCH] Fix data types of fromDualCell functions

The constness check was made one the wrong one (typenames were inverted)
---
 src/mesh/PrimalToDiamondDualConnectivityDataMapper.hpp | 4 ++--
 src/mesh/PrimalToDual1DConnectivityDataMapper.hpp      | 4 ++--
 src/mesh/PrimalToMedianDualConnectivityDataMapper.hpp  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/mesh/PrimalToDiamondDualConnectivityDataMapper.hpp b/src/mesh/PrimalToDiamondDualConnectivityDataMapper.hpp
index ce695a4d3..a803732db 100644
--- a/src/mesh/PrimalToDiamondDualConnectivityDataMapper.hpp
+++ b/src/mesh/PrimalToDiamondDualConnectivityDataMapper.hpp
@@ -116,8 +116,8 @@ class PrimalToDiamondDualConnectivityDataMapper : public IPrimalToDualConnectivi
 
   template <typename OriginDataType, typename DestinationDataType, ItemType destination_face_type>
   void
-  fromDualCell(const CellValue<DestinationDataType>& dual_cell_value,
-               const ItemValue<OriginDataType, destination_face_type>& primal_face_value) const
+  fromDualCell(const CellValue<OriginDataType>& dual_cell_value,
+               const ItemValue<DestinationDataType, destination_face_type>& primal_face_value) const
   {
     static_assert(not std::is_const_v<DestinationDataType>, "destination data type must not be constant");
     static_assert(std::is_same_v<std::remove_const_t<OriginDataType>, DestinationDataType>, "incompatible types");
diff --git a/src/mesh/PrimalToDual1DConnectivityDataMapper.hpp b/src/mesh/PrimalToDual1DConnectivityDataMapper.hpp
index 723025ca7..225708102 100644
--- a/src/mesh/PrimalToDual1DConnectivityDataMapper.hpp
+++ b/src/mesh/PrimalToDual1DConnectivityDataMapper.hpp
@@ -142,8 +142,8 @@ class PrimalToDual1DConnectivityDataMapper : public IPrimalToDualConnectivityDat
 
   template <typename OriginDataType, typename DestinationDataType, ItemType destination_node_type>
   void
-  fromDualCell(const CellValue<DestinationDataType>& dual_cell_value,
-               const ItemValue<OriginDataType, destination_node_type>& primal_node_value) const
+  fromDualCell(const CellValue<OriginDataType>& dual_cell_value,
+               const ItemValue<DestinationDataType, destination_node_type>& primal_node_value) const
   {
     static_assert(is_node_in_1d_v<destination_node_type>, "invalid destination node type");
 
diff --git a/src/mesh/PrimalToMedianDualConnectivityDataMapper.hpp b/src/mesh/PrimalToMedianDualConnectivityDataMapper.hpp
index 8f11d6652..366508eb3 100644
--- a/src/mesh/PrimalToMedianDualConnectivityDataMapper.hpp
+++ b/src/mesh/PrimalToMedianDualConnectivityDataMapper.hpp
@@ -159,8 +159,8 @@ class PrimalToMedianDualConnectivityDataMapper : public IPrimalToDualConnectivit
 
   template <typename OriginDataType, typename DestinationDataType>
   void
-  fromDualCell(const CellValue<DestinationDataType>& dual_cell_value,
-               const NodeValue<OriginDataType>& primal_node_value) const
+  fromDualCell(const CellValue<OriginDataType>& dual_cell_value,
+               const NodeValue<DestinationDataType>& primal_node_value) const
   {
     static_assert(not std::is_const_v<DestinationDataType>, "destination data type must not be constant");
     static_assert(std::is_same_v<std::remove_const_t<OriginDataType>, DestinationDataType>, "incompatible types");
-- 
GitLab