From 24aaeff30f9521c4c69376aabdce04f3a04cfd7d Mon Sep 17 00:00:00 2001
From: Thomas Fischer <thomas.fischer@ufz.de>
Date: Tue, 22 Dec 2020 13:19:38 +0100
Subject: [PATCH] [PL/BC] Use Eigen::Vector3d instead of auto, set face normal.

Set higher dimensions components of the face normal to zero.
---
 ...ectiveFreeComponentFlowBoundaryConditionLocalAssembler.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryConditionLocalAssembler.h b/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryConditionLocalAssembler.h
index d2f15883c4b..e0e91258c2d 100644
--- a/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryConditionLocalAssembler.h
+++ b/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryConditionLocalAssembler.h
@@ -106,7 +106,11 @@ private:
         // At the moment (2016-09-28) the surface normal is not oriented
         // according to the right hand rule
         // for correct results it is necessary to multiply the normal with -1
-        return -MeshLib::FaceRule::getSurfaceNormal(&e).normalized();
+        Eigen::Vector3d surface_normal =
+            -MeshLib::FaceRule::getSurfaceNormal(&e).normalized();
+        auto const zeros_size = 3 - _data.process.getMesh().getDimension();
+        surface_normal.tail(zeros_size).setZero();
+        return surface_normal;
     }
 
     HCNonAdvectiveFreeComponentFlowBoundaryConditionData const& _data;
-- 
GitLab