From cc7fa2ccf72a3026656a9feb263d025000087ef4 Mon Sep 17 00:00:00 2001
From: Henry <Henry>
Date: Fri, 15 Apr 2011 16:07:52 +0100
Subject: [PATCH] linearUpwind: Added a temporary check to help people upgrade
 to the new gradient specification

---
 .../schemes/linearUpwind/linearUpwind.H       | 22 +++++++++++++++++--
 .../schemes/linearUpwind/linearUpwindV.H      | 16 ++++++++++++--
 2 files changed, 34 insertions(+), 4 deletions(-)

diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.H
index 6c00e4deb23..13b98512df6 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.H
@@ -111,7 +111,16 @@ public:
                     mesh.gradScheme(gradSchemeName_)
                 )
             )
-        {}
+        {
+            if (!schemeData.eof())
+            {
+                IOWarningIn("linearUpwind(const fvMesh&, Istream&)", schemeData)
+                    << "unexpected additional entries in stream." << nl
+                    << "    Only the name of the gradient scheme in the"
+                       " 'gradSchemes' dictionary should be specified."
+                    << endl;
+            }
+        }
 
         //- Construct from faceFlux and Istream
         linearUpwind
@@ -131,7 +140,16 @@ public:
                     mesh.gradScheme(gradSchemeName_)
                 )
             )
-        {}
+        {
+            if (!schemeData.eof())
+            {
+                IOWarningIn("linearUpwind(const fvMesh&, Istream&)", schemeData)
+                    << "unexpected additional entries in stream." << nl
+                    << "    Only the name of the gradient scheme in the"
+                       " 'gradSchemes' dictionary should be specified."
+                    << endl;
+            }
+        }
 
 
     // Member Functions
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.H
index 262d54115db..ce07b1017bf 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.H
@@ -110,7 +110,13 @@ public:
                     mesh.gradScheme(gradSchemeName_)
                 )
             )
-        {}
+        {
+            IOWarningIn("linearUpwindV(const fvMesh&, Istream&)", schemeData)
+                << "unexpected additional entries in stream." << nl
+                << "    Only the name of the gradient scheme in the"
+                   " 'gradSchemes' dictionary should be specified."
+                << endl;
+        }
 
         //- Construct from faceFlux and Istream
         linearUpwindV
@@ -130,7 +136,13 @@ public:
                     mesh.gradScheme(gradSchemeName_)
                 )
             )
-        {}
+        {
+            IOWarningIn("linearUpwindV(const fvMesh&, Istream&)", schemeData)
+                << "unexpected additional entries in stream." << nl
+                << "    Only the name of the gradient scheme in the"
+                   " 'gradSchemes' dictionary should be specified."
+                << endl;
+        }
 
 
     // Member Functions
-- 
GitLab