From ce001bb861fc235bab0aa3578e33e9ab677389b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dennis=20Gl=C3=A4ser?= <dennis.glaeser@iws.uni-stuttgart.de>
Date: Thu, 15 Nov 2018 17:35:42 +0100
Subject: [PATCH] [mpfa][ivdatahandle] use unified names for return functions
 in sub-handles

---
 .../cellcentered/mpfa/darcyslaw.hh            | 16 +++----
 .../cellcentered/mpfa/fickslaw.hh             | 16 +++----
 .../mpfa/fluxvariablescachefiller.hh          | 42 +++++++++---------
 .../cellcentered/mpfa/fourierslaw.hh          | 16 +++----
 .../mpfa/interactionvolumedatahandle.hh       | 44 +++++++++----------
 5 files changed, 67 insertions(+), 67 deletions(-)

diff --git a/dumux/discretization/cellcentered/mpfa/darcyslaw.hh b/dumux/discretization/cellcentered/mpfa/darcyslaw.hh
index 590859986a..660fb4a2e1 100644
--- a/dumux/discretization/cellcentered/mpfa/darcyslaw.hh
+++ b/dumux/discretization/cellcentered/mpfa/darcyslaw.hh
@@ -138,7 +138,7 @@ class DarcysLawImplementation<TypeTag, DiscretizationMethod::ccmpfa>
             stencil_ = &iv.stencil();
 
             for (unsigned int pIdx = 0; pIdx < numPhases; ++pIdx)
-                primaryPj_[pIdx] = &dataHandle.advectionHandle().pressures(pIdx);
+                primaryPj_[pIdx] = &dataHandle.advectionHandle().uj(pIdx);
 
             static const bool enableGravity = getParamFromGroup<bool>(problem.paramGroup(), "Problem.EnableGravity");
             const auto ivLocalIdx = localFaceData.ivLocalScvfIndex();
@@ -146,7 +146,7 @@ class DarcysLawImplementation<TypeTag, DiscretizationMethod::ccmpfa>
             // standard grids
             if (dim == dimWorld)
             {
-                primaryTij_ = &dataHandle.advectionHandle().advectionT()[ivLocalIdx];
+                primaryTij_ = &dataHandle.advectionHandle().T()[ivLocalIdx];
                 if (enableGravity)
                     for (unsigned int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
                         g_[phaseIdx] = dataHandle.advectionHandle().gravity(phaseIdx)[ivLocalIdx];
@@ -156,7 +156,7 @@ class DarcysLawImplementation<TypeTag, DiscretizationMethod::ccmpfa>
             {
                 if (!localFaceData.isOutsideFace())
                 {
-                    primaryTij_ = &dataHandle.advectionHandle().advectionT()[ivLocalIdx];
+                    primaryTij_ = &dataHandle.advectionHandle().T()[ivLocalIdx];
                     if (enableGravity)
                         for (unsigned int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
                             g_[phaseIdx] = dataHandle.advectionHandle().gravity(phaseIdx)[ivLocalIdx];
@@ -164,7 +164,7 @@ class DarcysLawImplementation<TypeTag, DiscretizationMethod::ccmpfa>
                 else
                 {
                     const auto idxInOutsideFaces = localFaceData.scvfLocalOutsideScvfIndex();
-                    primaryTij_ = &dataHandle.advectionHandle().advectionTout()[ivLocalIdx][idxInOutsideFaces];
+                    primaryTij_ = &dataHandle.advectionHandle().tijOutside()[ivLocalIdx][idxInOutsideFaces];
                     if (enableGravity)
                         for (unsigned int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
                             g_[phaseIdx] = dataHandle.advectionHandle().gravityOutside(phaseIdx)[ivLocalIdx][idxInOutsideFaces];
@@ -193,7 +193,7 @@ class DarcysLawImplementation<TypeTag, DiscretizationMethod::ccmpfa>
             stencil_ = &iv.stencil();
 
             for (unsigned int pIdx = 0; pIdx < numPhases; ++pIdx)
-                secondaryPj_[pIdx] = &dataHandle.advectionHandle().pressures(pIdx);
+                secondaryPj_[pIdx] = &dataHandle.advectionHandle().uj(pIdx);
 
             static const bool enableGravity = getParamFromGroup<bool>(problem.paramGroup(), "Problem.EnableGravity");
             const auto ivLocalIdx = localFaceData.ivLocalScvfIndex();
@@ -201,7 +201,7 @@ class DarcysLawImplementation<TypeTag, DiscretizationMethod::ccmpfa>
             // standard grids
             if (dim == dimWorld)
             {
-                secondaryTij_ = &dataHandle.advectionHandle().advectionT()[ivLocalIdx];
+                secondaryTij_ = &dataHandle.advectionHandle().T()[ivLocalIdx];
                 if (enableGravity)
                     for (unsigned int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
                         g_[phaseIdx] = dataHandle.advectionHandle().gravity(phaseIdx)[ivLocalIdx];
@@ -211,7 +211,7 @@ class DarcysLawImplementation<TypeTag, DiscretizationMethod::ccmpfa>
             {
                 if (!localFaceData.isOutsideFace())
                 {
-                    secondaryTij_ = &dataHandle.advectionHandle().advectionT()[ivLocalIdx];
+                    secondaryTij_ = &dataHandle.advectionHandle().T()[ivLocalIdx];
                     if (enableGravity)
                         for (unsigned int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
                             g_[phaseIdx] = dataHandle.advectionHandle().gravity(phaseIdx)[ivLocalIdx];
@@ -219,7 +219,7 @@ class DarcysLawImplementation<TypeTag, DiscretizationMethod::ccmpfa>
                 else
                 {
                     const auto idxInOutsideFaces = localFaceData.scvfLocalOutsideScvfIndex();
-                    secondaryTij_ = &dataHandle.advectionHandle().advectionTout()[ivLocalIdx][idxInOutsideFaces];
+                    secondaryTij_ = &dataHandle.advectionHandle().tijOutside()[ivLocalIdx][idxInOutsideFaces];
                     if (enableGravity)
                         for (unsigned int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
                             g_[phaseIdx] = dataHandle.advectionHandle().gravityOutside(phaseIdx)[ivLocalIdx][idxInOutsideFaces];
diff --git a/dumux/discretization/cellcentered/mpfa/fickslaw.hh b/dumux/discretization/cellcentered/mpfa/fickslaw.hh
index e4cc85ae57..e424bbe936 100644
--- a/dumux/discretization/cellcentered/mpfa/fickslaw.hh
+++ b/dumux/discretization/cellcentered/mpfa/fickslaw.hh
@@ -136,15 +136,15 @@ class FicksLawImplementation<TypeTag, DiscretizationMethod::ccmpfa>
             switchFluxSign_[phaseIdx][compIdx] = localFaceData.isOutsideFace();
 
             // store pointer to the mole fraction vector of this iv
-            primaryXj_[phaseIdx][compIdx] = &dataHandle.diffusionHandle().moleFractions(phaseIdx, compIdx);
+            primaryXj_[phaseIdx][compIdx] = &dataHandle.diffusionHandle().uj(phaseIdx, compIdx);
 
             const auto ivLocalIdx = localFaceData.ivLocalScvfIndex();
             if (dim == dimWorld)
-                primaryTij_[phaseIdx][compIdx] = &dataHandle.diffusionHandle().diffusionT()[ivLocalIdx];
+                primaryTij_[phaseIdx][compIdx] = &dataHandle.diffusionHandle().T()[ivLocalIdx];
             else
                 primaryTij_[phaseIdx][compIdx] = localFaceData.isOutsideFace()
-                                                 ? &dataHandle.diffusionHandle().diffusionTout()[ivLocalIdx][localFaceData.scvfLocalOutsideScvfIndex()]
-                                                 : &dataHandle.diffusionHandle().diffusionT()[ivLocalIdx];
+                                                 ? &dataHandle.diffusionHandle().tijOutside()[ivLocalIdx][localFaceData.scvfLocalOutsideScvfIndex()]
+                                                 : &dataHandle.diffusionHandle().T()[ivLocalIdx];
         }
 
         /*!
@@ -167,15 +167,15 @@ class FicksLawImplementation<TypeTag, DiscretizationMethod::ccmpfa>
             switchFluxSign_[phaseIdx][compIdx] = localFaceData.isOutsideFace();
 
             // store pointer to the mole fraction vector of this iv
-            secondaryXj_[phaseIdx][compIdx] = &dataHandle.diffusionHandle().moleFractions(phaseIdx, compIdx);
+            secondaryXj_[phaseIdx][compIdx] = &dataHandle.diffusionHandle().uj(phaseIdx, compIdx);
 
             const auto ivLocalIdx = localFaceData.ivLocalScvfIndex();
             if (dim == dimWorld)
-                secondaryTij_[phaseIdx][compIdx] = &dataHandle.diffusionHandle().diffusionT()[ivLocalIdx];
+                secondaryTij_[phaseIdx][compIdx] = &dataHandle.diffusionHandle().T()[ivLocalIdx];
             else
                 secondaryTij_[phaseIdx][compIdx] = localFaceData.isOutsideFace()
-                                                   ? &dataHandle.diffusionHandle().diffusionTout()[ivLocalIdx][localFaceData.scvfLocalOutsideScvfIndex()]
-                                                   : &dataHandle.diffusionHandle().diffusionT()[ivLocalIdx];
+                                                   ? &dataHandle.diffusionHandle().tijOutside()[ivLocalIdx][localFaceData.scvfLocalOutsideScvfIndex()]
+                                                   : &dataHandle.diffusionHandle().T()[ivLocalIdx];
         }
 
         //! In the interaction volume-local system of eq we have one unknown per face.
diff --git a/dumux/discretization/cellcentered/mpfa/fluxvariablescachefiller.hh b/dumux/discretization/cellcentered/mpfa/fluxvariablescachefiller.hh
index c63e10ccee..485fde45d1 100644
--- a/dumux/discretization/cellcentered/mpfa/fluxvariablescachefiller.hh
+++ b/dumux/discretization/cellcentered/mpfa/fluxvariablescachefiller.hh
@@ -446,18 +446,18 @@ private:
             if (dim < dimWorld)
             {
                 if (enableGravity)
-                    localAssembler.assembleWithGravity( handle.advectionHandle().advectionTout(),
-                                                        handle.advectionHandle().advectionT(),
+                    localAssembler.assembleWithGravity( handle.advectionHandle().tijOutside(),
+                                                        handle.advectionHandle().T(),
                                                         handle.advectionHandle().gravityOutside(),
                                                         handle.advectionHandle().gravity(),
-                                                        handle.advectionHandle().advectionCA(),
-                                                        handle.advectionHandle().advectionA(),
+                                                        handle.advectionHandle().CA(),
+                                                        handle.advectionHandle().A(),
                                                         iv,
                                                         LambdaFactory::getAdvectionLambda() );
 
                 else
-                    localAssembler.assemble( handle.advectionHandle().advectionTout(),
-                                             handle.advectionHandle().advectionT(),
+                    localAssembler.assemble( handle.advectionHandle().tijOutside(),
+                                             handle.advectionHandle().T(),
                                              iv,
                                              LambdaFactory::getAdvectionLambda() );
             }
@@ -466,13 +466,13 @@ private:
             else
             {
                 if (enableGravity)
-                    localAssembler.assembleWithGravity( handle.advectionHandle().advectionT(),
+                    localAssembler.assembleWithGravity( handle.advectionHandle().T(),
                                                         handle.advectionHandle().gravity(),
-                                                        handle.advectionHandle().advectionCA(),
+                                                        handle.advectionHandle().CA(),
                                                         iv,
                                                         LambdaFactory::getAdvectionLambda() );
                 else
-                    localAssembler.assemble( handle.advectionHandle().advectionT(),
+                    localAssembler.assemble( handle.advectionHandle().T(),
                                              iv,
                                              LambdaFactory::getAdvectionLambda() );
             }
@@ -484,14 +484,14 @@ private:
             if (dim == dimWorld)
                 localAssembler.assembleGravity( handle.advectionHandle().gravity(),
                                                 iv,
-                                                handle.advectionHandle().advectionCA(),
+                                                handle.advectionHandle().CA(),
                                                 LambdaFactory::getAdvectionLambda() );
             else
                 localAssembler.assembleGravity( handle.advectionHandle().gravity(),
                                                 handle.advectionHandle().gravityOutside(),
                                                 iv,
-                                                handle.advectionHandle().advectionCA(),
-                                                handle.advectionHandle().advectionA(),
+                                                handle.advectionHandle().CA(),
+                                                handle.advectionHandle().A(),
                                                 LambdaFactory::getAdvectionLambda() );
         }
 
@@ -500,7 +500,7 @@ private:
         {
             const auto& evv = &elemVolVars();
             auto getPressure = [&evv, pIdx] (auto volVarIdx) { return (evv->operator[](volVarIdx)).pressure(pIdx); };
-            localAssembler.assemble(handle.advectionHandle().pressures(pIdx), iv, getPressure);
+            localAssembler.assemble(handle.advectionHandle().uj(pIdx), iv, getPressure);
         }
     }
 
@@ -529,12 +529,12 @@ private:
         if (forceUpdateAll || soldependentDiffusion)
         {
             if (dim < dimWorld)
-                localAssembler.assemble( handle.diffusionHandle().diffusionTout(),
-                                         handle.diffusionHandle().diffusionT(),
+                localAssembler.assemble( handle.diffusionHandle().tijOutside(),
+                                         handle.diffusionHandle().T(),
                                          iv,
                                          LambdaFactory::getDiffusionLambda(phaseIdx, compIdx) );
             else
-                localAssembler. assemble( handle.diffusionHandle().diffusionT(),
+                localAssembler. assemble( handle.diffusionHandle().T(),
                                           iv,
                                           LambdaFactory::getDiffusionLambda(phaseIdx, compIdx) );
         }
@@ -543,7 +543,7 @@ private:
         const auto& evv = &elemVolVars();
         auto getMoleFraction = [&evv, phaseIdx, compIdx] (auto volVarIdx)
                                { return (evv->operator[](volVarIdx)).moleFraction(phaseIdx, compIdx); };
-        localAssembler.assemble(handle.diffusionHandle().moleFractions(phaseIdx, compIdx), iv, getMoleFraction);
+        localAssembler.assemble(handle.diffusionHandle().uj(phaseIdx, compIdx), iv, getMoleFraction);
     }
 
     //! prepares the quantities necessary for conductive fluxes in the handle
@@ -563,12 +563,12 @@ private:
         if (forceUpdateAll || soldependentAdvection)
         {
             if (dim < dimWorld)
-                localAssembler.assemble( handle.heatConductionHandle().heatConductionTout(),
-                                         handle.heatConductionHandle().heatConductionT(),
+                localAssembler.assemble( handle.heatConductionHandle().tijOutside(),
+                                         handle.heatConductionHandle().T(),
                                          iv,
                                          LambdaFactory::template getHeatConductionLambda<GetPropType<TypeTag, Properties::ThermalConductivityModel>>() );
             else
-                localAssembler.assemble( handle.heatConductionHandle().heatConductionT(),
+                localAssembler.assemble( handle.heatConductionHandle().T(),
                                          iv,
                                          LambdaFactory::template getHeatConductionLambda<GetPropType<TypeTag, Properties::ThermalConductivityModel>>() );
         }
@@ -576,7 +576,7 @@ private:
         // assemble vector of temperatures
         const auto& evv = &elemVolVars();
         auto getMoleFraction = [&evv] (auto volVarIdx) { return (evv->operator[](volVarIdx)).temperature(); };
-        localAssembler.assemble(handle.heatConductionHandle().temperatures(), iv, getMoleFraction);
+        localAssembler.assemble(handle.heatConductionHandle().uj(), iv, getMoleFraction);
     }
 
     //! fill handle only when advection uses mpfa
diff --git a/dumux/discretization/cellcentered/mpfa/fourierslaw.hh b/dumux/discretization/cellcentered/mpfa/fourierslaw.hh
index 0a8fa27743..b48a2fec18 100644
--- a/dumux/discretization/cellcentered/mpfa/fourierslaw.hh
+++ b/dumux/discretization/cellcentered/mpfa/fourierslaw.hh
@@ -131,15 +131,15 @@ class FouriersLawImplementation<TypeTag, DiscretizationMethod::ccmpfa>
             switchFluxSign_ = localFaceData.isOutsideFace();
 
             // store pointer to the temperature vector of this iv
-            primaryTj_ = &dataHandle.heatConductionHandle().temperatures();
+            primaryTj_ = &dataHandle.heatConductionHandle().uj();
 
             const auto ivLocalIdx = localFaceData.ivLocalScvfIndex();
             if (dim == dimWorld)
-                primaryTij_ = &dataHandle.heatConductionHandle().heatConductionT()[ivLocalIdx];
+                primaryTij_ = &dataHandle.heatConductionHandle().T()[ivLocalIdx];
             else
                 primaryTij_ = localFaceData.isOutsideFace()
-                              ? &dataHandle.heatConductionHandle().heatConductionTout()[ivLocalIdx][localFaceData.scvfLocalOutsideScvfIndex()]
-                              : &dataHandle.heatConductionHandle().heatConductionT()[ivLocalIdx];
+                              ? &dataHandle.heatConductionHandle().tijOutside()[ivLocalIdx][localFaceData.scvfLocalOutsideScvfIndex()]
+                              : &dataHandle.heatConductionHandle().T()[ivLocalIdx];
         }
 
         /*!
@@ -161,15 +161,15 @@ class FouriersLawImplementation<TypeTag, DiscretizationMethod::ccmpfa>
             switchFluxSign_ = localFaceData.isOutsideFace();
 
             // store pointer to the temperature vector of this iv
-            secondaryTj_ = &dataHandle.heatConductionHandle().temperatures();
+            secondaryTj_ = &dataHandle.heatConductionHandle().uj();
 
             const auto ivLocalIdx = localFaceData.ivLocalScvfIndex();
             if (dim == dimWorld)
-                secondaryTij_ = &dataHandle.heatConductionT()[ivLocalIdx];
+                secondaryTij_ = &dataHandle.T()[ivLocalIdx];
             else
                 secondaryTij_ = localFaceData.isOutsideFace()
-                                ? &dataHandle.heatConductionHandle().heatConductionTout()[ivLocalIdx][localFaceData.scvfLocalOutsideScvfIndex()]
-                                : &dataHandle.heatConductionHandle().heatConductionT()[ivLocalIdx];
+                                ? &dataHandle.heatConductionHandle().tijOutside()[ivLocalIdx][localFaceData.scvfLocalOutsideScvfIndex()]
+                                : &dataHandle.heatConductionHandle().T()[ivLocalIdx];
         }
 
         //! Coefficients for the cell (& Dirichlet) unknowns in flux expressions (primary type)
diff --git a/dumux/discretization/cellcentered/mpfa/interactionvolumedatahandle.hh b/dumux/discretization/cellcentered/mpfa/interactionvolumedatahandle.hh
index eb302b7d17..4d4baad796 100644
--- a/dumux/discretization/cellcentered/mpfa/interactionvolumedatahandle.hh
+++ b/dumux/discretization/cellcentered/mpfa/interactionvolumedatahandle.hh
@@ -53,8 +53,8 @@ class AdvectionDataHandle
 
 public:
     //! Access to the iv-wide pressure of one phase
-    const CellVector& pressures(unsigned int pIdx) const { return p_[pIdx]; }
-    CellVector& pressures(unsigned int pIdx) { return p_[pIdx]; }
+    const CellVector& uj(unsigned int pIdx) const { return p_[pIdx]; }
+    CellVector& uj(unsigned int pIdx) { return p_[pIdx]; }
 
     //! The gravitational flux contributions for a phase on all faces
     const FaceVector& gravity(unsigned int pIdx) const { return g_[pIdx]; }
@@ -65,20 +65,20 @@ public:
     std::array< FaceVector, numPhases >& gravity() { return g_; }
 
     //! Projection matrix for Neumann/gravity contribution computation
-    const CMatrix& advectionCA() const { return CA_; }
-    CMatrix& advectionCA() { return CA_; }
+    const CMatrix& CA() const { return CA_; }
+    CMatrix& CA() { return CA_; }
 
     //! Inverse of the iv-local system matrix
-    const AMatrix& advectionA() const { return A_; }
-    AMatrix& advectionA() { return A_; }
+    const AMatrix& A() const { return A_; }
+    AMatrix& A() { return A_; }
 
     //! The transmissibility matrix (i.e. C*(A^-1)*B + D)
-    const TMatrix& advectionT() const { return T_; }
-    TMatrix& advectionT() { return T_; }
+    const TMatrix& T() const { return T_; }
+    TMatrix& T() { return T_; }
 
     //! The transmissibilities for "outside" faces (used on surface grids)
-    const std::vector< std::vector<CellVector> >& advectionTout() const { return outsideT_; }
-    std::vector< std::vector<CellVector> >& advectionTout() { return outsideT_; }
+    const std::vector< std::vector<CellVector> >& tijOutside() const { return outsideT_; }
+    std::vector< std::vector<CellVector> >& tijOutside() { return outsideT_; }
 
     //! The gravitational acceleration for "outside" faces (used on surface grids)
     const std::array< OutsideGravityStorage, numPhases >& gravityOutside() const { return outsideG_; }
@@ -115,16 +115,16 @@ public:
     void setComponentIndex(unsigned int compIdx) { compIdx_ = compIdx; }
 
     //! Access to the iv-wide mole fractions of a component in one phase
-    const CellVector& moleFractions(unsigned int pIdx, unsigned int compIdx) const { return xj_[pIdx][compIdx]; }
-    CellVector& moleFractions(unsigned int pIdx, unsigned int compIdx) { return xj_[pIdx][compIdx]; }
+    const CellVector& uj(unsigned int pIdx, unsigned int compIdx) const { return xj_[phaseIdx_][compIdx_]; }
+    CellVector& uj(unsigned int pIdx, unsigned int compIdx) { return xj_[phaseIdx_][compIdx_]; }
 
     //! The transmissibilities associated with diffusive fluxes
-    const TMatrix& diffusionT() const { return T_[phaseIdx_][compIdx_]; }
-    TMatrix& diffusionT() { return T_[phaseIdx_][compIdx_]; }
+    const TMatrix& T() const { return T_[phaseIdx_][compIdx_]; }
+    TMatrix& T() { return T_[phaseIdx_][compIdx_]; }
 
     //! The transmissibilities for "outside" faces (used on surface grids)
-    const OutsideTContainer& diffusionTout() const { return outsideT_[phaseIdx_][compIdx_]; }
-    OutsideTContainer& diffusionTout() { return outsideT_[phaseIdx_][compIdx_]; }
+    const OutsideTContainer& tijOutside() const { return outsideT_[phaseIdx_][compIdx_]; }
+    OutsideTContainer& tijOutside() { return outsideT_[phaseIdx_][compIdx_]; }
 
 private:
     //! diffusion-related variables
@@ -144,16 +144,16 @@ class HeatConductionDataHandle
 
 public:
     //! Access to the iv-wide temperatures
-    const CellVector& temperatures() const { return Tj_; }
-    CellVector& temperatures() { return Tj_; }
+    const CellVector& uj() const { return Tj_; }
+    CellVector& uj() { return Tj_; }
 
     //! The transmissibilities associated with conductive fluxes
-    const TMatrix& heatConductionT() const { return T_; }
-    TMatrix& heatConductionT() { return T_; }
+    const TMatrix& T() const { return T_; }
+    TMatrix& T() { return T_; }
 
     //! The transmissibilities for "outside" faces (used on surface grids)
-    const std::vector< std::vector<CellVector> >& heatConductionTout() const { return outsideT_; }
-    std::vector< std::vector<CellVector> >& heatConductionTout() { return outsideT_; }
+    const std::vector< std::vector<CellVector> >& tijOutside() const { return outsideT_; }
+    std::vector< std::vector<CellVector> >& tijOutside() { return outsideT_; }
 
 private:
     // heat conduction-related variables
-- 
GitLab