From fb7172b9115e732105414161153c54ca58d84c49 Mon Sep 17 00:00:00 2001
From: mattijs <mattijs>
Date: Tue, 14 Dec 2010 14:23:19 +0000
Subject: [PATCH] ENH: Particle.C : debug messages

---
 src/lagrangian/basic/Particle/Particle.C | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/src/lagrangian/basic/Particle/Particle.C b/src/lagrangian/basic/Particle/Particle.C
index b0bc7a8d0ce..a56ab267a26 100644
--- a/src/lagrangian/basic/Particle/Particle.C
+++ b/src/lagrangian/basic/Particle/Particle.C
@@ -371,10 +371,21 @@ Foam::scalar Foam::Particle<ParticleType>::trackToFace
         {
             // Apply tracking correction towards tet centre
 
+            if (debug)
+            {
+                Pout<< "tracking rescue using tetCentre from " << position();
+            }
+
             position_ +=
                 Cloud<ParticleType>::trackingCorrectionTol
                *(tet.centre() - position_);
 
+            if (debug)
+            {
+                Pout<< " to " << position() << " due to "
+                    << (tet.centre() - position_) << endl;
+            }
+
             cloud_.trackingRescue();
 
             return trackFraction;
@@ -639,6 +650,12 @@ Foam::scalar Foam::Particle<ParticleType>::trackToFace
 
         tetPointRef tet = currentTet();
 
+        if (debug)
+        {
+            Pout<< "tracking rescue for lambdaMin:" << lambdaMin
+                << "from " << position();
+        }
+
         position_ +=
             Cloud<ParticleType>::trackingCorrectionTol
            *(tet.centre() - position_);
@@ -692,6 +709,11 @@ Foam::scalar Foam::Particle<ParticleType>::trackToFace
             }
         }
 
+        if (debug)
+        {
+            Pout<< " to " << position() << endl;
+        }
+
         cloud_.trackingRescue();
     }
 
-- 
GitLab