From 94a6462058a919107c66355e874a19e39f0f8ae7 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@Germany>
Date: Thu, 18 Dec 2008 10:00:03 +0100
Subject: [PATCH] update/remove some tests from applications/test

---
 applications/test/getRoots/Make/files       |  2 -
 applications/test/getRoots/Make/options     |  2 -
 applications/test/getRoots/getRoots.C       | 30 -------
 applications/test/hmm/Make/files            |  4 -
 applications/test/hmm/Make/options          |  0
 applications/test/hmm/calcEntry/calcEntry.C | 88 -------------------
 applications/test/hmm/calcEntry/calcEntry.H | 96 ---------------------
 applications/test/hmm/dictionaryTest.C      | 51 -----------
 applications/test/hmm/testDict              | 55 ------------
 applications/test/hmm/testDictInc           |  6 --
 applications/test/hmm/value                 |  1 -
 applications/test/router/Gather/Gather.C    | 18 ++--
 12 files changed, 10 insertions(+), 343 deletions(-)
 delete mode 100644 applications/test/getRoots/Make/files
 delete mode 100644 applications/test/getRoots/Make/options
 delete mode 100644 applications/test/getRoots/getRoots.C
 delete mode 100644 applications/test/hmm/Make/files
 delete mode 100644 applications/test/hmm/Make/options
 delete mode 100644 applications/test/hmm/calcEntry/calcEntry.C
 delete mode 100644 applications/test/hmm/calcEntry/calcEntry.H
 delete mode 100644 applications/test/hmm/dictionaryTest.C
 delete mode 100644 applications/test/hmm/testDict
 delete mode 100644 applications/test/hmm/testDictInc
 delete mode 100644 applications/test/hmm/value

diff --git a/applications/test/getRoots/Make/files b/applications/test/getRoots/Make/files
deleted file mode 100644
index 01385a77312..00000000000
--- a/applications/test/getRoots/Make/files
+++ /dev/null
@@ -1,2 +0,0 @@
-getRoots.C
-EXE = $(FOAM_USER_APPBIN)/getRoots
diff --git a/applications/test/getRoots/Make/options b/applications/test/getRoots/Make/options
deleted file mode 100644
index 4e772fdf9d7..00000000000
--- a/applications/test/getRoots/Make/options
+++ /dev/null
@@ -1,2 +0,0 @@
-/* EXE_INC = -I$(LIB_SRC)/finiteVolume/lnInclude */
-/* EXE_LIBS = -lfiniteVolume */
diff --git a/applications/test/getRoots/getRoots.C b/applications/test/getRoots/getRoots.C
deleted file mode 100644
index 2cc985b1697..00000000000
--- a/applications/test/getRoots/getRoots.C
+++ /dev/null
@@ -1,30 +0,0 @@
-#include "dictionary.H"
-#include "fileNameList.H"
-#include "IFstream.H"
-#include "OSspecific.H"
-
-using namespace Foam;
-
-int main()
-{
-    Info << "\nReading Roots" << endl;
-
-    IFstream rootsFile(home()/".foam/apps/openDX/roots");
-    fileNameList rootsList(dictionary(rootsFile).lookup("roots"));
-
-    char** rootsStrings = new char*[rootsList.size() + 1];
-    rootsStrings[rootsList.size()] = 0;
-
-    if (rootsList.size())
-    {
-        for (int i=0; i<rootsList.size(); i++)
-        {
-            rootsStrings[i] = new char[rootsList[i].size() + 1];
-            strcpy(rootsStrings[i], rootsList[i].c_str());
-
-            Info<< rootsStrings[i] << endl;
-        }
-    }
-
-    return 0;
-}
diff --git a/applications/test/hmm/Make/files b/applications/test/hmm/Make/files
deleted file mode 100644
index 759804fcfa6..00000000000
--- a/applications/test/hmm/Make/files
+++ /dev/null
@@ -1,4 +0,0 @@
-calcEntry/calcEntry.C
-dictionaryTest.C
-
-EXE = $(FOAM_USER_APPBIN)/dictionaryTest
diff --git a/applications/test/hmm/Make/options b/applications/test/hmm/Make/options
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/applications/test/hmm/calcEntry/calcEntry.C b/applications/test/hmm/calcEntry/calcEntry.C
deleted file mode 100644
index 8801a525551..00000000000
--- a/applications/test/hmm/calcEntry/calcEntry.C
+++ /dev/null
@@ -1,88 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-\*---------------------------------------------------------------------------*/
-
-#include "calcEntry.H"
-#include "dictionary.H"
-#include "IStringStream.H"
-#include "OStringStream.H"
-#include "addToMemberFunctionSelectionTable.H"
-
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-namespace Foam
-{
-namespace functionEntries
-{
-    defineTypeNameAndDebug(calcEntry, 0);
-
-    addToMemberFunctionSelectionTable
-    (
-        functionEntry,
-        calcEntry,
-        insert,
-        primitiveEntryIstream
-    );
-
-    addToMemberFunctionSelectionTable
-    (
-        functionEntry,
-        calcEntry,
-        insert,
-        dictionaryIstream
-    );
-}
-}
-
-
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
-
-bool Foam::functionEntries::calcEntry::insert
-(
-    const dictionary& parentDict,
-    primitiveEntry& entry,
-    Istream& is
-)
-{
-    dictionary args(parentDict, is);
-    OStringStream resultStream;
-    resultStream
-        << (args.lookup("x")[0].number() + args.lookup("y")[0].number());
-    entry.read(parentDict, IStringStream(resultStream.str())());
-    return true;
-}
-
-
-bool Foam::functionEntries::calcEntry::insert
-(
-    dictionary& parentDict,
-    Istream& is
-)
-{
-    return true;
-}
-
-
-// ************************************************************************* //
diff --git a/applications/test/hmm/calcEntry/calcEntry.H b/applications/test/hmm/calcEntry/calcEntry.H
deleted file mode 100644
index ced8516f388..00000000000
--- a/applications/test/hmm/calcEntry/calcEntry.H
+++ /dev/null
@@ -1,96 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-Class
-    Foam::functionEntries::calcEntry
-
-Description
-
-SourceFiles
-    calcEntry.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef calcEntry_H
-#define calcEntry_H
-
-#include "functionEntry.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-namespace functionEntries
-{
-
-/*---------------------------------------------------------------------------*\
-                           Class calcEntry Declaration
-\*---------------------------------------------------------------------------*/
-
-class calcEntry
-:
-    public functionEntry
-{
-    // Private Member Functions
-
-        //- Disallow default bitwise copy construct
-        calcEntry(const calcEntry&);
-
-        //- Disallow default bitwise assignment
-        void operator=(const calcEntry&);
-
-
-public:
-
-    //- Runtime type information
-    TypeName("calc");
-
-
-    // Member Functions
-
-        static bool insert
-        (
-            const dictionary& parentDict,
-            primitiveEntry& entry,
-            Istream& is
-        );
-
-        static bool insert
-        (
-            dictionary& parentDict,
-            Istream& is
-        );
-};
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace functionEntries
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/applications/test/hmm/dictionaryTest.C b/applications/test/hmm/dictionaryTest.C
deleted file mode 100644
index a57a16e552f..00000000000
--- a/applications/test/hmm/dictionaryTest.C
+++ /dev/null
@@ -1,51 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-Application
-    
-Description
-
-\*---------------------------------------------------------------------------*/
-
-#include "IOstreams.H"
-#include "IFstream.H"
-#include "dictionary.H"
-
-using namespace Foam;
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-//  Main program:
-
-int main(int argc, char *argv[])
-{
-    IFstream dictStream("testDict");
-    dictionary testDict(dictStream);
-
-    Info<< testDict << endl;
-
-    return 0;
-}
-
-
-// ************************************************************************* //
diff --git a/applications/test/hmm/testDict b/applications/test/hmm/testDict
deleted file mode 100644
index 70f6885e7ef..00000000000
--- a/applications/test/hmm/testDict
+++ /dev/null
@@ -1,55 +0,0 @@
-FoamFile
-{
-    version         2.0;
-    format          ascii;
-
-    root            "";
-    case            "";
-    instance        "";
-    local           "";
-
-    class           dictionary;
-    object          testDict;
-}
-
-
-dimensions      [ 0 2 -2 0 0 0 0 ];
-internalField   uniform 1;
-
-active
-{
-    type            turbulentIntensityKineticEnergyInlet;
-    intensity       0.1;
-    value           $internalField;
-}
-
-
-inactive
-{
-    type            zeroGradient;
-}
-
-
-boundaryField
-{
-    Default_Boundary_Region
-    {
-        type            zeroGradient;
-    }
-
-    inlet_1  { $active }
-    inlet_2  { $inactive }
-    inlet_3  { $inactive }
-
-    #include "testDictInc"
-
-    outlet
-    {
-        type            inletOutlet;
-        inletValue      $internalField;
-        value           #include "value";
-        x               5;
-        y               6;
-        another         #calc{x $x; y $y;};
-    }
-}
diff --git a/applications/test/hmm/testDictInc b/applications/test/hmm/testDictInc
deleted file mode 100644
index a0814c18339..00000000000
--- a/applications/test/hmm/testDictInc
+++ /dev/null
@@ -1,6 +0,0 @@
-    inlet_4
-    {
-        type            inletOutlet;
-        inletValue      $internalField;
-        value           $internalField;
-    }
diff --git a/applications/test/hmm/value b/applications/test/hmm/value
deleted file mode 100644
index 196f9d3d0a6..00000000000
--- a/applications/test/hmm/value
+++ /dev/null
@@ -1 +0,0 @@
-uniform 2
diff --git a/applications/test/router/Gather/Gather.C b/applications/test/router/Gather/Gather.C
index 968f45b9361..1f2bc56c44a 100644
--- a/applications/test/router/Gather/Gather.C
+++ b/applications/test/router/Gather/Gather.C
@@ -59,23 +59,24 @@ Gather<T0>::Gather(const T0& localData, const bool redistribute)
             // Receive data
             for
             (
-                int slave=Pstream::firstSlave(), procIndex = 1;
-                slave<=Pstream::lastSlave();
+                int slave = Pstream::firstSlave(), procIndex = 1;
+                slave <= Pstream::lastSlave();
                 slave++, procIndex++
             )
             {
-                IPstream fromSlave(slave);
+                IPstream fromSlave(Pstream::scheduled, slave);
                 fromSlave >> this->operator[](procIndex);
             }
+
             // Send data
             for
             (
-                int slave=Pstream::firstSlave(), procIndex = 1;
-                slave<=Pstream::lastSlave();
+                int slave = Pstream::firstSlave(), procIndex = 1;
+                slave <= Pstream::lastSlave();
                 slave++, procIndex++
             )
             {
-                OPstream toSlave(slave);
+                OPstream toSlave(Pstream::scheduled, slave);
 
                 if (redistribute)
                 {
@@ -92,12 +93,13 @@ Gather<T0>::Gather(const T0& localData, const bool redistribute)
         {
             // Slave: send my local data to master
             {
-                OPstream toMaster(Pstream::masterNo());
+                OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
                 toMaster << localData;
             }
+
             // Receive data from master
             {
-                IPstream fromMaster(Pstream::masterNo());
+                IPstream fromMaster(Pstream::scheduled, Pstream::masterNo());
                 if (redistribute)
                 {
                     fromMaster >> *this;
-- 
GitLab