From 371efab81a596654cbd973ad555ed5aa0f2edde6 Mon Sep 17 00:00:00 2001
From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de>
Date: Tue, 16 Nov 2021 16:27:13 +0100
Subject: [PATCH] [pnm][transmissibilityPatzekSilin] Clean-up and add assert

---
 .../porenetwork/throat/transmissibility1p.hh         | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/dumux/material/fluidmatrixinteractions/porenetwork/throat/transmissibility1p.hh b/dumux/material/fluidmatrixinteractions/porenetwork/throat/transmissibility1p.hh
index 7b0794f9e6..3cd789181b 100644
--- a/dumux/material/fluidmatrixinteractions/porenetwork/throat/transmissibility1p.hh
+++ b/dumux/material/fluidmatrixinteractions/porenetwork/throat/transmissibility1p.hh
@@ -135,7 +135,9 @@ public:
                                               const FluxVariablesCache& fluxVarsCache,
                                               const int phaseIdx)
     {
-        const auto shapeFactor = fluxVarsCache.throatShapeFactor();
+        assert(fluxVarsCache.throatCrossSectionShape() != Throat::Shape::twoPlates && "TwoPlates not supported. Use TransmissibilityBruus instead!");
+
+        const Scalar shapeFactor = fluxVarsCache.throatShapeFactor();
         const Scalar area = fluxVarsCache.throatCrossSectionalArea();
         const Scalar throatLength = fluxVarsCache.throatLength();
         const Scalar throatTransmissibility = singlePhaseTransmissibility(shapeFactor, throatLength, area);
@@ -158,11 +160,11 @@ public:
             const Scalar poreLength0 = spatialParams.poreLength(element, scv0, elemSol);
             const Scalar poreLength1 = spatialParams.poreLength(element, scv1, elemSol);
 
-            const auto poreShapeFactor0 = spatialParams.poreShapeFactor(element, scv0, elemSol);
-            const auto poreShapeFactor1 = spatialParams.poreShapeFactor(element, scv1, elemSol);
+            const Scalar poreShapeFactor0 = spatialParams.poreShapeFactor(element, scv0, elemSol);
+            const Scalar poreShapeFactor1 = spatialParams.poreShapeFactor(element, scv1, elemSol);
 
-            const auto poreCrossSectionalArea0 = spatialParams.poreCrossSectionalArea(element, scv0, elemSol);
-            const auto poreCrossSectionalArea1 = spatialParams.poreCrossSectionalArea(element, scv1, elemSol);
+            const Scalar poreCrossSectionalArea0 = spatialParams.poreCrossSectionalArea(element, scv0, elemSol);
+            const Scalar poreCrossSectionalArea1 = spatialParams.poreCrossSectionalArea(element, scv1, elemSol);
 
             const Scalar poreTransmissibility0 = singlePhaseTransmissibility(poreShapeFactor0, poreLength0, poreCrossSectionalArea0);
             const Scalar poreTransmissibility1 = singlePhaseTransmissibility(poreShapeFactor1, poreLength1, poreCrossSectionalArea1);
-- 
GitLab