From 1317a716e13d95d6df67848058483c16b920755d Mon Sep 17 00:00:00 2001
From: Henry Weller <http://cfd.direct>
Date: Mon, 29 Feb 2016 19:58:50 +0000
Subject: [PATCH] src/finiteVolume: Moved function documentation comments into
 .H files and removed duplicates

---
 .../processor/processorFvPatchField.C         |  1 -
 .../processorCyclicFvPatchField.C             |  9 +--------
 .../fvPatchFields/fvPatchField/fvPatchField.C |  1 -
 .../extendedCentredCellToCellStencil.C        |  1 -
 .../CECCellToCellStencil.C                    |  5 +----
 .../CECCellToCellStencil.H                    |  5 ++++-
 .../CFCCellToCellStencil.C                    | 11 +++++-----
 .../CFCCellToCellStencil.H                    |  6 +++++-
 .../CPCCellToCellStencil.C                    |  5 +----
 .../CPCCellToCellStencil.H                    |  5 ++++-
 .../globalIndexStencils/cellToCellStencil.C   |  4 +---
 .../globalIndexStencils/cellToCellStencil.H   | 20 ++++++++++++-------
 .../extendedCentredCellToFaceStencil.C        |  3 ++-
 .../FECCellToFaceStencil.C                    |  5 +----
 .../FECCellToFaceStencil.H                    |  4 +++-
 .../globalIndexStencils/cellToFaceStencil.C   |  7 +++----
 .../globalIndexStencils/cellToFaceStencil.H   | 20 ++++++++++++-------
 .../extendedCentredFaceToCellStencil.C        |  1 -
 .../CFCFaceToCellStencil.C                    | 14 ++++++-------
 .../CFCFaceToCellStencil.H                    |  7 ++++++-
 .../fvMesh/fvMeshMapper/fvPatchMapper.C       | 11 +---------
 .../fvMesh/fvMeshMapper/fvSurfaceMapper.C     |  3 +--
 .../fvMesh/fvMeshSubset/fvMeshSubset.C        |  8 ++++----
 .../singleCellFvMesh/singleCellFvMesh.C       | 11 +++++-----
 .../meshWave/wallDistData/wallDistData.C      |  2 --
 .../surfaceInterpolation.C                    |  3 +--
 26 files changed, 82 insertions(+), 90 deletions(-)

diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C
index 9d185094182..75d5e710cee 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C
@@ -67,7 +67,6 @@ Foam::processorFvPatchField<Type>::processorFvPatchField
 {}
 
 
-// Construct by mapping given processorFvPatchField<Type>
 template<class Type>
 Foam::processorFvPatchField<Type>::processorFvPatchField
 (
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C
index 59483e6ee9f..c3092af3e52 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,13 +50,11 @@ Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
     const Field<Type>& f
 )
 :
-    //coupledFvPatchField<Type>(p, iF, f),
     processorFvPatchField<Type>(p, iF, f),
     procPatch_(refCast<const processorCyclicFvPatch>(p))
 {}
 
 
-// Construct by mapping given processorCyclicFvPatchField<Type>
 template<class Type>
 Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
 (
@@ -66,7 +64,6 @@ Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
     const fvPatchFieldMapper& mapper
 )
 :
-    //coupledFvPatchField<Type>(ptf, p, iF, mapper),
     processorFvPatchField<Type>(ptf, p, iF, mapper),
     procPatch_(refCast<const processorCyclicFvPatch>(p))
 {
@@ -90,7 +87,6 @@ Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
     const dictionary& dict
 )
 :
-    //coupledFvPatchField<Type>(p, iF, dict),
     processorFvPatchField<Type>(p, iF, dict),
     procPatch_(refCast<const processorCyclicFvPatch>(p))
 {
@@ -122,8 +118,6 @@ Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
     const processorCyclicFvPatchField<Type>& ptf
 )
 :
-    //processorLduInterfaceField(),
-    //coupledFvPatchField<Type>(ptf),
     processorFvPatchField<Type>(ptf),
     procPatch_(refCast<const processorCyclicFvPatch>(ptf.patch()))
 {}
@@ -136,7 +130,6 @@ Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
     const DimensionedField<Type, volMesh>& iF
 )
 :
-    //coupledFvPatchField<Type>(ptf, iF),
     processorFvPatchField<Type>(ptf, iF),
     procPatch_(refCast<const processorCyclicFvPatch>(ptf.patch()))
 {}
diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C
index 7c80ead82dc..856c1a174f2 100644
--- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C
@@ -558,7 +558,6 @@ void Foam::fvPatchField<Type>::operator/=
 }
 
 
-// Force an assignment, overriding fixedValue status
 template<class Type>
 void Foam::fvPatchField<Type>::operator==
 (
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.C
index aae25f97693..1b9c347b6f1 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.C
@@ -53,7 +53,6 @@ Foam::extendedCentredCellToCellStencil::extendedCentredCellToCellStencil
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Per cell which elements of the stencil to keep.
 void Foam::extendedCentredCellToCellStencil::compact()
 {
     boolList isInStencil(map().constructSize(), false);
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.C
index 7d2d6648c45..41e03b552d0 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,7 +29,6 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Calculates per edge the neighbour data (= edgeCells)
 void Foam::CECCellToCellStencil::calcEdgeBoundaryData
 (
     const boolList& isValidBFace,
@@ -61,8 +60,6 @@ void Foam::CECCellToCellStencil::calcEdgeBoundaryData
 }
 
 
-// Calculates per cell the neighbour data (= cell or boundary in global
-// numbering). First element is always cell itself!
 void Foam::CECCellToCellStencil::calcCellStencil
 (
     labelListList& globalCellCells
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.H
index df7733c46dc..4cd4ac13896 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,6 +63,9 @@ class CECCellToCellStencil
             EdgeMap<labelList>& neiGlobal
         ) const;
 
+        //- Calculates per cell the neighbour data
+        //  (= cell or boundary in global numbering).
+        //  First element is always cell itself!
         void calcCellStencil(labelListList& globalCellCells) const;
 
 
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C
index d034b9549cf..7cbde7abf8f 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,6 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Calculates per face the neighbour data (= cell or boundary face)
 void Foam::CFCCellToCellStencil::calcFaceBoundaryData
 (
     labelList& neiGlobal
@@ -82,10 +81,10 @@ void Foam::CFCCellToCellStencil::calcFaceBoundaryData
 }
 
 
-// Calculates per cell the neighbour data (= cell or boundary in global
-// numbering). First element is always cell itself!
-void Foam::CFCCellToCellStencil::calcCellStencil(labelListList& globalCellCells)
- const
+void Foam::CFCCellToCellStencil::calcCellStencil
+(
+    labelListList& globalCellCells
+) const
 {
     const label nBnd = mesh().nFaces()-mesh().nInternalFaces();
     const labelList& own = mesh().faceOwner();
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.H
index 6c7edac71e1..fde8b11ca0c 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,8 +51,12 @@ class CFCCellToCellStencil
 {
     // Private Member Functions
 
+        //- Calculates per face the neighbour data (= cell or boundary face)
         void calcFaceBoundaryData(labelList& neiGlobal) const;
 
+        //- Calculates per cell the neighbour data
+        //  (= cell or boundary in global numbering).
+        //  First element is always cell itself!
         void calcCellStencil(labelListList& globalCellCells) const;
 
 
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.C
index 024bb7e2acf..660a04d6d66 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,7 +29,6 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Calculates per point the neighbour data (= pointCells)
 void Foam::CPCCellToCellStencil::calcPointBoundaryData
 (
     const boolList& isValidBFace,
@@ -67,8 +66,6 @@ void Foam::CPCCellToCellStencil::calcPointBoundaryData
 }
 
 
-// Calculates per cell the neighbour data (= cell or boundary in global
-// numbering). First element is always cell itself!
 void Foam::CPCCellToCellStencil::calcCellStencil
 (
     labelListList& globalCellCells
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.H
index 4bb75f2ddf4..6d82a432a86 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,6 +62,9 @@ class CPCCellToCellStencil
             Map<labelList>& neiGlobal
         ) const;
 
+        //- Calculates per cell the neighbour data
+        //  (= cell or boundary in global numbering).
+        //  First element is always cell itself!
         void calcCellStencil(labelListList& globalCellCells) const;
 
 
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C
index fd48842f436..1aad1b4e20c 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,6 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Merge two list and guarantee global0,global1 are first.
 void Foam::cellToCellStencil::merge
 (
     const label global0,
@@ -131,7 +130,6 @@ void Foam::cellToCellStencil::merge
 }
 
 
-// Merge two list and guarantee globalI is first.
 void Foam::cellToCellStencil::merge
 (
     const label globalI,
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.H
index cb8dd859276..8360178c2de 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,16 +67,22 @@ class cellToCellStencil
 protected:
 
         //- Merge two lists.
+        //  Guarantee global0, global1 are first.
         static void merge
         (
-            const label,
-            const label,
-            const labelList&,
-            labelList&
+            const label global0,
+            const label global1,
+            const labelList& listA,
+            labelList& listB
         );
 
-        //- Merge two lists.
-        static void merge(const label, const labelList&, labelList&);
+        //- Merge two lists and guarantee globalI is first.
+        static void merge
+        (
+            const label globalI,
+            const labelList& pGlobals,
+            labelList& cCells
+        );
 
         //- Valid boundary faces (not empty and not coupled)
         void validBoundaryFaces(boolList& isValidBFace) const;
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.C
index 06060c19b66..5fe891d0788 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.C
@@ -53,9 +53,10 @@ Foam::extendedCentredCellToFaceStencil::extendedCentredCellToFaceStencil
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Per face which elements of the stencil to keep.
 void Foam::extendedCentredCellToFaceStencil::compact()
 {
+    // Per face which elements of the stencil to keep.
+
     boolList isInStencil(map().constructSize(), false);
 
     forAll(stencil_, faceI)
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.C
index 235091fa3ac..29f929c01f3 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,6 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Calculates per edge the neighbour data (= edgeCells)
 void Foam::FECCellToFaceStencil::calcEdgeBoundaryData
 (
     const boolList& isValidBFace,
@@ -62,8 +61,6 @@ void Foam::FECCellToFaceStencil::calcEdgeBoundaryData
 }
 
 
-// Calculates per face the edge connected data (= cell or boundary in global
-// numbering).
 void Foam::FECCellToFaceStencil::calcFaceStencil
 (
     labelListList& faceStencil
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.H
index 6d85ea414e5..d7c6d5c5b69 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,6 +61,8 @@ class FECCellToFaceStencil
             EdgeMap<labelList>& neiGlobal
         ) const;
 
+        //- Calculates per face the edge connected data
+        //  (= cell or boundary in global numbering).
         void calcFaceStencil(labelListList& faceStencil) const;
 
 
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C
index f61744941e4..c9ac094164b 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,6 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Merge two list and guarantee global0,global1 are first.
 void Foam::cellToFaceStencil::merge
 (
     const label global0,
@@ -132,7 +131,6 @@ void Foam::cellToFaceStencil::merge
 }
 
 
-// Merge two list and guarantee globalI is first.
 void Foam::cellToFaceStencil::merge
 (
     const label globalI,
@@ -338,13 +336,14 @@ Foam::labelList Foam::cellToFaceStencil::calcFaceCells
 }
 
 
-// Calculates per face a list of global cell/face indices.
 void Foam::cellToFaceStencil::calcFaceStencil
 (
     const labelListList& globalCellCells,
     labelListList& faceStencil
 ) const
 {
+    // Calculates per face a list of global cell/face indices.
+
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
     const label nBnd = mesh_.nFaces()-mesh_.nInternalFaces();
     const labelList& own = mesh_.faceOwner();
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.H
index 1b325ac3f54..62b7db6f810 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,16 +67,22 @@ class cellToFaceStencil
 protected:
 
         //- Merge two lists.
+        //  Guarantee global0, global1 are first.
         static void merge
         (
-            const label,
-            const label,
-            const labelList&,
-            labelList&
+            const label global0,
+            const label global1,
+            const labelList& listA,
+            labelList& listB
         );
 
-        //- Merge two lists.
-        static void merge(const label, const labelList&, labelList&);
+        //- Merge two lists and guarantee globalI is first.
+        static void merge
+        (
+            const label globalI,
+            const labelList& pGlobals,
+            labelList& cCells
+        );
 
         //- Valid boundary faces (not empty and not coupled)
         void validBoundaryFaces(boolList& isValidBFace) const;
diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.C
index 1b1073cb8cc..a2d40b58719 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.C
@@ -53,7 +53,6 @@ Foam::extendedCentredFaceToCellStencil::extendedCentredFaceToCellStencil
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Per face which elements of the stencil to keep.
 void Foam::extendedCentredFaceToCellStencil::compact()
 {
     boolList isInStencil(map().constructSize(), false);
diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C
index 7e49959a8ba..8a60abd4375 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,8 +30,6 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Calculates per face the neighbour data (= faces of cell). Leaves out the
-// face itself since this is already in stencil.
 void Foam::CFCFaceToCellStencil::calcFaceBoundaryData
 (
     labelListList& neiGlobal
@@ -81,7 +79,7 @@ void Foam::CFCFaceToCellStencil::calcFaceBoundaryData
             // Do nothing since face itself already in stencil
         }
     }
-    //syncTools::swapBoundaryFaceList(mesh(), neiGlobal);
+
     syncTools::syncBoundaryFaceList
     (
         mesh(),
@@ -92,10 +90,10 @@ void Foam::CFCFaceToCellStencil::calcFaceBoundaryData
 }
 
 
-// Calculates per cell the neighbour data (= cell or boundary in global
-// numbering). First element is always cell itself!
-void Foam::CFCFaceToCellStencil::calcCellStencil(labelListList& globalCellFaces)
- const
+void Foam::CFCFaceToCellStencil::calcCellStencil
+(
+    labelListList& globalCellFaces
+) const
 {
     const label nBnd = mesh().nFaces()-mesh().nInternalFaces();
     const labelList& own = mesh().faceOwner();
diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.H
index 29c083449e8..b451b6e6738 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,8 +51,13 @@ class CFCFaceToCellStencil
 {
     // Private Member Functions
 
+        //- Calculates per face the neighbour data (= faces of cell).
+        //  Leaves out the face itself since this is already in stencil.
         void calcFaceBoundaryData(labelListList& neiGlobal) const;
 
+        //- Calculates per cell the neighbour data
+        //  (= cell or boundary in global numbering).
+        //  First element is always cell itself!
         void calcCellStencil(labelListList& globalCellFaces) const;
 
 
diff --git a/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C b/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C
index a1039f2a71b..cd7502a1009 100644
--- a/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C
+++ b/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -156,14 +156,6 @@ void Foam::fvPatchMapper::calcAddressing() const
                     }
                 }
 
-                //// Cater for bad mapping
-                //if (nActive == 0)
-                //{
-                //    newAddr[nActive] = 0;
-                //    newWeights[nActive] = 1;
-                //    nActive++;
-                //}
-
                 newAddr.setSize(nActive);
                 newWeights.setSize(nActive);
 
@@ -211,7 +203,6 @@ void Foam::fvPatchMapper::clearOut()
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 Foam::fvPatchMapper::fvPatchMapper
 (
     const fvPatch& patch,
diff --git a/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C b/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C
index c9889b70301..c2d5fbcfcab 100644
--- a/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C
+++ b/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -144,7 +144,6 @@ void Foam::fvSurfaceMapper::clearOut()
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 Foam::fvSurfaceMapper::fvSurfaceMapper
 (
     const fvMesh& mesh,
diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C
index bb88b6c09a2..03569022229 100644
--- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C
+++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -87,14 +87,15 @@ void Foam::fvMeshSubset::markPoints
 }
 
 
-// Synchronize nCellsUsingFace on both sides of coupled patches. Marks
-// faces that become 'uncoupled' with 3.
 void Foam::fvMeshSubset::doCoupledPatches
 (
     const bool syncPar,
     labelList& nCellsUsingFace
 ) const
 {
+    // Synchronize nCellsUsingFace on both sides of coupled patches.
+    // Marks faces that become 'uncoupled' with 3.
+
     const polyBoundaryMesh& oldPatches = baseMesh().boundaryMesh();
 
     label nUncoupled = 0;
@@ -355,7 +356,6 @@ void Foam::fvMeshSubset::subsetZones()
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 Foam::fvMeshSubset::fvMeshSubset(const fvMesh& baseMesh)
 :
     baseMesh_(baseMesh),
diff --git a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C
index 6cb95ee928b..a4287b86756 100644
--- a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C
+++ b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,16 +29,17 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Conversion is a two step process:
-// - from original (fine) patch faces to agglomerations (aggloms might not
-//   be in correct patch order)
-// - from agglomerations to coarse patch faces
 void Foam::singleCellFvMesh::agglomerateMesh
 (
     const fvMesh& mesh,
     const labelListList& agglom
 )
 {
+    // Conversion is a two step process:
+    // - from original (fine) patch faces to agglomerations (aggloms might not
+    //   be in correct patch order)
+    // - from agglomerations to coarse patch faces
+
     const polyBoundaryMesh& oldPatches = mesh.boundaryMesh();
 
     // Check agglomeration within patch face range and continuous
diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/wallDistData/wallDistData.C b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/wallDistData/wallDistData.C
index b02e1d38f4e..4c105b1025a 100644
--- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/wallDistData/wallDistData.C
+++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/wallDistData/wallDistData.C
@@ -30,7 +30,6 @@ License
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 template<class TransferType>
 Foam::wallDistData<TransferType>::wallDistData
 (
@@ -68,7 +67,6 @@ Foam::wallDistData<TransferType>::~wallDistData()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Correct for mesh geom/topo changes
 template<class TransferType>
 void Foam::wallDistData<TransferType>::correct()
 {
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C
index 5fc0b4fa9d2..2895e1256e1 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -121,7 +121,6 @@ Foam::surfaceInterpolation::nonOrthCorrectionVectors() const
 }
 
 
-// Do what is neccessary if the mesh has moved
 bool Foam::surfaceInterpolation::movePoints()
 {
     deleteDemandDrivenData(weights_);
-- 
GitLab