From 5a12edc36c3f34fb030aa19186058d1209cd27ed Mon Sep 17 00:00:00 2001
From: Henry <Henry>
Date: Sun, 12 Apr 2015 10:01:33 +0100
Subject: [PATCH] reconstructParMesh: Enable -constant and -zeroTime options

---
 .../reconstructParMesh/reconstructParMesh.C   | 28 +++++++++++--------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C
index 64e2445f942..00f547d702d 100644
--- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C
+++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C
@@ -97,8 +97,8 @@ autoPtr<faceCoupleInfo> determineCoupledFaces
             (
                 masterMesh,
                 meshToAdd,
-                mergeDist,      // absolute merging distance
-                true            // matching faces identical
+                mergeDist,      // Absolute merging distance
+                true            // Matching faces identical
             )
         );
     }
@@ -196,9 +196,9 @@ autoPtr<faceCoupleInfo> determineCoupledFaces
                 masterFaces,
                 meshToAdd,
                 addFaces,
-                mergeDist,      // absolute merging distance
-                true,           // matching faces identical?
-                false,          // if perfectmatch are faces already ordered
+                mergeDist,      // Absolute merging distance
+                true,           // Matching faces identical?
+                false,          // If perfect match are faces already ordered
                                 // (e.g. processor patches)
                 false           // are faces each on separate patch?
             )
@@ -431,6 +431,9 @@ int main(int argc, char *argv[])
         "reconstruct a mesh using geometric information only"
     );
 
+    // Enable -constant ... if someone really wants it
+    // Enable -zeroTime to prevent accidentally trashing the initial fields
+    timeSelector::addOptions(true, true);
     argList::noParallel();
     argList::addOption
     (
@@ -562,7 +565,7 @@ int main(int argc, char *argv[])
     }
 
 
-    // use the times list from the master processor
+    // Use the times list from the master processor
     // and select a subset based on the command-line options
     instantList Times = timeSelector::select
     (
@@ -570,7 +573,7 @@ int main(int argc, char *argv[])
         args
     );
 
-    // set startTime and endTime depending on -time and -latestTime options
+    // Set startTime and endTime depending on -time and -latestTime options
     #include "checkTimeOptions.H"
 
     if (Times.empty())
@@ -628,6 +631,7 @@ int main(int argc, char *argv[])
 
         // Internal faces on the final reconstructed mesh
         label masterInternalFaces;
+
         // Owner addressing on the final reconstructed mesh
         labelList masterOwner;
 
@@ -786,7 +790,7 @@ int main(int argc, char *argv[])
                     procMesh,
                     IOobject::NO_READ,
                     IOobject::NO_WRITE,
-                    false                       // do not register
+                    false                       // Do not register
                 ),
                 pointProcAddressing[procI]
             ).write();
@@ -810,7 +814,7 @@ int main(int argc, char *argv[])
                     procMesh,
                     IOobject::NO_READ,
                     IOobject::NO_WRITE,
-                    false                       // do not register
+                    false                       // Do not register
                 ),
                 faceProcAddressing[procI]
             );
@@ -873,7 +877,7 @@ int main(int argc, char *argv[])
                     procMesh,
                     IOobject::NO_READ,
                     IOobject::NO_WRITE,
-                    false                       // do not register
+                    false                       // Do not register
                 ),
                 cellProcAddressing[procI]
             ).write();
@@ -898,7 +902,7 @@ int main(int argc, char *argv[])
                     procMesh,
                     IOobject::NO_READ,
                     IOobject::NO_WRITE,
-                    false                       // do not register
+                    false                       // Do not register
                 ),
                 boundaryProcAddressing[procI]
             ).write();
@@ -908,7 +912,7 @@ int main(int argc, char *argv[])
     }
 
 
-    Info<< "\nEnd\n" << endl;
+    Info<< "End.\n" << endl;
 
     return 0;
 }
-- 
GitLab