From 09ee2342557591550053612483ec5ec64501d739 Mon Sep 17 00:00:00 2001
From: andy <andy>
Date: Mon, 25 Mar 2013 16:59:25 +0000
Subject: [PATCH] STYLE: Updated header documentation

---
 .../AMIInterpolation/AMIInterpolation.H               |  5 ++---
 .../meshToMeshNew/calcMapNearest.C                    | 11 +++--------
 .../meshToMeshNew/meshToMeshNew.H                     |  9 +++++++++
 3 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H
index 0b763303553..9f94fa41169 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H
@@ -469,7 +469,7 @@ public:
                 ) const;
 
 
-            //- Interpolate from target to source with supplied binary op
+            //- Interpolate from target to source with supplied op
             template<class Type, class CombineOp>
             tmp<Field<Type> > interpolateToSource
             (
@@ -477,8 +477,7 @@ public:
                 const CombineOp& cop
             ) const;
 
-            //- Interpolate from target tmp field to source with supplied
-            //  binary op
+            //- Interpolate from target tmp field to source with supplied op
             template<class Type, class CombineOp>
             tmp<Field<Type> > interpolateToSource
             (
diff --git a/src/sampling/meshToMeshInterpolation/meshToMeshNew/calcMapNearest.C b/src/sampling/meshToMeshInterpolation/meshToMeshNew/calcMapNearest.C
index 3fe7b315d3d..110979532fc 100644
--- a/src/sampling/meshToMeshInterpolation/meshToMeshNew/calcMapNearest.C
+++ b/src/sampling/meshToMeshInterpolation/meshToMeshNew/calcMapNearest.C
@@ -52,12 +52,11 @@ void Foam::meshToMeshNew::calcMapNearest
 
     do
     {
-        srcToTgt[srcCellI].append(tgtCellI);
-
         // find nearest tgt cell
         findNearestCell(src, tgt, srcCellI, tgtCellI);
 
         // store src/tgt cell pair
+        srcToTgt[srcCellI].append(tgtCellI);
         tgtToSrc[tgtCellI].append(srcCellI);
 
         // mark source cell srcCellI and tgtCellI as matched
@@ -108,12 +107,7 @@ void Foam::meshToMeshNew::calcMapNearest
     forAll(tgtToSrcCellAddr_, i)
     {
         scalar v = tgtVc[i];
-        scalarList w(tgtToSrc[i].size(), v);
-        forAll(w, j)
-        {
-            w[j] /= w.size();
-        }
-        tgtToSrcCellWght_[i] = scalarList(w, v);
+        tgtToSrcCellWght_[i] = scalarList(tgtToSrc[i].size(), v);
         tgtToSrcCellAddr_[i].transfer(tgtToSrc[i]);
     }
 }
@@ -239,4 +233,5 @@ Foam::label Foam::meshToMeshNew::findMappedSrcCell
     return -1;
 }
 
+
 // ************************************************************************* //
diff --git a/src/sampling/meshToMeshInterpolation/meshToMeshNew/meshToMeshNew.H b/src/sampling/meshToMeshInterpolation/meshToMeshNew/meshToMeshNew.H
index 6ea844626e6..8404ce7b9fa 100644
--- a/src/sampling/meshToMeshInterpolation/meshToMeshNew/meshToMeshNew.H
+++ b/src/sampling/meshToMeshInterpolation/meshToMeshNew/meshToMeshNew.H
@@ -27,6 +27,15 @@ Class
 Description
     Class to calculate the cell-addressing between two overlapping meshes
 
+    Three methods are currently available:
+    - direct           : 1-to-1 mapping between meshes
+    - mapNearest       : assign nearest cell values without interpolation
+    - cellVolumeWeight : volume consistent mapping
+
+    The \c direct and \c cellVolumeWeight options are volume conservative,
+    whereas mapNearest is non-conservative.
+
+
 SourceFiles
     calcDirect.C
     calcMapNearest.C
-- 
GitLab