From 2122b0854e38b428a8b0ebdf432aa693413d5a75 Mon Sep 17 00:00:00 2001
From: graham <g.macpherson@opencfd.co.uk>
Date: Tue, 23 Feb 2010 13:47:27 +0000
Subject: [PATCH] ENH:  conformalVoronoiMesh.  Reading timeChecks Switch from
 dictionary.

---
 .../conformalVoronoiMesh/cvControls/cvControls.C     |  7 +++++--
 .../conformalVoronoiMesh/cvControls/cvControls.H     | 11 ++++++-----
 .../conformalVoronoiMesh/cvControls/cvControlsI.H    | 12 ++++++------
 3 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/src/mesh/conformalVoronoiMesh/cvControls/cvControls.C b/src/mesh/conformalVoronoiMesh/cvControls/cvControls.C
index 1c31cf0e1f8..71b8dc5a5d8 100644
--- a/src/mesh/conformalVoronoiMesh/cvControls/cvControls.C
+++ b/src/mesh/conformalVoronoiMesh/cvControls/cvControls.C
@@ -49,8 +49,6 @@ Foam::cvControls::cvControls
 
     spanSqr_ = sqr(span_);
 
-    timeChecks_ = true;
-
     // Surface conformation controls
 
     const dictionary& surfDict(cvMeshDict_.subDict("surfaceConformation"));
@@ -99,6 +97,11 @@ Foam::cvControls::cvControls
 
     objOutput_ = Switch(motionDict.lookupOrDefault<Switch>("objOutput", false));
 
+    timeChecks_ = Switch
+    (
+        motionDict.lookupOrDefault<Switch>("timeChecks", false)
+    );
+
     alignmentSearchSpokes_ = readLabel
     (
         motionDict.lookup("alignmentSearchSpokes")
diff --git a/src/mesh/conformalVoronoiMesh/cvControls/cvControls.H b/src/mesh/conformalVoronoiMesh/cvControls/cvControls.H
index 82435fa260b..6c893782a70 100644
--- a/src/mesh/conformalVoronoiMesh/cvControls/cvControls.H
+++ b/src/mesh/conformalVoronoiMesh/cvControls/cvControls.H
@@ -69,8 +69,6 @@ class cvControls
             //- Square of span_
             scalar spanSqr_;
 
-            //- Activate/deactivate detailed timeChecks during meshing
-            bool timeChecks_;
 
         // Surface conformation controls
 
@@ -114,6 +112,9 @@ class cvControls
         //- Switch to control the output of obj files for debug
         Switch objOutput_;
 
+        //- Switch to control the reporting of detailed timeChecks
+        Switch timeChecks_;
+
         //- Number of "spokes" to use to search for secondary alignment
         //  direction
         label alignmentSearchSpokes_;
@@ -230,9 +231,6 @@ public:
             //- Return spanSqr
             inline scalar spanSqr() const;
 
-            //- Return timeChecks
-            inline bool timeChecks() const;
-
             //- Return the pointPairDistanceCoeff
             inline scalar pointPairDistanceCoeff() const;
 
@@ -260,6 +258,9 @@ public:
             //- Return the objOutput Switch
             inline Switch objOutput() const;
 
+            //- Return the timeChecks Switch
+            inline Switch timeChecks() const;
+
             //- Return the number of alignmentSearchSpokes to use
             inline label alignmentSearchSpokes() const;
 
diff --git a/src/mesh/conformalVoronoiMesh/cvControls/cvControlsI.H b/src/mesh/conformalVoronoiMesh/cvControls/cvControlsI.H
index 9fe3c719957..54e1cfb6ecf 100644
--- a/src/mesh/conformalVoronoiMesh/cvControls/cvControlsI.H
+++ b/src/mesh/conformalVoronoiMesh/cvControls/cvControlsI.H
@@ -44,12 +44,6 @@ inline Foam::scalar Foam::cvControls::spanSqr() const
 }
 
 
-inline bool Foam::cvControls::timeChecks() const
-{
-    return timeChecks_;
-}
-
-
 inline Foam::scalar Foam::cvControls::pointPairDistanceCoeff() const
 {
     return pointPairDistanceCoeff_;
@@ -104,6 +98,12 @@ inline Foam::Switch Foam::cvControls::objOutput() const
 }
 
 
+inline Foam::Switch Foam::cvControls::timeChecks() const
+{
+    return timeChecks_;
+}
+
+
 inline Foam::label Foam::cvControls::alignmentSearchSpokes() const
 {
     return alignmentSearchSpokes_;
-- 
GitLab