From 024f9c1e299e8bcd8bb4234d5914d88f660647a2 Mon Sep 17 00:00:00 2001
From: Henry <Henry>
Date: Mon, 12 Jan 2015 11:53:19 +0000
Subject: [PATCH] wallDist: Ensure appropriate method correct function is
 called

---
 src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C b/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C
index d66be01bf9b..991592baeba 100644
--- a/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C
+++ b/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C
@@ -187,7 +187,14 @@ bool Foam::wallDist::movePoints()
 {
     if (pdm_->movePoints())
     {
-        return pdm_->correct(y_, n_());
+        if (nRequired_)
+        {
+            return pdm_->correct(y_, n_());
+        }
+        else
+        {
+            return pdm_->correct(y_);
+        }
     }
     else
     {
@@ -199,7 +206,7 @@ bool Foam::wallDist::movePoints()
 void Foam::wallDist::updateMesh(const mapPolyMesh& mpm)
 {
     pdm_->updateMesh(mpm);
-    pdm_->correct(y_, n_());
+    movePoints();
 }
 
 
-- 
GitLab