From cb60ba164f213c9567b4f0af9895a0b3e0e778ad Mon Sep 17 00:00:00 2001
From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de>
Date: Fri, 27 Apr 2018 08:03:44 +0200
Subject: [PATCH] [freeflow] Clean-up diffusion laws

---
 dumux/discretization/staggered/freeflow/fickslaw.hh | 13 ++++++-------
 .../staggered/freeflow/maxwellstefanslaw.hh         |  8 ++++----
 .../compositional/staggered/fluxvariables.hh        |  2 +-
 3 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/dumux/discretization/staggered/freeflow/fickslaw.hh b/dumux/discretization/staggered/freeflow/fickslaw.hh
index 33b3f99102..b7e6049087 100644
--- a/dumux/discretization/staggered/freeflow/fickslaw.hh
+++ b/dumux/discretization/staggered/freeflow/fickslaw.hh
@@ -82,10 +82,10 @@ public:
     //! We don't cache anything for this law
     using Cache = FluxVariablesCaching::EmptyDiffusionCache;
 
-    static CellCenterPrimaryVariables diffusiveFluxForCellCenter(const Problem& problem,
-                                                           const FVElementGeometry& fvGeometry,
-                                                           const ElementVolumeVariables& elemVolVars,
-                                                           const SubControlVolumeFace &scvf)
+    static CellCenterPrimaryVariables flux(const Problem& problem,
+                                           const FVElementGeometry& fvGeometry,
+                                           const ElementVolumeVariables& elemVolVars,
+                                           const SubControlVolumeFace &scvf)
     {
         CellCenterPrimaryVariables flux(0.0);
 
@@ -109,7 +109,7 @@ public:
                     return flux;
             }
 
-            const Scalar tij = transmissibility_(problem, fvGeometry, elemVolVars, scvf, compIdx);
+            const Scalar tij = transmissibility_(fvGeometry, elemVolVars, scvf, compIdx);
             const Scalar insideMoleFraction = insideVolVars.moleFraction(compIdx);
 
             const Scalar outsideMolarDensity = scvf.boundary() ? insideVolVars.molarDensity() : outsideVolVars.molarDensity();
@@ -148,8 +148,7 @@ public:
         return flux;
     }
 
-    static Scalar transmissibility_(const Problem& problem,
-                                    const FVElementGeometry& fvGeometry,
+    static Scalar transmissibility_(const FVElementGeometry& fvGeometry,
                                     const ElementVolumeVariables& elemVolVars,
                                     const SubControlVolumeFace& scvf,
                                     const int compIdx)
diff --git a/dumux/discretization/staggered/freeflow/maxwellstefanslaw.hh b/dumux/discretization/staggered/freeflow/maxwellstefanslaw.hh
index a8f2d1ac45..4343932b24 100644
--- a/dumux/discretization/staggered/freeflow/maxwellstefanslaw.hh
+++ b/dumux/discretization/staggered/freeflow/maxwellstefanslaw.hh
@@ -85,10 +85,10 @@ public:
     using Cache = FluxVariablesCaching::EmptyDiffusionCache;
     using CacheFiller = FluxVariablesCaching::EmptyCacheFiller;
 
-    static CellCenterPrimaryVariables diffusiveFluxForCellCenter(const Problem& problem,
-                                                                 const FVElementGeometry& fvGeometry,
-                                                                 const ElementVolumeVariables& elemVolVars,
-                                                                 const SubControlVolumeFace& scvf)
+    static CellCenterPrimaryVariables flux(const Problem& problem,
+                                           const FVElementGeometry& fvGeometry,
+                                           const ElementVolumeVariables& elemVolVars,
+                                           const SubControlVolumeFace& scvf)
     {
         //this is to calculate the maxwellStefan diffusion in a multicomponent system.
         //see: Multicomponent Mass Transfer. R. Taylor u. R. Krishna. J. Wiley & Sons, New York 1993
diff --git a/dumux/freeflow/compositional/staggered/fluxvariables.hh b/dumux/freeflow/compositional/staggered/fluxvariables.hh
index fde62e47ce..c91cb1ce0f 100644
--- a/dumux/freeflow/compositional/staggered/fluxvariables.hh
+++ b/dumux/freeflow/compositional/staggered/fluxvariables.hh
@@ -106,7 +106,7 @@ public:
             flux[Indices::replaceCompEqIdx] = std::accumulate(flux.begin(), flux.end(), 0.0);
         }
 
-        flux += MolecularDiffusionType::diffusiveFluxForCellCenter(problem, fvGeometry, elemVolVars, scvf);
+        flux += MolecularDiffusionType::flux(problem, fvGeometry, elemVolVars, scvf);
         return flux;
     }
 };
-- 
GitLab