From 641a0f1b9ccbdb3db7d8cbf33cadab66108f2045 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 4 Nov 2009 20:51:18 +0100 Subject: [PATCH 001/194] HashTable: drop redundant check as Mattijs noticed --- src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H b/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H index 610f3ccf2f..9c870fdf45 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H @@ -180,7 +180,7 @@ inline Foam::HashTable::iteratorBase::iteratorBase entryPtr_(0), hashIndex_(0) { - if (hashTable_->nElmts_ && hashTable_->table_) + if (hashTable_->nElmts_) { // find first non-NULL table entry while From 33e936a34d5ca5bb47508d198d50d996dfc47d2c Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 6 Nov 2009 16:56:36 +0100 Subject: [PATCH 002/194] removed redundant check in HashTable --- src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H b/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H index 610f3ccf2f..9c870fdf45 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H @@ -180,7 +180,7 @@ inline Foam::HashTable::iteratorBase::iteratorBase entryPtr_(0), hashIndex_(0) { - if (hashTable_->nElmts_ && hashTable_->table_) + if (hashTable_->nElmts_) { // find first non-NULL table entry while From 3d9c8220222bca97a6cd4bfbb98d40cd0c73465b Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 6 Nov 2009 17:18:32 +0100 Subject: [PATCH 003/194] Added abortCalculation function object, exposed Time::stopAtControls - still needs fine-tuning (testing) to see if it reacts as anticipated under various conditions. --- src/OpenFOAM/db/Time/Time.C | 16 ++ src/OpenFOAM/db/Time/Time.H | 22 ++- .../OutputFilterFunctionObject.H | 2 +- .../writeRegisteredObjectFunctionObject.H | 2 +- .../fieldAverageFunctionObject.H | 2 +- .../fieldMinMax/fieldMinMaxFunctionObject.H | 2 +- .../cellSource/cellSourceFunctionObject.H | 2 +- .../faceSource/faceSourceFunctionObject.H | 2 +- .../streamLine/streamLineFunctionObject.H | 2 +- .../forceCoeffs/forceCoeffsFunctionObject.H | 2 +- .../forces/forces/forcesFunctionObject.H | 2 +- .../systemCall/systemCallFunctionObject.H | 2 +- .../functionObjects/utilities/Make/files | 3 + .../abortCalculation/IOabortCalculation.H | 50 ++++++ .../abortCalculation/abortCalculation.C | 159 +++++++++++++++++ .../abortCalculation/abortCalculation.H | 168 ++++++++++++++++++ .../abortCalculationFunctionObject.C | 43 +++++ .../abortCalculationFunctionObject.H | 55 ++++++ .../dsmcFields/dsmcFieldsFunctionObject.H | 2 +- .../staticPressureFunctionObject.H | 2 +- src/sampling/probes/probesFunctionObject.H | 2 +- .../sampledSetsFunctionObject.H | 2 +- .../sampledSurfacesFunctionObject.H | 2 +- 23 files changed, 522 insertions(+), 24 deletions(-) create mode 100644 src/postProcessing/functionObjects/utilities/abortCalculation/IOabortCalculation.H create mode 100644 src/postProcessing/functionObjects/utilities/abortCalculation/abortCalculation.C create mode 100644 src/postProcessing/functionObjects/utilities/abortCalculation/abortCalculation.H create mode 100644 src/postProcessing/functionObjects/utilities/abortCalculation/abortCalculationFunctionObject.C create mode 100644 src/postProcessing/functionObjects/utilities/abortCalculation/abortCalculationFunctionObject.H diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index 7405cfb5b6..84524d1fc6 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -532,6 +532,22 @@ bool Foam::Time::end() const } +void Foam::Time::stopAt(const stopAtControls sa) const +{ + stopAt_ = sa; + + // adjust endTime + if (sa == saEndTime) + { + controlDict_.lookup("endTime") >> endTime_; + } + else + { + endTime_ = GREAT; + } +} + + void Foam::Time::setTime(const Time& t) { value() = t.value(); diff --git a/src/OpenFOAM/db/Time/Time.H b/src/OpenFOAM/db/Time/Time.H index 261d9eb0a2..d90cab32ec 100644 --- a/src/OpenFOAM/db/Time/Time.H +++ b/src/OpenFOAM/db/Time/Time.H @@ -90,17 +90,17 @@ public: //- Stop-run control options enum stopAtControls { - saEndTime, - saNoWriteNow, - saWriteNow, - saNextWrite + saEndTime, /*!< stop when Time reaches the prescribed endTime */ + saNoWriteNow, /*!< set endTime to stop immediately w/o writing */ + saWriteNow, /*!< set endTime to stop immediately w/ writing */ + saNextWrite /*!< stop the next time data are written */ }; - //- Suported time directory name formats + //- Supported time directory name formats enum fmtflags { - general = 0, - fixed = ios_base::fixed, + general = 0, + fixed = ios_base::fixed, scientific = ios_base::scientific }; @@ -111,10 +111,10 @@ protected: label startTimeIndex_; scalar startTime_; - scalar endTime_; + mutable scalar endTime_; static const NamedEnum stopAtControlNames_; - stopAtControls stopAt_; + mutable stopAtControls stopAt_; static const NamedEnum writeControlNames_; writeControls writeControl_; @@ -390,6 +390,10 @@ public: // Edit + //- Adjust the current stopAtControl. Note that this value + // only persists until the next time the dictionary is read. + virtual void stopAt(const stopAtControls) const; + //- Reset the time and time-index to those of the given time virtual void setTime(const Time&); diff --git a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H index f6c183e803..bce0c0abe9 100644 --- a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H +++ b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H @@ -27,7 +27,7 @@ Class Description A functionObject wrapper around OutputFilter to allow them to be - created via the functions list within controlDict. + created via the functions entry within controlDict. Note Since the timeIndex is used directly from Foam::Time, it is unaffected diff --git a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObjectFunctionObject.H b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObjectFunctionObject.H index 284aa6c17a..6581cc6e5b 100644 --- a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObjectFunctionObject.H +++ b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObjectFunctionObject.H @@ -27,7 +27,7 @@ Typedef Description FunctionObject wrapper around writeRegisteredObject to allow them to be - created via the functions list within controlDict. + created via the functions entry within controlDict. SourceFiles writeRegisteredObjectFunctionObject.C diff --git a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageFunctionObject/fieldAverageFunctionObject.H b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageFunctionObject/fieldAverageFunctionObject.H index 743768ffce..61cff6515b 100644 --- a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageFunctionObject/fieldAverageFunctionObject.H +++ b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageFunctionObject/fieldAverageFunctionObject.H @@ -27,7 +27,7 @@ Typedef Description FunctionObject wrapper around fieldAverage to allow them to be created - via the functions list within controlDict. + via the functions entry within controlDict. SourceFiles fieldAverageFunctionObject.C diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxFunctionObject.H b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxFunctionObject.H index a5af27af51..a619fb94da 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxFunctionObject.H +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxFunctionObject.H @@ -27,7 +27,7 @@ Typedef Description FunctionObject wrapper around fieldMinMax to allow them to be created via - the functions list within controlDict. + the functions entry within controlDict. SourceFiles fieldMinMaxFunctionObject.C diff --git a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceFunctionObject.H b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceFunctionObject.H index eca172a58d..e37938663b 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceFunctionObject.H +++ b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceFunctionObject.H @@ -27,7 +27,7 @@ Typedef Description FunctionObject wrapper around cellSource to allow it to be - created via the functions list within controlDict. + created via the functions entry within controlDict. SourceFiles cellSourceFunctionObject.C diff --git a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceFunctionObject.H b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceFunctionObject.H index 54d717f870..4810469b3c 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceFunctionObject.H +++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceFunctionObject.H @@ -27,7 +27,7 @@ Typedef Description FunctionObject wrapper around faceSource to allow it to be - created via the functions list within controlDict. + created via the functions entry within controlDict. SourceFiles faceSourceFunctionObject.C diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineFunctionObject.H b/src/postProcessing/functionObjects/field/streamLine/streamLineFunctionObject.H index 051299d875..6905aa0c57 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLineFunctionObject.H +++ b/src/postProcessing/functionObjects/field/streamLine/streamLineFunctionObject.H @@ -27,7 +27,7 @@ Typedef Description FunctionObject wrapper around streamLines to allow them to be created via - the functions list within controlDict. + the functions entry within controlDict. SourceFiles streamLineFunctionObject.C diff --git a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffsFunctionObject.H b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffsFunctionObject.H index 155e1b4537..5d0370a09b 100644 --- a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffsFunctionObject.H +++ b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffsFunctionObject.H @@ -27,7 +27,7 @@ Typedef Description FunctionObject wrapper around forceCoeffs to allow them to be created via - the functions list within controlDict. + the functions entry within controlDict. SourceFiles forceCoeffsFunctionObject.C diff --git a/src/postProcessing/functionObjects/forces/forces/forcesFunctionObject.H b/src/postProcessing/functionObjects/forces/forces/forcesFunctionObject.H index 6cf8bb9a37..5afaf46bed 100644 --- a/src/postProcessing/functionObjects/forces/forces/forcesFunctionObject.H +++ b/src/postProcessing/functionObjects/forces/forces/forcesFunctionObject.H @@ -27,7 +27,7 @@ Typedef Description FunctionObject wrapper around forces to allow them to be created via the - functions list within controlDict. + functions entry within controlDict. SourceFiles forcesFunctionObject.C diff --git a/src/postProcessing/functionObjects/systemCall/systemCallFunctionObject.H b/src/postProcessing/functionObjects/systemCall/systemCallFunctionObject.H index ad4f429cab..2b8feb0f52 100644 --- a/src/postProcessing/functionObjects/systemCall/systemCallFunctionObject.H +++ b/src/postProcessing/functionObjects/systemCall/systemCallFunctionObject.H @@ -27,7 +27,7 @@ Typedef Description FunctionObject wrapper around systemCall to allow them to be created via - the functions list within controlDict. + the functions entry within controlDict. SourceFiles systemCallFunctionObject.C diff --git a/src/postProcessing/functionObjects/utilities/Make/files b/src/postProcessing/functionObjects/utilities/Make/files index 40a33c238d..7eed8f0981 100644 --- a/src/postProcessing/functionObjects/utilities/Make/files +++ b/src/postProcessing/functionObjects/utilities/Make/files @@ -1,3 +1,6 @@ +abortCalculation/abortCalculation.C +abortCalculation/abortCalculationFunctionObject.C + staticPressure/staticPressure.C staticPressure/staticPressureFunctionObject.C diff --git a/src/postProcessing/functionObjects/utilities/abortCalculation/IOabortCalculation.H b/src/postProcessing/functionObjects/utilities/abortCalculation/IOabortCalculation.H new file mode 100644 index 0000000000..5e4fe444e7 --- /dev/null +++ b/src/postProcessing/functionObjects/utilities/abortCalculation/IOabortCalculation.H @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2009-2009 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 + +Typedef + Foam::IOabortCalculation + +Description + Instance of the generic IOOutputFilter for abortCalculation. + +\*---------------------------------------------------------------------------*/ + +#ifndef IOabortCalculation_H +#define IOabortCalculation_H + +#include "abortCalculation.H" +#include "IOOutputFilter.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + typedef IOOutputFilter IOabortCalculation; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/utilities/abortCalculation/abortCalculation.C b/src/postProcessing/functionObjects/utilities/abortCalculation/abortCalculation.C new file mode 100644 index 0000000000..980c41e02f --- /dev/null +++ b/src/postProcessing/functionObjects/utilities/abortCalculation/abortCalculation.C @@ -0,0 +1,159 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2009-2009 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 "abortCalculation.H" +#include "dictionary.H" +#include "error.H" +#include "Time.H" +#include "OSspecific.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(abortCalculation, 0); +} + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template<> +const char* Foam::NamedEnum::names[] = +{ + "noWriteNow", + "writeNow", + "nextWrite" +}; + +const Foam::NamedEnum + Foam::abortCalculation::actionTypeNames_; + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::abortCalculation::removeFile() const +{ + if (isFile(abortFile_)) + { + rm(abortFile_); + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::abortCalculation::abortCalculation +( + const word& name, + const objectRegistry& obr, + const dictionary& dict, + const bool loadFromFiles +) +: + name_(name), + obr_(obr), + abortFile_("$FOAM_CASE/" + name), + action_(nextWrite) +{ + abortFile_.expand(); + read(dict); + + // remove any old files from previous runs + removeFile(); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::abortCalculation::~abortCalculation() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::abortCalculation::read(const dictionary& dict) +{ + word actionName; + + if (dict.found("action")) + { + action_ = actionTypeNames_.read + ( + dict.lookup("action") + ); + } + else + { + action_ = nextWrite; + } + + if (dict.readIfPresent("fileName", abortFile_)) + { + abortFile_.expand(); + } +} + + +void Foam::abortCalculation::execute() +{ + if (isFile(abortFile_)) + { + switch (action_) + { + case noWriteNow : + obr_.time().stopAt(Time::saNoWriteNow); + Info<< "user requested abort - " + "stop immediately without writing data" << endl; + break; + + case writeNow : + obr_.time().stopAt(Time::saWriteNow); + Info<< "user requested abort - " + "stop immediately with writing data" << endl; + break; + + case nextWrite : + obr_.time().stopAt(Time::saNextWrite); + Info<< "user requested abort - " + "stop after next data write" << endl; + break; + } + } +} + + +void Foam::abortCalculation::end() +{ + removeFile(); +} + + +void Foam::abortCalculation::write() +{ + execute(); +} + + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/utilities/abortCalculation/abortCalculation.H b/src/postProcessing/functionObjects/utilities/abortCalculation/abortCalculation.H new file mode 100644 index 0000000000..0bec3530d7 --- /dev/null +++ b/src/postProcessing/functionObjects/utilities/abortCalculation/abortCalculation.H @@ -0,0 +1,168 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2009-2009 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::abortCalculation + +Description + Watches for presence of the named file in the $FOAM_CASE directory + and aborts the calculation if it is present. + + Currently the following action types are supported: + - noWriteNow + - writeNow + - nextWrite + +SourceFiles + abortCalculation.C + IOabortCalculation.H + +\*---------------------------------------------------------------------------*/ + +#ifndef abortCalculation_H +#define abortCalculation_H + +#include "pointFieldFwd.H" +#include "NamedEnum.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes +class objectRegistry; +class dictionary; +class mapPolyMesh; + +/*---------------------------------------------------------------------------*\ + Class abortCalculation Declaration +\*---------------------------------------------------------------------------*/ + +class abortCalculation +{ +public: + + // Public data + + //- Enumeration defining the type of action + enum actionType + { + noWriteNow, /*!< stop immediately without writing data */ + writeNow, /*!< write data and stop immediately */ + nextWrite /*!< stop the next time data are written */ + }; + +private: + + // Private data + + //- Name of the abort file unless otherwise specified + word name_; + + const objectRegistry& obr_; + + //- The fully-qualified name of the abort file + fileName abortFile_; + + //- Action type names + static const NamedEnum actionTypeNames_; + + //- The type of action + actionType action_; + + + // Private Member Functions + + //- Remove abort file. + void removeFile() const; + + //- Disallow default bitwise copy construct + abortCalculation(const abortCalculation&); + + //- Disallow default bitwise assignment + void operator=(const abortCalculation&); + + +public: + + //- Runtime type information + TypeName("abort"); + + + // Constructors + + //- Construct for given objectRegistry and dictionary. + abortCalculation + ( + const word& name, + const objectRegistry&, + const dictionary&, + const bool loadFromFilesUnused = false + ); + + + //- Destructor + virtual ~abortCalculation(); + + + // Member Functions + + //- Return name of the abort file + virtual const word& name() const + { + return name_; + } + + //- Read the dictionary settings + virtual void read(const dictionary&); + + //- Execute, check existence of abort file and take action + virtual void execute(); + + //- Execute at the final time-loop, used for cleanup + virtual void end(); + + //- Execute, check existence of abort file and take action + virtual void write(); + + //- Update for changes of mesh - does nothing + virtual void updateMesh(const mapPolyMesh&) + {} + + //- Update for changes of mesh - does nothing + virtual void movePoints(const pointField&) + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/utilities/abortCalculation/abortCalculationFunctionObject.C b/src/postProcessing/functionObjects/utilities/abortCalculation/abortCalculationFunctionObject.C new file mode 100644 index 0000000000..e67d1f97fb --- /dev/null +++ b/src/postProcessing/functionObjects/utilities/abortCalculation/abortCalculationFunctionObject.C @@ -0,0 +1,43 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2009-2009 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 "abortCalculationFunctionObject.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineNamedTemplateTypeNameAndDebug(abortCalculationFunctionObject, 0); + + addToRunTimeSelectionTable + ( + functionObject, + abortCalculationFunctionObject, + dictionary + ); +} + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/utilities/abortCalculation/abortCalculationFunctionObject.H b/src/postProcessing/functionObjects/utilities/abortCalculation/abortCalculationFunctionObject.H new file mode 100644 index 0000000000..eadedcc296 --- /dev/null +++ b/src/postProcessing/functionObjects/utilities/abortCalculation/abortCalculationFunctionObject.H @@ -0,0 +1,55 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2009-2009 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 + +Typedef + Foam::abortCalculationFunctionObject + +Description + FunctionObject wrapper around abortCalculation to allow it to be created via + the functions entry within controlDict. + +SourceFiles + abortCalculationFunctionObject.C + +\*---------------------------------------------------------------------------*/ + +#ifndef abortCalculationFunctionObject_H +#define abortCalculationFunctionObject_H + +#include "abortCalculation.H" +#include "OutputFilterFunctionObject.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + typedef OutputFilterFunctionObject + abortCalculationFunctionObject; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.H b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.H index 758626798c..a6b3db2e53 100644 --- a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.H +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.H @@ -27,7 +27,7 @@ Typedef Description FunctionObject wrapper around dsmcFields to allow it to be created via - the functions list within controlDict. + the functions entry within controlDict. SourceFiles dsmcFieldsFunctionObject.C diff --git a/src/postProcessing/functionObjects/utilities/staticPressure/staticPressureFunctionObject.H b/src/postProcessing/functionObjects/utilities/staticPressure/staticPressureFunctionObject.H index 0ddb184d22..71c1049ef0 100644 --- a/src/postProcessing/functionObjects/utilities/staticPressure/staticPressureFunctionObject.H +++ b/src/postProcessing/functionObjects/utilities/staticPressure/staticPressureFunctionObject.H @@ -27,7 +27,7 @@ Typedef Description FunctionObject wrapper around staticPressure to allow it to be created via - the functions list within controlDict. + the functions entry within controlDict. SourceFiles staticPressureFunctionObject.C diff --git a/src/sampling/probes/probesFunctionObject.H b/src/sampling/probes/probesFunctionObject.H index 63f52327c8..9bedf137f2 100644 --- a/src/sampling/probes/probesFunctionObject.H +++ b/src/sampling/probes/probesFunctionObject.H @@ -27,7 +27,7 @@ Typedef Description FunctionObject wrapper around probes to allow them to be created via the - functions list within controlDict. + functions entry within controlDict. SourceFiles probesFunctionObject.C diff --git a/src/sampling/sampledSet/sampledSetsFunctionObject/sampledSetsFunctionObject.H b/src/sampling/sampledSet/sampledSetsFunctionObject/sampledSetsFunctionObject.H index b2111ceb61..c021bce3f6 100644 --- a/src/sampling/sampledSet/sampledSetsFunctionObject/sampledSetsFunctionObject.H +++ b/src/sampling/sampledSet/sampledSetsFunctionObject/sampledSetsFunctionObject.H @@ -27,7 +27,7 @@ Typedef Description FunctionObject wrapper around sets to allow them to be created via the - functions list within controlDict. + functions entry within controlDict. SourceFiles sampledSetsFunctionObject.C diff --git a/src/sampling/sampledSurface/sampledSurfacesFunctionObject/sampledSurfacesFunctionObject.H b/src/sampling/sampledSurface/sampledSurfacesFunctionObject/sampledSurfacesFunctionObject.H index 44229e414f..8e318a6e95 100644 --- a/src/sampling/sampledSurface/sampledSurfacesFunctionObject/sampledSurfacesFunctionObject.H +++ b/src/sampling/sampledSurface/sampledSurfacesFunctionObject/sampledSurfacesFunctionObject.H @@ -27,7 +27,7 @@ Typedef Description FunctionObject wrapper around surfaces to allow them to be created via the - functions list within controlDict. + functions entry within controlDict. SourceFiles sampledSurfacesFunctionObject.C From eb8131008569eb565e1b6f15ce068794824f7042 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 11 Nov 2009 09:19:31 +0100 Subject: [PATCH 004/194] fixed typo in docs for porousZone --- src/finiteVolume/cfdTools/general/porousMedia/porousZone.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.H b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.H index 9a3eb151f9..edfbad5efb 100644 --- a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.H +++ b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.H @@ -42,7 +42,7 @@ Description Darcy-Forchheimer (@e d and @e f parameters) @f[ - S = - (\mu \, d \, U + \frac{\rho |U|}{2} \, f) U + S = - (\mu \, d + \frac{\rho |U|}{2} \, f) U @f] From 2c52705cf7db7a300c05d4d40b0f9d69a831a5fe Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 20 Nov 2009 14:37:56 +0100 Subject: [PATCH 005/194] move reconstructPar 'guts' to src/parallel/reconstruct - in preparation for adding an optional '-reconstruct' to a few utilities re-use as -lreconstruct library - move related stuff there too src/decompositionMethods/decompositionMethods -> src/parallel/decompositionMethods - added missing namespace qualifiers --- .../generation/snappyHexMesh/Make/options | 2 +- .../manipulation/renumberMesh/Make/options | 2 +- .../decomposePar/Make/files | 4 +- .../decomposePar/Make/options | 2 +- .../decomposePar/decomposePar.C | 1 - .../decomposePar/domainDecomposition.C | 8 ++-- .../decomposePar/domainDecomposition.H | 17 ++++---- ...ells.C => domainDecompositionDistribute.C} | 2 +- ...omposeMesh.C => domainDecompositionMesh.C} | 4 +- .../decomposePar/fvFieldDecomposer.C | 41 ++++++++----------- .../fvFieldDecomposerDecomposeFields.C | 19 +++------ .../decomposePar/lagrangianFieldDecomposer.C | 10 +---- ...lagrangianFieldDecomposerDecomposeFields.C | 16 ++------ .../decomposePar/pointFieldDecomposer.C | 23 ++++------- .../pointFieldDecomposerDecomposeFields.C | 13 ++---- .../reconstructPar/Make/files | 4 -- .../reconstructPar/Make/options | 6 ++- .../redistributeMeshPar/Make/options | 2 +- .../redistributeMeshPar/redistributeMeshPar.C | 4 +- .../dataConversion/foamToTecplot360/Allwmake | 3 ++ .../graphics/fieldview9Reader/Allwmake | 2 + .../preProcessing/wallFunctionTable/Allwmake | 3 ++ src/Allwmake | 3 +- src/mesh/autoMesh/Make/options | 2 +- src/meshTools/Make/options | 2 +- .../Allwmake | 3 +- .../decompositionMethods/Make/files | 0 .../decompositionMethods/Make/options | 0 .../decompositionMethod/decompositionMethod.C | 0 .../decompositionMethod/decompositionMethod.H | 0 .../geomDecomp/geomDecomp.C | 0 .../geomDecomp/geomDecomp.H | 0 .../hierarchGeomDecomp/hierarchGeomDecomp.C | 0 .../hierarchGeomDecomp/hierarchGeomDecomp.H | 0 .../manualDecomp/manualDecomp.C | 0 .../manualDecomp/manualDecomp.H | 0 .../metisDecomp/metisDecomp.C | 0 .../metisDecomp/metisDecomp.H | 0 .../scotchDecomp/scotchDecomp.C | 0 .../scotchDecomp/scotchDecomp.H | 0 .../simpleGeomDecomp/simpleGeomDecomp.C | 0 .../simpleGeomDecomp/simpleGeomDecomp.H | 0 .../parMetisDecomp/Make/files | 0 .../parMetisDecomp/Make/options | 0 .../parMetisDecomp/parMetisDecomp.C | 0 .../parMetisDecomp/parMetisDecomp.H | 0 .../parMetisDecomp/parMetisDecompTemplates.C | 0 src/parallel/reconstruct/Make/files | 6 +++ src/parallel/reconstruct/Make/options | 7 ++++ .../reconstruct}/fvFieldReconstructor.C | 0 .../reconstruct}/fvFieldReconstructor.H | 4 +- .../fvFieldReconstructorReconstructFields.C | 0 .../reconstruct}/pointFieldReconstructor.C | 0 .../reconstruct}/pointFieldReconstructor.H | 7 +--- ...pointFieldReconstructorReconstructFields.C | 0 .../parallel/reconstruct}/processorMeshes.C | 25 +++++------ .../parallel/reconstruct}/processorMeshes.H | 13 +++--- .../reconstruct}/reconstructLagrangian.H | 0 .../reconstructLagrangianFields.C | 0 .../reconstructLagrangianPositions.C | 0 60 files changed, 117 insertions(+), 143 deletions(-) rename applications/utilities/parallelProcessing/decomposePar/{distributeCells.C => domainDecompositionDistribute.C} (99%) rename applications/utilities/parallelProcessing/decomposePar/{decomposeMesh.C => domainDecompositionMesh.C} (99%) rename src/{decompositionMethods => parallel}/Allwmake (70%) rename src/{decompositionMethods => parallel}/decompositionMethods/Make/files (100%) rename src/{decompositionMethods => parallel}/decompositionMethods/Make/options (100%) rename src/{decompositionMethods => parallel}/decompositionMethods/decompositionMethod/decompositionMethod.C (100%) rename src/{decompositionMethods => parallel}/decompositionMethods/decompositionMethod/decompositionMethod.H (100%) rename src/{decompositionMethods => parallel}/decompositionMethods/geomDecomp/geomDecomp.C (100%) rename src/{decompositionMethods => parallel}/decompositionMethods/geomDecomp/geomDecomp.H (100%) rename src/{decompositionMethods => parallel}/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.C (100%) rename src/{decompositionMethods => parallel}/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.H (100%) rename src/{decompositionMethods => parallel}/decompositionMethods/manualDecomp/manualDecomp.C (100%) rename src/{decompositionMethods => parallel}/decompositionMethods/manualDecomp/manualDecomp.H (100%) rename src/{decompositionMethods => parallel}/decompositionMethods/metisDecomp/metisDecomp.C (100%) rename src/{decompositionMethods => parallel}/decompositionMethods/metisDecomp/metisDecomp.H (100%) rename src/{decompositionMethods => parallel}/decompositionMethods/scotchDecomp/scotchDecomp.C (100%) rename src/{decompositionMethods => parallel}/decompositionMethods/scotchDecomp/scotchDecomp.H (100%) rename src/{decompositionMethods => parallel}/decompositionMethods/simpleGeomDecomp/simpleGeomDecomp.C (100%) rename src/{decompositionMethods => parallel}/decompositionMethods/simpleGeomDecomp/simpleGeomDecomp.H (100%) rename src/{decompositionMethods => parallel}/parMetisDecomp/Make/files (100%) rename src/{decompositionMethods => parallel}/parMetisDecomp/Make/options (100%) rename src/{decompositionMethods => parallel}/parMetisDecomp/parMetisDecomp.C (100%) rename src/{decompositionMethods => parallel}/parMetisDecomp/parMetisDecomp.H (100%) rename src/{decompositionMethods => parallel}/parMetisDecomp/parMetisDecompTemplates.C (100%) create mode 100644 src/parallel/reconstruct/Make/files create mode 100644 src/parallel/reconstruct/Make/options rename {applications/utilities/parallelProcessing/reconstructPar => src/parallel/reconstruct}/fvFieldReconstructor.C (100%) rename {applications/utilities/parallelProcessing/reconstructPar => src/parallel/reconstruct}/fvFieldReconstructor.H (97%) rename {applications/utilities/parallelProcessing/reconstructPar => src/parallel/reconstruct}/fvFieldReconstructorReconstructFields.C (100%) rename {applications/utilities/parallelProcessing/reconstructPar => src/parallel/reconstruct}/pointFieldReconstructor.C (100%) rename {applications/utilities/parallelProcessing/reconstructPar => src/parallel/reconstruct}/pointFieldReconstructor.H (96%) rename {applications/utilities/parallelProcessing/reconstructPar => src/parallel/reconstruct}/pointFieldReconstructorReconstructFields.C (100%) rename {applications/utilities/parallelProcessing/reconstructPar => src/parallel/reconstruct}/processorMeshes.C (91%) rename {applications/utilities/parallelProcessing/reconstructPar => src/parallel/reconstruct}/processorMeshes.H (96%) rename {applications/utilities/parallelProcessing/reconstructPar => src/parallel/reconstruct}/reconstructLagrangian.H (100%) rename {applications/utilities/parallelProcessing/reconstructPar => src/parallel/reconstruct}/reconstructLagrangianFields.C (100%) rename {applications/utilities/parallelProcessing/reconstructPar => src/parallel/reconstruct}/reconstructLagrangianPositions.C (100%) diff --git a/applications/utilities/mesh/generation/snappyHexMesh/Make/options b/applications/utilities/mesh/generation/snappyHexMesh/Make/options index e6db59c825..d2ae5219d3 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/Make/options +++ b/applications/utilities/mesh/generation/snappyHexMesh/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ /* -g -DFULLDEBUG -O0 */ \ - -I$(LIB_SRC)/decompositionMethods/decompositionMethods/lnInclude \ + -I$(LIB_SRC)/parallel/decompositionMethods/lnInclude \ -I$(LIB_SRC)/mesh/autoMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/triSurface/lnInclude \ diff --git a/applications/utilities/mesh/manipulation/renumberMesh/Make/options b/applications/utilities/mesh/manipulation/renumberMesh/Make/options index a8d7971b3b..3b3b8ad48f 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/Make/options +++ b/applications/utilities/mesh/manipulation/renumberMesh/Make/options @@ -2,7 +2,7 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/decompositionMethods/decompositionMethods/lnInclude + -I$(LIB_SRC)/parallel/decompositionMethods/lnInclude EXE_LIBS = \ -lmeshTools \ diff --git a/applications/utilities/parallelProcessing/decomposePar/Make/files b/applications/utilities/parallelProcessing/decomposePar/Make/files index d5b8de23cb..076ecd41bf 100644 --- a/applications/utilities/parallelProcessing/decomposePar/Make/files +++ b/applications/utilities/parallelProcessing/decomposePar/Make/files @@ -1,7 +1,7 @@ -decomposeMesh.C decomposePar.C domainDecomposition.C -distributeCells.C +domainDecompositionMesh.C +domainDecompositionDistribute.C fvFieldDecomposer.C pointFieldDecomposer.C lagrangianFieldDecomposer.C diff --git a/applications/utilities/parallelProcessing/decomposePar/Make/options b/applications/utilities/parallelProcessing/decomposePar/Make/options index a1b8151fdd..58cb426daf 100644 --- a/applications/utilities/parallelProcessing/decomposePar/Make/options +++ b/applications/utilities/parallelProcessing/decomposePar/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -I$(LIB_SRC)/decompositionMethods/decompositionMethods/lnInclude \ + -I$(LIB_SRC)/parallel/decompositionMethods/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index b2e08a6907..f8a8ca01d5 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -106,7 +106,6 @@ int main(int argc, char *argv[]) Info<< "Decomposing mesh " << regionName << nl << endl; } - bool writeCellDist = args.optionFound("cellDist"); bool copyUniform = args.optionFound("copyUniform"); bool decomposeFieldsOnly = args.optionFound("fields"); diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C index d3b9bd0492..392594cc62 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C @@ -38,7 +38,7 @@ License // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void domainDecomposition::mark +void Foam::domainDecomposition::mark ( const labelList& zoneElems, const label zoneI, @@ -66,7 +66,7 @@ void domainDecomposition::mark // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // from components -domainDecomposition::domainDecomposition(const IOobject& io) +Foam::domainDecomposition::domainDecomposition(const IOobject& io) : fvMesh(io), decompositionDict_ @@ -105,13 +105,13 @@ domainDecomposition::domainDecomposition(const IOobject& io) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -domainDecomposition::~domainDecomposition() +Foam::domainDecomposition::~domainDecomposition() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool domainDecomposition::writeDecomposition() +bool Foam::domainDecomposition::writeDecomposition() { Info<< "\nConstructing processor meshes" << endl; diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H index 6ec357a02e..c8b8d9ac3d 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H @@ -26,7 +26,7 @@ Class Foam::domainDecomposition Description - Automatic domain decomposition class for FOAM meshes + Automatic domain decomposition class for finite-volume meshes SourceFiles domainDecomposition.C @@ -42,13 +42,11 @@ SourceFiles #include "PtrList.H" #include "point.H" -#ifndef namespaceFoam -#define namespaceFoam - using namespace Foam; -#endif +namespace Foam +{ /*---------------------------------------------------------------------------*\ - Class domainDecomposition Declaration + Class domainDecomposition Declaration \*---------------------------------------------------------------------------*/ class domainDecomposition @@ -79,7 +77,7 @@ class domainDecomposition // original face. In order to do this properly, all face // indices will be incremented by 1 and the decremented as // necessary t avoid the problem of face number zero having no - // sign. + // sign. labelListList procFaceAddressing_; //- Labels of cells for each processor @@ -165,6 +163,11 @@ public: }; +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif diff --git a/applications/utilities/parallelProcessing/decomposePar/distributeCells.C b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C similarity index 99% rename from applications/utilities/parallelProcessing/decomposePar/distributeCells.C rename to applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C index ffd54ac685..d6e68ea880 100644 --- a/applications/utilities/parallelProcessing/decomposePar/distributeCells.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C @@ -33,7 +33,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -void domainDecomposition::distributeCells() +void Foam::domainDecomposition::distributeCells() { Info<< "\nCalculating distribution of cells" << endl; diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposeMesh.C b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C similarity index 99% rename from applications/utilities/parallelProcessing/decomposePar/decomposeMesh.C rename to applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C index 2e29b243aa..e00130a99c 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposeMesh.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C @@ -40,7 +40,7 @@ Description // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void domainDecomposition::decomposeMesh(const bool filterEmptyPatches) +void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches) { // Decide which cell goes to which processor distributeCells(); @@ -775,3 +775,5 @@ void domainDecomposition::decomposeMesh(const bool filterEmptyPatches) sort(globallySharedPoints_); } } + +// ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/decomposePar/fvFieldDecomposer.C b/applications/utilities/parallelProcessing/decomposePar/fvFieldDecomposer.C index f5a6451c12..ca440ec85c 100644 --- a/applications/utilities/parallelProcessing/decomposePar/fvFieldDecomposer.C +++ b/applications/utilities/parallelProcessing/decomposePar/fvFieldDecomposer.C @@ -26,14 +26,10 @@ License #include "fvFieldDecomposer.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -fvFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer +Foam::fvFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer ( const unallocLabelList& addressingSlice, const label addressingOffset @@ -41,15 +37,15 @@ fvFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer : directAddressing_(addressingSlice) { - forAll (directAddressing_, i) + forAll(directAddressing_, i) { - // Subtract one to align addressing. + // Subtract one to align addressing. directAddressing_[i] -= addressingOffset + 1; } } -fvFieldDecomposer::processorVolPatchFieldDecomposer:: +Foam::fvFieldDecomposer::processorVolPatchFieldDecomposer:: processorVolPatchFieldDecomposer ( const fvMesh& mesh, @@ -61,9 +57,9 @@ processorVolPatchFieldDecomposer const labelList& own = mesh.faceOwner(); const labelList& neighb = mesh.faceNeighbour(); - forAll (directAddressing_, i) + forAll(directAddressing_, i) { - // Subtract one to align addressing. + // Subtract one to align addressing. label ai = mag(addressingSlice[i]) - 1; if (ai < neighb.size()) @@ -97,7 +93,7 @@ processorVolPatchFieldDecomposer } -fvFieldDecomposer::processorSurfacePatchFieldDecomposer:: +Foam::fvFieldDecomposer::processorSurfacePatchFieldDecomposer:: processorSurfacePatchFieldDecomposer ( const unallocLabelList& addressingSlice @@ -106,7 +102,7 @@ processorSurfacePatchFieldDecomposer addressing_(addressingSlice.size()), weights_(addressingSlice.size()) { - forAll (addressing_, i) + forAll(addressing_, i) { addressing_[i].setSize(1); weights_[i].setSize(1); @@ -117,7 +113,7 @@ processorSurfacePatchFieldDecomposer } -fvFieldDecomposer::fvFieldDecomposer +Foam::fvFieldDecomposer::fvFieldDecomposer ( const fvMesh& completeMesh, const fvMesh& procMesh, @@ -147,7 +143,7 @@ fvFieldDecomposer::fvFieldDecomposer static_cast(NULL) ) { - forAll (boundaryAddressing_, patchi) + forAll(boundaryAddressing_, patchi) { if (boundaryAddressing_[patchi] >= 0) { @@ -162,14 +158,14 @@ fvFieldDecomposer::fvFieldDecomposer } else { - processorVolPatchFieldDecomposerPtrs_[patchi] = + processorVolPatchFieldDecomposerPtrs_[patchi] = new processorVolPatchFieldDecomposer ( completeMesh_, procMesh_.boundary()[patchi].patchSlice(faceAddressing_) ); - processorSurfacePatchFieldDecomposerPtrs_[patchi] = + processorSurfacePatchFieldDecomposerPtrs_[patchi] = new processorSurfacePatchFieldDecomposer ( static_cast @@ -187,9 +183,9 @@ fvFieldDecomposer::fvFieldDecomposer // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -fvFieldDecomposer::~fvFieldDecomposer() +Foam::fvFieldDecomposer::~fvFieldDecomposer() { - forAll (patchFieldDecomposerPtrs_, patchi) + forAll(patchFieldDecomposerPtrs_, patchi) { if (patchFieldDecomposerPtrs_[patchi]) { @@ -197,7 +193,7 @@ fvFieldDecomposer::~fvFieldDecomposer() } } - forAll (processorVolPatchFieldDecomposerPtrs_, patchi) + forAll(processorVolPatchFieldDecomposerPtrs_, patchi) { if (processorVolPatchFieldDecomposerPtrs_[patchi]) { @@ -205,7 +201,7 @@ fvFieldDecomposer::~fvFieldDecomposer() } } - forAll (processorSurfacePatchFieldDecomposerPtrs_, patchi) + forAll(processorSurfacePatchFieldDecomposerPtrs_, patchi) { if (processorSurfacePatchFieldDecomposerPtrs_[patchi]) { @@ -214,9 +210,4 @@ fvFieldDecomposer::~fvFieldDecomposer() } } - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/decomposePar/fvFieldDecomposerDecomposeFields.C b/applications/utilities/parallelProcessing/decomposePar/fvFieldDecomposerDecomposeFields.C index 512ea77d1d..afea303fbc 100644 --- a/applications/utilities/parallelProcessing/decomposePar/fvFieldDecomposerDecomposeFields.C +++ b/applications/utilities/parallelProcessing/decomposePar/fvFieldDecomposerDecomposeFields.C @@ -28,16 +28,11 @@ License #include "processorFvPatchField.H" #include "processorFvsPatchField.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -tmp > -fvFieldDecomposer::decomposeField +Foam::tmp > +Foam::fvFieldDecomposer::decomposeField ( const GeometricField& field ) const @@ -106,8 +101,8 @@ fvFieldDecomposer::decomposeField template -tmp > -fvFieldDecomposer::decomposeField +Foam::tmp > +Foam::fvFieldDecomposer::decomposeField ( const GeometricField& field ) const @@ -217,7 +212,7 @@ fvFieldDecomposer::decomposeField template -void fvFieldDecomposer::decomposeFields +void Foam::fvFieldDecomposer::decomposeFields ( const PtrList& fields ) const @@ -229,8 +224,4 @@ void fvFieldDecomposer::decomposeFields } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposer.C b/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposer.C index 5d8a7f4301..200a4fbcce 100644 --- a/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposer.C +++ b/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposer.C @@ -29,16 +29,10 @@ Description #include "lagrangianFieldDecomposer.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // Construct from components -lagrangianFieldDecomposer::lagrangianFieldDecomposer +Foam::lagrangianFieldDecomposer::lagrangianFieldDecomposer ( const polyMesh& mesh, const polyMesh& procMesh, @@ -88,6 +82,4 @@ lagrangianFieldDecomposer::lagrangianFieldDecomposer // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam - // ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposerDecomposeFields.C b/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposerDecomposeFields.C index ae85229808..36a5888d45 100644 --- a/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposerDecomposeFields.C +++ b/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposerDecomposeFields.C @@ -27,15 +27,10 @@ License #include "lagrangianFieldDecomposer.H" #include "IOobjectList.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -void lagrangianFieldDecomposer::readFields +void Foam::lagrangianFieldDecomposer::readFields ( const label cloudI, const IOobjectList& lagrangianObjects, @@ -70,7 +65,8 @@ void lagrangianFieldDecomposer::readFields template -tmp > lagrangianFieldDecomposer::decomposeField +Foam::tmp > +Foam::lagrangianFieldDecomposer::decomposeField ( const word& cloudName, const IOField& field @@ -100,7 +96,7 @@ tmp > lagrangianFieldDecomposer::decomposeField template -void lagrangianFieldDecomposer::decomposeFields +void Foam::lagrangianFieldDecomposer::decomposeFields ( const word& cloudName, const PtrList& fields @@ -116,8 +112,4 @@ void lagrangianFieldDecomposer::decomposeFields } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposer.C b/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposer.C index 9be8a89e55..53c8d59aee 100644 --- a/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposer.C +++ b/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposer.C @@ -26,14 +26,9 @@ License #include "pointFieldDecomposer.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -pointFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer + +Foam::pointFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer ( const pointPatch& completeMeshPatch, const pointPatch& procMeshPatch, @@ -52,7 +47,7 @@ pointFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer const labelList& completeMeshPatchPoints = completeMeshPatch.meshPoints(); - forAll (completeMeshPatchPoints, pointi) + forAll(completeMeshPatchPoints, pointi) { pointMap[completeMeshPatchPoints[pointi]] = pointi; } @@ -61,7 +56,7 @@ pointFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer // patch const labelList& procMeshPatchPoints = procMeshPatch.meshPoints(); - forAll (procMeshPatchPoints, pointi) + forAll(procMeshPatchPoints, pointi) { directAddressing_[pointi] = pointMap[directAddr[procMeshPatchPoints[pointi]]]; @@ -79,7 +74,7 @@ pointFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer } -pointFieldDecomposer::pointFieldDecomposer +Foam::pointFieldDecomposer::pointFieldDecomposer ( const pointMesh& completeMesh, const pointMesh& procMesh, @@ -97,7 +92,7 @@ pointFieldDecomposer::pointFieldDecomposer static_cast(NULL) ) { - forAll (boundaryAddressing_, patchi) + forAll(boundaryAddressing_, patchi) { if (boundaryAddressing_[patchi] >= 0) { @@ -114,9 +109,9 @@ pointFieldDecomposer::pointFieldDecomposer // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -pointFieldDecomposer::~pointFieldDecomposer() +Foam::pointFieldDecomposer::~pointFieldDecomposer() { - forAll (patchFieldDecomposerPtrs_, patchi) + forAll(patchFieldDecomposerPtrs_, patchi) { if (patchFieldDecomposerPtrs_[patchi]) { @@ -128,6 +123,4 @@ pointFieldDecomposer::~pointFieldDecomposer() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam - // ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposerDecomposeFields.C b/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposerDecomposeFields.C index 5bd8144c06..4f22046b39 100644 --- a/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposerDecomposeFields.C +++ b/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposerDecomposeFields.C @@ -28,16 +28,11 @@ License #include "processorPointPatchFields.H" #include "globalPointPatchFields.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -tmp > -pointFieldDecomposer::decomposeField +Foam::tmp > +Foam::pointFieldDecomposer::decomposeField ( const GeometricField& field ) const @@ -117,7 +112,7 @@ pointFieldDecomposer::decomposeField template -void pointFieldDecomposer::decomposeFields +void Foam::pointFieldDecomposer::decomposeFields ( const PtrList& fields ) const @@ -131,6 +126,4 @@ void pointFieldDecomposer::decomposeFields // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam - // ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/reconstructPar/Make/files b/applications/utilities/parallelProcessing/reconstructPar/Make/files index fa4f2375fd..37acabe62d 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/Make/files +++ b/applications/utilities/parallelProcessing/reconstructPar/Make/files @@ -1,7 +1,3 @@ -processorMeshes.C -fvFieldReconstructor.C -pointFieldReconstructor.C -reconstructLagrangianPositions.C reconstructPar.C EXE = $(FOAM_APPBIN)/reconstructPar diff --git a/applications/utilities/parallelProcessing/reconstructPar/Make/options b/applications/utilities/parallelProcessing/reconstructPar/Make/options index b041c31836..cfa9eb8dfc 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/Make/options +++ b/applications/utilities/parallelProcessing/reconstructPar/Make/options @@ -1,9 +1,11 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/lagrangian/basic/lnInclude + -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/parallel/reconstruct/lnInclude EXE_LIBS = \ -lfiniteVolume \ -lgenericPatchFields \ -llagrangian \ - -lmeshTools + -lmeshTools \ + -lreconstruct diff --git a/applications/utilities/parallelProcessing/redistributeMeshPar/Make/options b/applications/utilities/parallelProcessing/redistributeMeshPar/Make/options index c0f7a08776..45ab666e24 100644 --- a/applications/utilities/parallelProcessing/redistributeMeshPar/Make/options +++ b/applications/utilities/parallelProcessing/redistributeMeshPar/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -I$(LIB_SRC)/decompositionMethods/decompositionMethods/lnInclude \ + -I$(LIB_SRC)/parallel/decompositionMethods/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude diff --git a/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C b/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C index cb0aa6469f..20398a16d3 100644 --- a/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C +++ b/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C @@ -33,11 +33,11 @@ Description Balances mesh and writes new mesh to new time directory. Can also work like decomposePar: - + @verbatim mkdir processor0 cp -r constant processor0 mpirun -np ddd redistributeMeshPar -parallel - + @endverbatim \*---------------------------------------------------------------------------*/ #include "Field.H" diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake index 5866aa8f37..bbb2c43436 100755 --- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake +++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake @@ -1,6 +1,9 @@ #!/bin/sh +cd ${0%/*} || exit 1 # run from this directory if [ "$TEC_360_2009" ] then wmake fi + +# ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/postProcessing/graphics/fieldview9Reader/Allwmake b/applications/utilities/postProcessing/graphics/fieldview9Reader/Allwmake index a2dc313fb1..e4825541df 100755 --- a/applications/utilities/postProcessing/graphics/fieldview9Reader/Allwmake +++ b/applications/utilities/postProcessing/graphics/fieldview9Reader/Allwmake @@ -6,3 +6,5 @@ # then # wmake fieldview9Reader # fi + +# ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/preProcessing/wallFunctionTable/Allwmake b/applications/utilities/preProcessing/wallFunctionTable/Allwmake index 57795a542f..55a6cbd37f 100755 --- a/applications/utilities/preProcessing/wallFunctionTable/Allwmake +++ b/applications/utilities/preProcessing/wallFunctionTable/Allwmake @@ -1,5 +1,8 @@ #!/bin/sh +cd ${0%/*} || exit 1 # run from this directory +set -x wmake libso tabulatedWallFunction wmake +# ----------------------------------------------------------------- end-of-file diff --git a/src/Allwmake b/src/Allwmake index e4724a1e8f..6592f244d7 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -27,7 +27,7 @@ wmake libso edgeMesh wmake libso surfMesh # Decomposition methods needed by meshTools -decompositionMethods/Allwmake +wmake libso parallel/decompositionMethods wmake libso meshTools wmake libso finiteVolume @@ -46,6 +46,7 @@ thermophysicalModels/Allwmake transportModels/Allwmake turbulenceModels/Allwmake lagrangian/Allwmake +parallel/Allwmake postProcessing/Allwmake conversion/Allwmake mesh/Allwmake diff --git a/src/mesh/autoMesh/Make/options b/src/mesh/autoMesh/Make/options index f1687b7eb1..573d0007c1 100644 --- a/src/mesh/autoMesh/Make/options +++ b/src/mesh/autoMesh/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -I$(LIB_SRC)/decompositionMethods/decompositionMethods/lnInclude \ + -I$(LIB_SRC)/parallel/decompositionMethods/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ diff --git a/src/meshTools/Make/options b/src/meshTools/Make/options index 1d1560eb5a..0ff2202926 100644 --- a/src/meshTools/Make/options +++ b/src/meshTools/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/triSurface/lnInclude \ - -I$(LIB_SRC)/decompositionMethods/decompositionMethods/lnInclude \ + -I$(LIB_SRC)/parallel/decompositionMethods/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude LIB_LIBS = \ diff --git a/src/decompositionMethods/Allwmake b/src/parallel/Allwmake similarity index 70% rename from src/decompositionMethods/Allwmake rename to src/parallel/Allwmake index f71ea71b86..34d323251a 100755 --- a/src/decompositionMethods/Allwmake +++ b/src/parallel/Allwmake @@ -3,10 +3,11 @@ cd ${0%/*} || exit 1 # run from this directory set -x wmake libso decompositionMethods +wmake libso reconstruct if [ -d "$FOAM_MPI_LIBBIN" ] then - (WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB; wmake libso parMetisDecomp) + ( WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB; wmake libso parMetisDecomp ) fi # ----------------------------------------------------------------- end-of-file diff --git a/src/decompositionMethods/decompositionMethods/Make/files b/src/parallel/decompositionMethods/Make/files similarity index 100% rename from src/decompositionMethods/decompositionMethods/Make/files rename to src/parallel/decompositionMethods/Make/files diff --git a/src/decompositionMethods/decompositionMethods/Make/options b/src/parallel/decompositionMethods/Make/options similarity index 100% rename from src/decompositionMethods/decompositionMethods/Make/options rename to src/parallel/decompositionMethods/Make/options diff --git a/src/decompositionMethods/decompositionMethods/decompositionMethod/decompositionMethod.C b/src/parallel/decompositionMethods/decompositionMethod/decompositionMethod.C similarity index 100% rename from src/decompositionMethods/decompositionMethods/decompositionMethod/decompositionMethod.C rename to src/parallel/decompositionMethods/decompositionMethod/decompositionMethod.C diff --git a/src/decompositionMethods/decompositionMethods/decompositionMethod/decompositionMethod.H b/src/parallel/decompositionMethods/decompositionMethod/decompositionMethod.H similarity index 100% rename from src/decompositionMethods/decompositionMethods/decompositionMethod/decompositionMethod.H rename to src/parallel/decompositionMethods/decompositionMethod/decompositionMethod.H diff --git a/src/decompositionMethods/decompositionMethods/geomDecomp/geomDecomp.C b/src/parallel/decompositionMethods/geomDecomp/geomDecomp.C similarity index 100% rename from src/decompositionMethods/decompositionMethods/geomDecomp/geomDecomp.C rename to src/parallel/decompositionMethods/geomDecomp/geomDecomp.C diff --git a/src/decompositionMethods/decompositionMethods/geomDecomp/geomDecomp.H b/src/parallel/decompositionMethods/geomDecomp/geomDecomp.H similarity index 100% rename from src/decompositionMethods/decompositionMethods/geomDecomp/geomDecomp.H rename to src/parallel/decompositionMethods/geomDecomp/geomDecomp.H diff --git a/src/decompositionMethods/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.C b/src/parallel/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.C similarity index 100% rename from src/decompositionMethods/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.C rename to src/parallel/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.C diff --git a/src/decompositionMethods/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.H b/src/parallel/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.H similarity index 100% rename from src/decompositionMethods/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.H rename to src/parallel/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.H diff --git a/src/decompositionMethods/decompositionMethods/manualDecomp/manualDecomp.C b/src/parallel/decompositionMethods/manualDecomp/manualDecomp.C similarity index 100% rename from src/decompositionMethods/decompositionMethods/manualDecomp/manualDecomp.C rename to src/parallel/decompositionMethods/manualDecomp/manualDecomp.C diff --git a/src/decompositionMethods/decompositionMethods/manualDecomp/manualDecomp.H b/src/parallel/decompositionMethods/manualDecomp/manualDecomp.H similarity index 100% rename from src/decompositionMethods/decompositionMethods/manualDecomp/manualDecomp.H rename to src/parallel/decompositionMethods/manualDecomp/manualDecomp.H diff --git a/src/decompositionMethods/decompositionMethods/metisDecomp/metisDecomp.C b/src/parallel/decompositionMethods/metisDecomp/metisDecomp.C similarity index 100% rename from src/decompositionMethods/decompositionMethods/metisDecomp/metisDecomp.C rename to src/parallel/decompositionMethods/metisDecomp/metisDecomp.C diff --git a/src/decompositionMethods/decompositionMethods/metisDecomp/metisDecomp.H b/src/parallel/decompositionMethods/metisDecomp/metisDecomp.H similarity index 100% rename from src/decompositionMethods/decompositionMethods/metisDecomp/metisDecomp.H rename to src/parallel/decompositionMethods/metisDecomp/metisDecomp.H diff --git a/src/decompositionMethods/decompositionMethods/scotchDecomp/scotchDecomp.C b/src/parallel/decompositionMethods/scotchDecomp/scotchDecomp.C similarity index 100% rename from src/decompositionMethods/decompositionMethods/scotchDecomp/scotchDecomp.C rename to src/parallel/decompositionMethods/scotchDecomp/scotchDecomp.C diff --git a/src/decompositionMethods/decompositionMethods/scotchDecomp/scotchDecomp.H b/src/parallel/decompositionMethods/scotchDecomp/scotchDecomp.H similarity index 100% rename from src/decompositionMethods/decompositionMethods/scotchDecomp/scotchDecomp.H rename to src/parallel/decompositionMethods/scotchDecomp/scotchDecomp.H diff --git a/src/decompositionMethods/decompositionMethods/simpleGeomDecomp/simpleGeomDecomp.C b/src/parallel/decompositionMethods/simpleGeomDecomp/simpleGeomDecomp.C similarity index 100% rename from src/decompositionMethods/decompositionMethods/simpleGeomDecomp/simpleGeomDecomp.C rename to src/parallel/decompositionMethods/simpleGeomDecomp/simpleGeomDecomp.C diff --git a/src/decompositionMethods/decompositionMethods/simpleGeomDecomp/simpleGeomDecomp.H b/src/parallel/decompositionMethods/simpleGeomDecomp/simpleGeomDecomp.H similarity index 100% rename from src/decompositionMethods/decompositionMethods/simpleGeomDecomp/simpleGeomDecomp.H rename to src/parallel/decompositionMethods/simpleGeomDecomp/simpleGeomDecomp.H diff --git a/src/decompositionMethods/parMetisDecomp/Make/files b/src/parallel/parMetisDecomp/Make/files similarity index 100% rename from src/decompositionMethods/parMetisDecomp/Make/files rename to src/parallel/parMetisDecomp/Make/files diff --git a/src/decompositionMethods/parMetisDecomp/Make/options b/src/parallel/parMetisDecomp/Make/options similarity index 100% rename from src/decompositionMethods/parMetisDecomp/Make/options rename to src/parallel/parMetisDecomp/Make/options diff --git a/src/decompositionMethods/parMetisDecomp/parMetisDecomp.C b/src/parallel/parMetisDecomp/parMetisDecomp.C similarity index 100% rename from src/decompositionMethods/parMetisDecomp/parMetisDecomp.C rename to src/parallel/parMetisDecomp/parMetisDecomp.C diff --git a/src/decompositionMethods/parMetisDecomp/parMetisDecomp.H b/src/parallel/parMetisDecomp/parMetisDecomp.H similarity index 100% rename from src/decompositionMethods/parMetisDecomp/parMetisDecomp.H rename to src/parallel/parMetisDecomp/parMetisDecomp.H diff --git a/src/decompositionMethods/parMetisDecomp/parMetisDecompTemplates.C b/src/parallel/parMetisDecomp/parMetisDecompTemplates.C similarity index 100% rename from src/decompositionMethods/parMetisDecomp/parMetisDecompTemplates.C rename to src/parallel/parMetisDecomp/parMetisDecompTemplates.C diff --git a/src/parallel/reconstruct/Make/files b/src/parallel/reconstruct/Make/files new file mode 100644 index 0000000000..64023e9573 --- /dev/null +++ b/src/parallel/reconstruct/Make/files @@ -0,0 +1,6 @@ +processorMeshes.C +fvFieldReconstructor.C +pointFieldReconstructor.C +reconstructLagrangianPositions.C + +LIB = $(FOAM_LIBBIN)/libreconstruct diff --git a/src/parallel/reconstruct/Make/options b/src/parallel/reconstruct/Make/options new file mode 100644 index 0000000000..71546225cf --- /dev/null +++ b/src/parallel/reconstruct/Make/options @@ -0,0 +1,7 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/lagrangian/basic/lnInclude + +LIB_LIBS = \ + -lfiniteVolume \ + -llagrangian diff --git a/applications/utilities/parallelProcessing/reconstructPar/fvFieldReconstructor.C b/src/parallel/reconstruct/fvFieldReconstructor.C similarity index 100% rename from applications/utilities/parallelProcessing/reconstructPar/fvFieldReconstructor.C rename to src/parallel/reconstruct/fvFieldReconstructor.C diff --git a/applications/utilities/parallelProcessing/reconstructPar/fvFieldReconstructor.H b/src/parallel/reconstruct/fvFieldReconstructor.H similarity index 97% rename from applications/utilities/parallelProcessing/reconstructPar/fvFieldReconstructor.H rename to src/parallel/reconstruct/fvFieldReconstructor.H index b9f2fb4bf6..0e3758cafc 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/fvFieldReconstructor.H +++ b/src/parallel/reconstruct/fvFieldReconstructor.H @@ -26,7 +26,7 @@ Class Foam::fvFieldReconstructor Description - FV volume and surface field reconstructor. + Finite volume reconstructor for volume and surface fields. SourceFiles fvFieldReconstructor.C @@ -50,7 +50,7 @@ namespace Foam /*---------------------------------------------------------------------------*\ - Class fvFieldReconstructor Declaration + Class fvFieldReconstructor Declaration \*---------------------------------------------------------------------------*/ class fvFieldReconstructor diff --git a/applications/utilities/parallelProcessing/reconstructPar/fvFieldReconstructorReconstructFields.C b/src/parallel/reconstruct/fvFieldReconstructorReconstructFields.C similarity index 100% rename from applications/utilities/parallelProcessing/reconstructPar/fvFieldReconstructorReconstructFields.C rename to src/parallel/reconstruct/fvFieldReconstructorReconstructFields.C diff --git a/applications/utilities/parallelProcessing/reconstructPar/pointFieldReconstructor.C b/src/parallel/reconstruct/pointFieldReconstructor.C similarity index 100% rename from applications/utilities/parallelProcessing/reconstructPar/pointFieldReconstructor.C rename to src/parallel/reconstruct/pointFieldReconstructor.C diff --git a/applications/utilities/parallelProcessing/reconstructPar/pointFieldReconstructor.H b/src/parallel/reconstruct/pointFieldReconstructor.H similarity index 96% rename from applications/utilities/parallelProcessing/reconstructPar/pointFieldReconstructor.H rename to src/parallel/reconstruct/pointFieldReconstructor.H index 34b458913c..7ab04c3d41 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/pointFieldReconstructor.H +++ b/src/parallel/reconstruct/pointFieldReconstructor.H @@ -47,7 +47,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class pointFieldReconstructor Declaration + Class pointFieldReconstructor Declaration \*---------------------------------------------------------------------------*/ class pointFieldReconstructor @@ -73,10 +73,7 @@ class pointFieldReconstructor // Private Member Functions //- Disallow default bitwise copy construct - pointFieldReconstructor - ( - const pointFieldReconstructor& - ); + pointFieldReconstructor(const pointFieldReconstructor&); //- Disallow default bitwise assignment void operator=(const pointFieldReconstructor&); diff --git a/applications/utilities/parallelProcessing/reconstructPar/pointFieldReconstructorReconstructFields.C b/src/parallel/reconstruct/pointFieldReconstructorReconstructFields.C similarity index 100% rename from applications/utilities/parallelProcessing/reconstructPar/pointFieldReconstructorReconstructFields.C rename to src/parallel/reconstruct/pointFieldReconstructorReconstructFields.C diff --git a/applications/utilities/parallelProcessing/reconstructPar/processorMeshes.C b/src/parallel/reconstruct/processorMeshes.C similarity index 91% rename from applications/utilities/parallelProcessing/reconstructPar/processorMeshes.C rename to src/parallel/reconstruct/processorMeshes.C index 8c77b9f855..fb6ccbed5e 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/processorMeshes.C +++ b/src/parallel/reconstruct/processorMeshes.C @@ -127,8 +127,8 @@ Foam::processorMeshes::processorMeshes const word& meshName ) : - databases_(databases), meshName_(meshName), + databases_(databases), meshes_(databases.size()), pointProcAddressing_(databases.size()), faceProcAddressing_(databases.size()), @@ -165,20 +165,17 @@ Foam::fvMesh::readUpdateState Foam::processorMeshes::readUpdate() { stat = procStat; } - else + else if (stat != procStat) { - if (stat != procStat) - { - FatalErrorIn("processorMeshes::readUpdate()") - << "Processor " << procI - << " has a different polyMesh at time " - << databases_[procI].timeName() - << " compared to any previous processors." << nl - << "Please check time " << databases_[procI].timeName() - << " directories on all processors for consistent" - << " mesh files." - << exit(FatalError); - } + FatalErrorIn("processorMeshes::readUpdate()") + << "Processor " << procI + << " has a different polyMesh at time " + << databases_[procI].timeName() + << " compared to any previous processors." << nl + << "Please check time " << databases_[procI].timeName() + << " directories on all processors for consistent" + << " mesh files." + << exit(FatalError); } } diff --git a/applications/utilities/parallelProcessing/reconstructPar/processorMeshes.H b/src/parallel/reconstruct/processorMeshes.H similarity index 96% rename from applications/utilities/parallelProcessing/reconstructPar/processorMeshes.H rename to src/parallel/reconstruct/processorMeshes.H index d83c3d6216..ab39bc7a3c 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/processorMeshes.H +++ b/src/parallel/reconstruct/processorMeshes.H @@ -55,11 +55,11 @@ class processorMeshes { // Private data + const word meshName_; + //- Processor databases PtrList