diff --git a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C index 37d4a04f2221e72a6f59a7c505062bf4f3678784..b47a15a6e16a3a3ce2797df5352a9085324bf245 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C +++ b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -69,6 +69,11 @@ int main(int argc, char *argv[]) "noLagrangian", "skip reconstructing lagrangian positions and fields" ); + argList::addBoolOption + ( + "newTimes", + "only reconstruct new times (i.e. that do not exist already)" + ); # include "setRootCase.H" # include "createTime.H" @@ -95,6 +100,10 @@ int main(int argc, char *argv[]) args.optionLookup("lagrangianFields")() >> selectedLagrangianFields; } + + const bool newTimes = args.optionFound("newTimes"); + + // determine the processor count directly label nProcs = 0; while (isDir(args.path()/(word("processor") + name(nProcs)))) @@ -134,6 +143,8 @@ int main(int argc, char *argv[]) args ); + instantList masterTimeDirs = runTime.times(); + if (timeDirs.empty()) { FatalErrorIn(args.executable()) @@ -165,6 +176,14 @@ int main(int argc, char *argv[]) // Loop over all times forAll(timeDirs, timeI) { + if (newTimes && findIndex(masterTimeDirs, timeDirs[timeI]) != -1) + { + Info<< "Skipping time " << timeDirs[timeI].name() + << endl << endl; + continue; + } + + // Set time for global database runTime.setTime(timeDirs[timeI], timeI); diff --git a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.C b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.C index a5bb2a889af2950631de942e3bfd1c0c93c21066..22c49df9c07b5f1e1b7d38aaabc4ba0920eef575 100644 --- a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.C +++ b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.C @@ -112,13 +112,9 @@ Foam::dynamicCodeContext::dynamicCodeContext(const dictionary& dict) addLineDirective(include_, includePtr->startLineNumber(), dict.name()); } - // Do not add line directive to options_ (Make/options) since at it is a - // single line at this point. Can be fixed. + // Do not add line directive to options_ (Make/options) and libs since + // they are preprocessed as a single line at this point. Can be fixed. - if (libsPtr) - { - addLineDirective(libs_, libsPtr->startLineNumber(), dict.name()); - } if (localPtr) { addLineDirective(localCode_, localPtr->startLineNumber(), dict.name()); diff --git a/src/OpenFOAM/primitives/functions/DataEntry/Table/TableBase.C b/src/OpenFOAM/primitives/functions/DataEntry/Table/TableBase.C index 4b52d26699939fb872ab7e68244303b7f1fc32b9..14d2fc210d81c1e12214e397df7e6513fe0cc40b 100644 --- a/src/OpenFOAM/primitives/functions/DataEntry/Table/TableBase.C +++ b/src/OpenFOAM/primitives/functions/DataEntry/Table/TableBase.C @@ -25,6 +25,7 @@ License #include "TableBase.H" #include "Time.H" +#include "interpolationWeights.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/functions/DataEntry/Table/TableBase.H b/src/OpenFOAM/primitives/functions/DataEntry/Table/TableBase.H index ce4c3d2287960883c8f2cc63457d871467dacd0b..bd98858d715595d84e7f5447690657c077bfc2ce 100644 --- a/src/OpenFOAM/primitives/functions/DataEntry/Table/TableBase.H +++ b/src/OpenFOAM/primitives/functions/DataEntry/Table/TableBase.H @@ -38,7 +38,6 @@ SourceFiles #include "DataEntry.H" #include "Tuple2.H" #include "dimensionSet.H" -#include "interpolationWeights.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -55,6 +54,8 @@ Ostream& operator<< const TableBase<Type>& ); +class interpolationWeights; + /*---------------------------------------------------------------------------*\ Class TableBase Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/primitives/hashes/Hash/Hash.H b/src/OpenFOAM/primitives/hashes/Hash/Hash.H index e5fbb2823be856f5ddd981b560563d1f1f42c921..e4f67371da3eb9a6eddd8234b6b3d3030d4cc26b 100644 --- a/src/OpenFOAM/primitives/hashes/Hash/Hash.H +++ b/src/OpenFOAM/primitives/hashes/Hash/Hash.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,6 +37,8 @@ Description #include "uLabel.H" #include "Hasher.H" #include "pTraits.H" +#include "fileName.H" +#include "wordRe.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -99,6 +101,107 @@ public: }; +//- Hash specialization for hashing strings +template<> +class Hash<Foam::string> +{ +public: + + Hash() + {} + + unsigned operator()(const string& p, unsigned seed) const + { + return string::hash()(p, seed); + } + unsigned operator()(const string& p) const + { + return string::hash()(p); + } +}; + + +//- Hash specialization for hashing words +template<> +class Hash<Foam::word> +{ +public: + + Hash() + {} + + unsigned operator()(const word& p, unsigned seed) const + { + return word::hash()(p, seed); + } + unsigned operator()(const word& p) const + { + return word::hash()(p); + } +}; + + +//- Hash specialization for hashing fileNames +template<> +class Hash<Foam::fileName> +{ +public: + + Hash() + {} + + unsigned operator()(const fileName& p, unsigned seed) const + { + return fileName::hash()(p, seed); + } + unsigned operator()(const fileName& p) const + { + return fileName::hash()(p); + } +}; + + +//- Hash specialization for hashing wordRes +template<> +class Hash<Foam::wordRe> +{ +public: + + Hash() + {} + + unsigned operator()(const wordRe& p, unsigned seed) const + { + return wordRe::hash()(p, seed); + } + unsigned operator()(const wordRe& p) const + { + return wordRe::hash()(p); + } +}; + + +//- Hash specialization for hashing keyTypes +template<> +class Hash<Foam::keyType> +{ +public: + + Hash() + {} + + unsigned operator()(const keyType& p, unsigned seed) const + { + return keyType::hash()(p, seed); + } + unsigned operator()(const keyType& p) const + { + return keyType::hash()(p); + } +}; + + + //- Hash specialization for hashing pointer addresses. // Treat a pointer like a long. // This should work for both 32-bit and 64-bit pointers. diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C index 9ba601d8532fcef38aa2e6296abe19a521ed200f..86cd31df927545314a37905493e11fd35f34ab96 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -181,6 +181,7 @@ void Foam::activeBaffleVelocityFvPatchVectorField::autoMap ).neighbFvPatch().patch().patchSlice(areas); } + void Foam::activeBaffleVelocityFvPatchVectorField::rmap ( const fvPatchVectorField& ptf,