From 94a6462058a919107c66355e874a19e39f0f8ae7 Mon Sep 17 00:00:00 2001 From: Mark Olesen 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 01385a7731..0000000000 --- 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 4e772fdf9d..0000000000 --- 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 2cc985b169..0000000000 --- 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::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::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;