From c5b894cf010437d12023e2d746cc0daaf71128c9 Mon Sep 17 00:00:00 2001
From: andy <andy>
Date: Fri, 13 Mar 2009 15:35:18 +0000
Subject: [PATCH] minor clean-up

---
 .../dsmcInitialise/dsmcInitialise.C           |  2 +-
 .../clouds/Templates/DsmcCloud/DsmcCloud.C    | 35 +++++++++----------
 .../clouds/Templates/DsmcCloud/DsmcCloudI.H   |  2 +-
 .../parcels/Templates/DsmcParcel/DsmcParcel.H |  8 ++---
 .../BinaryCollisionModel.C                    |  3 +-
 .../FreeStream/FreeStream.C                   | 24 +++++++++----
 .../FreeStream/FreeStream.H                   |  2 +-
 .../InflowBoundaryModel/InflowBoundaryModel.C |  3 +-
 .../InflowBoundaryModel/InflowBoundaryModel.H |  1 -
 .../NewInflowBoundaryModel.C                  |  7 ++--
 .../InflowBoundaryModel/NoInflow/NoInflow.H   |  2 +-
 .../MaxwellianThermal/MaxwellianThermal.C     |  4 +--
 .../MaxwellianThermal/MaxwellianThermal.H     |  1 -
 .../WallInteractionModel.C                    |  3 +-
 .../functionObjects/forces/forces/forces.C    |  8 ++++-
 15 files changed, 60 insertions(+), 45 deletions(-)

diff --git a/applications/utilities/preProcessing/dsmcInitialise/dsmcInitialise.C b/applications/utilities/preProcessing/dsmcInitialise/dsmcInitialise.C
index 04c1914f3ff..c2f797c17e0 100644
--- a/applications/utilities/preProcessing/dsmcInitialise/dsmcInitialise.C
+++ b/applications/utilities/preProcessing/dsmcInitialise/dsmcInitialise.C
@@ -63,7 +63,7 @@ int main(int argc, char *argv[])
     if (!mesh.write())
     {
         FatalErrorIn(args.executable())
-            << "Failed writing moleculeCloud."
+            << "Failed writing dsmcCloud."
             << nl << exit(FatalError);
     }
 
diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C
index 93eadc372df..4c4bcd0a43d 100644
--- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C
+++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C
@@ -128,7 +128,7 @@ void Foam::DsmcCloud<ParcelType>::initialise
 
         label typeId(findIndex(typeIdList_, moleculeName));
 
-        if(typeId == -1)
+        if (typeId == -1)
         {
             FatalErrorIn("Foam::DsmcCloud<ParcelType>::initialise")
                 << "typeId " << moleculeName << "not defined." << nl
@@ -274,7 +274,8 @@ void Foam::DsmcCloud<ParcelType>::collisions()
 
             scalar sigmaTcRMax = sigmaTcRMax_[celli];
 
-            scalar selectedPairs = collisionSelectionRemainder_[celli]
+            scalar selectedPairs =
+                collisionSelectionRemainder_[celli]
               + 0.5*nC*(nC-1)*nParticle_*sigmaTcRMax*deltaT
                /mesh_.cellVolumes()[celli];
 
@@ -284,13 +285,13 @@ void Foam::DsmcCloud<ParcelType>::collisions()
 
             collisionCandidates += nCandidates;
 
-            for(label c = 0; c < nCandidates; c++)
+            for (label c = 0; c < nCandidates; c++)
             {
                 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 // subCell candidate selection procedure
 
                 // Select the first collision candidate
-                label candidateP = rndGen_.integer(0, nC-1);
+                label candidateP = rndGen_.integer(0, nC - 1);
 
                 // Declare the second collision candidate
                 label candidateQ = -1;
@@ -307,7 +308,7 @@ void Foam::DsmcCloud<ParcelType>::collisions()
 
                     do
                     {
-                        candidateQ = subCellPs[rndGen_.integer(0, nSC-1)];
+                        candidateQ = subCellPs[rndGen_.integer(0, nSC - 1)];
 
                     } while(candidateP == candidateQ);
                 }
@@ -319,7 +320,7 @@ void Foam::DsmcCloud<ParcelType>::collisions()
 
                     do
                     {
-                        candidateQ = rndGen_.integer(0, nC-1);
+                        candidateQ = rndGen_.integer(0, nC - 1);
 
                     } while(candidateP == candidateQ);
                 }
@@ -705,7 +706,7 @@ void Foam::DsmcCloud<ParcelType>::evolve()
 
     if (debug)
     {
-       this->dumpParticlePositions();
+        this->dumpParticlePositions();
     }
 
     // Insert new particles from the inflow boundary
@@ -764,12 +765,14 @@ Foam::vector Foam::DsmcCloud<ParcelType>::equipartitionLinearVelocity
     scalar mass
 )
 {
-    return sqrt(kb*temperature/mass)*vector
-    (
-        rndGen_.GaussNormal(),
-        rndGen_.GaussNormal(),
-        rndGen_.GaussNormal()
-    );
+    return
+        sqrt(kb*temperature/mass)
+       *vector
+        (
+            rndGen_.GaussNormal(),
+            rndGen_.GaussNormal(),
+            rndGen_.GaussNormal()
+        );
 }
 
 
@@ -782,11 +785,7 @@ Foam::scalar Foam::DsmcCloud<ParcelType>::equipartitionInternalEnergy
 {
     scalar Ei = 0.0;
 
-    if
-    (
-        iDof < 2.0 + SMALL
-     && iDof > 2.0 - SMALL
-    )
+    if (iDof < 2.0 + SMALL && iDof > 2.0 - SMALL)
     {
         // Special case for iDof = 2, i.e. diatomics;
         Ei = -log(rndGen_.scalar01())*kb*temperature;
diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H
index 44ce59af501..73899636e8f 100644
--- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H
+++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H
@@ -105,7 +105,7 @@ Foam::DsmcCloud<ParcelType>::constProps
     {
         FatalErrorIn("Foam::DsmcCloud<ParcelType>::constProps(label typeId)")
             << "constantProperties for requested typeId index "
-            << typeId << " do not exist"  << nl
+            << typeId << " do not exist" << nl
             << abort(FatalError);
     }
 
diff --git a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H
index d8a6664a3af..bbc2fd1539b 100644
--- a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H
+++ b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H
@@ -230,11 +230,11 @@ public:
 
         // Main calculation loop
 
-        // Tracking
+            // Tracking
 
-            //- Move the parcel
-            template<class TrackData>
-            bool move(TrackData& td);
+                //- Move the parcel
+                template<class TrackData>
+                bool move(TrackData& td);
 
 
         // Patch interactions
diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.C
index 04ba113e3f3..0118014f9c6 100644
--- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.C
+++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.C
@@ -35,7 +35,8 @@ Foam::BinaryCollisionModel<CloudType>::BinaryCollisionModel
     CloudType& owner,
     const word& type
 )
-:   dict_(dict),
+:
+    dict_(dict),
     owner_(owner),
     coeffDict_(dict.subDict(type + "Coeffs"))
 {}
diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C
index 1367198efac..f4203f4d66f 100644
--- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C
+++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C
@@ -51,8 +51,14 @@ Foam::FreeStream<CloudType>::FreeStream
 
     if (patchIndex_ == -1)
     {
-        FatalErrorIn("Foam::DsmcCloud<ParcelType>::initialise")
-        << "patch " << patchName << " not found." << nl
+        FatalErrorIn
+        (
+            "Foam::FreeStream<CloudType>::FreeStream"
+            "("
+                "const dictionary&, "
+                "CloudType&"
+            ")"
+        )   << "patch " << patchName << " not found." << nl
             << abort(FatalError);
     }
 
@@ -78,8 +84,14 @@ Foam::FreeStream<CloudType>::FreeStream
 
         if (moleculeTypeIds_[i] == -1)
         {
-            FatalErrorIn("Foam::DsmcCloud<ParcelType>::initialise")
-                << "typeId " << molecules[i] << "not defined in cloud." << nl
+            FatalErrorIn
+            (
+                "Foam::FreeStream<CloudType>::FreeStream"
+                "("
+                    "const dictionary&, "
+                    "CloudType&"
+                ")"
+            )   << "typeId " << molecules[i] << "not defined in cloud." << nl
                 << abort(FatalError);
         }
     }
@@ -175,7 +187,7 @@ void Foam::FreeStream<CloudType>::inflow()
 
         // Other tangential unit vector.  Rescaling in case face is not
         // flat and nw and tw1 aren't perfectly orthogonal
-        vector tw2 = nw ^ tw1;
+        vector tw2 = nw^tw1;
         tw2 /= mag(tw2);
 
         forAll(particleFluxAccumulators_, i)
@@ -232,7 +244,7 @@ void Foam::FreeStream<CloudType>::inflow()
                    *(
                         rndGen.GaussNormal()*tw1
                       + rndGen.GaussNormal()*tw2
-                      - sqrt(-2.0*log(max(1 - rndGen.scalar01(),VSMALL)))*nw
+                      - sqrt(-2.0*log(max(1 - rndGen.scalar01(), VSMALL)))*nw
                     );
 
                 U += velocity_;
diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.H b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.H
index 6773decf848..f1bd4cc3213 100644
--- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.H
+++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.H
@@ -50,7 +50,6 @@ class FreeStream
 :
     public InflowBoundaryModel<CloudType>
 {
-
     // Private data
 
         //- Index of patch to introduce particles across
@@ -73,6 +72,7 @@ class FreeStream
         // across.
         List<Field<scalar> > particleFluxAccumulators_;
 
+
 public:
 
     //- Runtime type information
diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.C b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.C
index 7fd83137c08..8e99e3f43f8 100644
--- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.C
+++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.C
@@ -35,7 +35,8 @@ Foam::InflowBoundaryModel<CloudType>::InflowBoundaryModel
     CloudType& owner,
     const word& type
 )
-:   dict_(dict),
+:
+    dict_(dict),
     owner_(owner),
     coeffDict_(dict.subDict(type + "Coeffs"))
 {}
diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H
index 92bc8d2f4d8..6b01a82f40f 100644
--- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H
+++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H
@@ -124,7 +124,6 @@ public:
 
     //- Introduce particles
     virtual void inflow() = 0;
-
 };
 
 
diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/NewInflowBoundaryModel.C b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/NewInflowBoundaryModel.C
index 0a6b2f530f7..3abc5b29368 100644
--- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/NewInflowBoundaryModel.C
+++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/NewInflowBoundaryModel.C
@@ -36,10 +36,7 @@ Foam::InflowBoundaryModel<CloudType>::New
     CloudType& owner
 )
 {
-    word InflowBoundaryModelType
-    (
-        dict.lookup("InflowBoundaryModel")
-    );
+    word InflowBoundaryModelType(dict.lookup("InflowBoundaryModel"));
 
     Info<< "Selecting InflowBoundaryModel " << InflowBoundaryModelType << endl;
 
@@ -55,7 +52,7 @@ Foam::InflowBoundaryModel<CloudType>::New
         )   << "Unknown InflowBoundaryModelType type "
             << InflowBoundaryModelType
             << ", constructor not in hash table" << nl << nl
-            << "    Valid InflowBoundaryModel types are :" << nl
+            << "    Valid InflowBoundaryModel types are:" << nl
             << dictionaryConstructorTablePtr_->toc() << exit(FatalError);
     }
 
diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.H b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.H
index 31adc04cccf..e3f46622e93 100644
--- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.H
+++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.H
@@ -40,7 +40,7 @@ Description
 namespace Foam
 {
 /*---------------------------------------------------------------------------*\
-                      Class NoInflow Declaration
+                          Class NoInflow Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class CloudType>
diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.C b/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.C
index d8973fc5001..c2c12ce5ca7 100644
--- a/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.C
+++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.C
@@ -99,7 +99,7 @@ void Foam::MaxwellianThermal<CloudType>::correct
     vector tw1 = Ut/mag(Ut);
 
     // Other tangential unit vector
-    vector tw2 = nw ^ tw1;
+    vector tw2 = nw^tw1;
 
     scalar T = cloud.T().boundaryField()[wppIndex][wppLocalFace];
 
@@ -112,7 +112,7 @@ void Foam::MaxwellianThermal<CloudType>::correct
        *(
             rndGen.GaussNormal()*tw1
           + rndGen.GaussNormal()*tw2
-          - sqrt(-2.0*log(max(1 - rndGen.scalar01(),VSMALL)))*nw
+          - sqrt(-2.0*log(max(1 - rndGen.scalar01(), VSMALL)))*nw
         );
 
     U += cloud.U().boundaryField()[wppIndex][wppLocalFace];
diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.H b/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.H
index a52a066aec2..2b71beaba00 100644
--- a/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.H
+++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.H
@@ -49,7 +49,6 @@ class MaxwellianThermal
 :
     public WallInteractionModel<CloudType>
 {
-
 public:
 
     //- Runtime type information
diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C
index f4ef7fc54de..060d5dd76d9 100644
--- a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C
+++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C
@@ -35,7 +35,8 @@ Foam::WallInteractionModel<CloudType>::WallInteractionModel
     CloudType& owner,
     const word& type
 )
-:   dict_(dict),
+:
+    dict_(dict),
     owner_(owner),
     coeffDict_(dict.subDict(type + "Coeffs"))
 {}
diff --git a/src/postProcessing/functionObjects/forces/forces/forces.C b/src/postProcessing/functionObjects/forces/forces/forces.C
index 91df3fedd18..1ffc36cab02 100644
--- a/src/postProcessing/functionObjects/forces/forces/forces.C
+++ b/src/postProcessing/functionObjects/forces/forces/forces.C
@@ -163,7 +163,13 @@ Foam::forces::forces
         active_ = false;
         WarningIn
         (
-            "forces::forces(const objectRegistry& obr, const dictionary& dict)"
+            "Foam::forces::forces"
+            "("
+                "const word&, "
+                "const objectRegistry&, "
+                "const dictionary&, "
+                "const bool"
+            ")"
         )   << "No fvMesh available, deactivating."
             << endl;
     }
-- 
GitLab