diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict index 78cdb47ad0..99d1d5dcfb 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict @@ -149,6 +149,7 @@ castellatedMeshControls patchInfo { type patch; + inGroups (meshedPatches); } //- Optional angle to detect small-large cell situation diff --git a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctreeName.C b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctreeName.C index 4e842cb28f..29bc6634aa 100644 --- a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctreeName.C +++ b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctreeName.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 @@ -27,6 +27,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::dynamicIndexedOctreeName, 0); +namespace Foam +{ +defineTypeNameAndDebug(dynamicIndexedOctreeName, 0); +} + // ************************************************************************* // diff --git a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicTreeDataPoint.C b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicTreeDataPoint.C index 05b37e2f76..ebc93a63c7 100644 --- a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicTreeDataPoint.C +++ b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicTreeDataPoint.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 @@ -29,7 +29,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::dynamicTreeDataPoint, 0); +namespace Foam +{ +defineTypeNameAndDebug(dynamicTreeDataPoint, 0); +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/algorithms/indexedOctree/indexedOctreeName.C b/src/OpenFOAM/algorithms/indexedOctree/indexedOctreeName.C index 26574b0089..1f1ce408d3 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/indexedOctreeName.C +++ b/src/OpenFOAM/algorithms/indexedOctree/indexedOctreeName.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 @@ -27,6 +27,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::indexedOctreeName, 0); +namespace Foam +{ +defineTypeNameAndDebug(indexedOctreeName, 0); +} + // ************************************************************************* // diff --git a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C index 1bb57a44d7..e4d78fc83d 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C +++ b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.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 @@ -29,7 +29,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::treeDataCell, 0); +namespace Foam +{ +defineTypeNameAndDebug(treeDataCell, 0); +} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTableCore.C b/src/OpenFOAM/containers/HashTables/HashTable/HashTableCore.C index 7058ac6139..58fcdf27b1 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTableCore.C +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTableCore.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 @@ -28,7 +28,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::HashTableCore, 0); +namespace Foam +{ +defineTypeNameAndDebug(HashTableCore, 0); +} const Foam::label Foam::HashTableCore::maxTableSize ( @@ -38,6 +41,7 @@ const Foam::label Foam::HashTableCore::maxTableSize ) ); + // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // Foam::label Foam::HashTableCore::canonicalSize(const label size) diff --git a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTableCore.C b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTableCore.C index 380317fdc1..760839b0c6 100644 --- a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTableCore.C +++ b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTableCore.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 @@ -27,6 +27,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::StaticHashTableCore, 0); +namespace Foam +{ +defineTypeNameAndDebug(StaticHashTableCore, 0); +} + // ************************************************************************* // diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedListCore.C b/src/OpenFOAM/containers/Lists/PackedList/PackedListCore.C index 9b69437698..92f3b3603d 100644 --- a/src/OpenFOAM/containers/Lists/PackedList/PackedListCore.C +++ b/src/OpenFOAM/containers/Lists/PackedList/PackedListCore.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 @@ -27,7 +27,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::PackedListCore, 0); +namespace Foam +{ +defineTypeNameAndDebug(PackedListCore, 0); +} // ************************************************************************* // diff --git a/src/OpenFOAM/containers/Lists/SortableList/ParSortableListName.C b/src/OpenFOAM/containers/Lists/SortableList/ParSortableListName.C index 654633f7cc..8818406b15 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/ParSortableListName.C +++ b/src/OpenFOAM/containers/Lists/SortableList/ParSortableListName.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 @@ -27,6 +27,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::ParSortableListName, 0); +namespace Foam +{ +defineTypeNameAndDebug(ParSortableListName, 0); +} + // ************************************************************************* // diff --git a/src/OpenFOAM/db/CallbackRegistry/CallbackRegistryName.C b/src/OpenFOAM/db/CallbackRegistry/CallbackRegistryName.C index 313dafb491..6251032e8b 100644 --- a/src/OpenFOAM/db/CallbackRegistry/CallbackRegistryName.C +++ b/src/OpenFOAM/db/CallbackRegistry/CallbackRegistryName.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 @@ -27,6 +27,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::CallbackRegistryName, 0); +namespace Foam +{ +defineTypeNameAndDebug(CallbackRegistryName, 0); +} + // ************************************************************************* // diff --git a/src/OpenFOAM/db/IOobject/IOobject.C b/src/OpenFOAM/db/IOobject/IOobject.C index 47e14b0577..a603a76dd9 100644 --- a/src/OpenFOAM/db/IOobject/IOobject.C +++ b/src/OpenFOAM/db/IOobject/IOobject.C @@ -29,7 +29,11 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::IOobject, 0); +namespace Foam +{ +defineTypeNameAndDebug(IOobject, 0); +} + // * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C index a21be89f8a..75dbaa8dd4 100644 --- a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C +++ b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.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 @@ -29,12 +29,15 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::IOdictionary, 0); +namespace Foam +{ +defineTypeNameAndDebug(IOdictionary, 0); -bool Foam::IOdictionary::writeDictionaries +bool IOdictionary::writeDictionaries ( - Foam::debug::infoSwitch("writeDictionaries", 0) + debug::infoSwitch("writeDictionaries", 0) ); +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/db/IOstreams/Fstreams/IFstream.C b/src/OpenFOAM/db/IOstreams/Fstreams/IFstream.C index fb2480f413..3c62255d97 100644 --- a/src/OpenFOAM/db/IOstreams/Fstreams/IFstream.C +++ b/src/OpenFOAM/db/IOstreams/Fstreams/IFstream.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 @@ -29,7 +29,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::IFstream, 0); +namespace Foam +{ +defineTypeNameAndDebug(IFstream, 0); +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/db/IOstreams/Fstreams/OFstream.C b/src/OpenFOAM/db/IOstreams/Fstreams/OFstream.C index da9fc290a2..3feefdaf40 100644 --- a/src/OpenFOAM/db/IOstreams/Fstreams/OFstream.C +++ b/src/OpenFOAM/db/IOstreams/Fstreams/OFstream.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 @@ -29,7 +29,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::OFstream, 0); +namespace Foam +{ +defineTypeNameAndDebug(OFstream, 0); +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/Pstream.C b/src/OpenFOAM/db/IOstreams/Pstreams/Pstream.C index 7a1ebeb9ac..314651c629 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/Pstream.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/Pstream.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 @@ -27,13 +27,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::Pstream, 0); - - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // +namespace Foam +{ +defineTypeNameAndDebug(Pstream, 0); +} // ************************************************************************* // diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C index d0a3d87276..2f1611a5e2 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C @@ -30,10 +30,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::UPstream, 0); - namespace Foam { + defineTypeNameAndDebug(UPstream, 0); + template<> const char* Foam::NamedEnum < diff --git a/src/OpenFOAM/db/IOstreams/token/token.C b/src/OpenFOAM/db/IOstreams/token/token.C index 53eadb70ed..d90f7f2b20 100644 --- a/src/OpenFOAM/db/IOstreams/token/token.C +++ b/src/OpenFOAM/db/IOstreams/token/token.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 @@ -27,11 +27,14 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -const char* const Foam::token::typeName = "token"; -Foam::token Foam::token::undefinedToken; +namespace Foam +{ +const char* const token::typeName = "token"; +token token::undefinedToken; -defineTypeNameAndDebug(Foam::token::compound, 0); -defineRunTimeSelectionTable(Foam::token::compound, Istream); +defineTypeNameAndDebug(token::compound, 0); +defineRunTimeSelectionTable(token::compound, Istream); +} // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index b589dfc883..1bcf42e5dc 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -31,10 +31,10 @@ License // * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::Time, 0); - namespace Foam { + defineTypeNameAndDebug(Time, 0); + template<> const char* Foam::NamedEnum < diff --git a/src/OpenFOAM/db/Time/TimeIO.C b/src/OpenFOAM/db/Time/TimeIO.C index 1637d35bfc..cace29f02f 100644 --- a/src/OpenFOAM/db/Time/TimeIO.C +++ b/src/OpenFOAM/db/Time/TimeIO.C @@ -25,6 +25,7 @@ License #include "Time.H" #include "Pstream.H" +#include "simpleObjectRegistry.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -37,6 +38,86 @@ void Foam::Time::readDict() setEnv("FOAM_APPLICATION", application, false); } + + // Check for local switches and settings + if (controlDict_.found("DebugSwitches")) + { + simpleObjectRegistry& objects = debug::debugObjects(); + const dictionary& localSettings = controlDict_.subDict("DebugSwitches"); + forAllConstIter(dictionary, localSettings, iter) + { + const word& name = iter().keyword(); + simpleObjectRegistry::iterator fnd = objects.find(name); + if (fnd != objects.end()) + { + Info<< controlDict_.name() << " : overriding debug switch " + << name << endl; + + if (iter().isDict()) + { + OStringStream os(IOstream::ASCII); + os << iter().dict(); + IStringStream is(os.str()); + fnd()->readData(is); + } + else + { + fnd()->readData(iter().stream()); + } + } + } + } + if (controlDict_.found("DimensionSets")) + { + dictionary dict(Foam::dimensionSystems()); + dict.merge(controlDict_.subDict("DimensionSets")); + + simpleObjectRegistry& objects = debug::dimensionSetObjects(); + simpleObjectRegistry::iterator fnd = objects.find("DimensionSets"); + if (fnd != objects.end()) + { + Info<< controlDict_.name() << " : overriding DimensionSets" << endl; + + OStringStream os(IOstream::ASCII); + os << dict; + IStringStream is(os.str()); + fnd()->readData(is); + } + } + if (controlDict_.found("OptimisationSwitches")) + { + simpleObjectRegistry& objects = debug::optimisationObjects(); + const dictionary& localSettings = controlDict_.subDict + ( + "OptimisationSwitches" + ); + forAllConstIter(dictionary, localSettings, iter) + { + const word& name = iter().keyword(); + simpleObjectRegistry::iterator fnd = objects.find(name); + if (fnd != objects.end()) + { + Info<< controlDict_.name() + << " : overriding optimisation switch " + << name << endl; + + if (iter().isDict()) + { + OStringStream os(IOstream::ASCII); + os << iter().dict(); + IStringStream is(os.str()); + fnd()->readData(is); + } + else + { + fnd()->readData(iter().stream()); + } + } + } + } + + + if (!deltaTchanged_) { deltaT_ = readScalar(controlDict_.lookup("deltaT")); diff --git a/src/OpenFOAM/db/dictionary/dictionary.C b/src/OpenFOAM/db/dictionary/dictionary.C index 2a2ae85253..e6f7c6c7db 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.C +++ b/src/OpenFOAM/db/dictionary/dictionary.C @@ -31,9 +31,11 @@ License /* * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * */ -defineTypeNameAndDebug(Foam::dictionary, 0); - -const Foam::dictionary Foam::dictionary::null; +namespace Foam +{ +defineTypeNameAndDebug(dictionary, 0); +const dictionary dictionary::null; +} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C b/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C index 48bc178ac6..43229b18fd 100644 --- a/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C +++ b/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.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 @@ -29,7 +29,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::dlLibraryTable, 0); +namespace Foam +{ +defineTypeNameAndDebug(dlLibraryTable, 0); +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C index c67b51ce82..2e67818359 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.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 @@ -30,8 +30,11 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineRunTimeSelectionTable(Foam::functionObject, dictionary); -int Foam::functionObject::debug(Foam::debug::debugSwitch("functionObject", 0)); +namespace Foam +{ +defineDebugSwitchWithName(functionObject, "functionObject", 0); +defineRunTimeSelectionTable(functionObject, dictionary); +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/db/objectRegistry/objectRegistry.C b/src/OpenFOAM/db/objectRegistry/objectRegistry.C index 09307c3a5c..4903ca4e28 100644 --- a/src/OpenFOAM/db/objectRegistry/objectRegistry.C +++ b/src/OpenFOAM/db/objectRegistry/objectRegistry.C @@ -28,7 +28,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::objectRegistry, 0); +namespace Foam +{ +defineTypeNameAndDebug(objectRegistry, 0); +} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/OpenFOAM/db/regIOobject/regIOobject.C b/src/OpenFOAM/db/regIOobject/regIOobject.C index 5d8d9972e2..a01634d344 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobject.C +++ b/src/OpenFOAM/db/regIOobject/regIOobject.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 @@ -29,19 +29,19 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::regIOobject, 0); - -int Foam::regIOobject::fileModificationSkew -( - Foam::debug::optimisationSwitch("fileModificationSkew", 30) -); - namespace Foam { + defineTypeNameAndDebug(regIOobject, 0); + + int regIOobject::fileModificationSkew + ( + debug::optimisationSwitch("fileModificationSkew", 30) + ); + template<> - const char* Foam::NamedEnum + const char* NamedEnum < - Foam::regIOobject::fileCheckTypes, + regIOobject::fileCheckTypes, 4 >::names[] = { diff --git a/src/OpenFOAM/db/typeInfo/className.H b/src/OpenFOAM/db/typeInfo/className.H index fa1f4bfdb6..a6a247d234 100644 --- a/src/OpenFOAM/db/typeInfo/className.H +++ b/src/OpenFOAM/db/typeInfo/className.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 @@ -137,6 +137,30 @@ public: \ // definitions (debug information only) // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//- Define the debug information, lookup as \a Name +#define registerDebugSwitchWithName(Type,Tag,Name)\ + class add##Tag##ToDebug\ + :\ + public ::Foam::simpleRegIOobject\ + {\ + public:\ + add##Tag##ToDebug(const char* name)\ + :\ + ::Foam::simpleRegIOobject(Foam::debug::addDebugObject, name)\ + {}\ + virtual ~add##Tag##ToDebug()\ + {}\ + virtual void readData(Foam::Istream& is)\ + {\ + Type::debug = readLabel(is);\ + }\ + virtual void writeData(Foam::Ostream& os) const\ + {\ + os << Type::debug;\ + }\ + };\ + add##Tag##ToDebug add##Tag##ToDebug_(Name) + //- Define the debug information, lookup as \a Name #define defineDebugSwitchWithName(Type, Name, DebugSwitch) \ diff --git a/src/OpenFOAM/dimensionSet/dimensionSet.C b/src/OpenFOAM/dimensionSet/dimensionSet.C index 64396290eb..eb13cdf60b 100644 --- a/src/OpenFOAM/dimensionSet/dimensionSet.C +++ b/src/OpenFOAM/dimensionSet/dimensionSet.C @@ -29,8 +29,11 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::dimensionSet, 1); -const Foam::scalar Foam::dimensionSet::smallExponent = SMALL; +namespace Foam +{ +defineTypeNameAndDebug(dimensionSet, 1); +const scalar dimensionSet::smallExponent = SMALL; +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/dimensionSet/dimensionSets.C b/src/OpenFOAM/dimensionSet/dimensionSets.C index 474be10181..7486781df8 100644 --- a/src/OpenFOAM/dimensionSet/dimensionSets.C +++ b/src/OpenFOAM/dimensionSet/dimensionSets.C @@ -25,13 +25,15 @@ License #include "dimensionSet.H" #include "dimensionedScalar.H" +#include "simpleRegIOobject.H" +#include "demandDrivenData.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +/* * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * */ dictionary* dimensionSystemsPtr_(NULL); @@ -45,11 +47,35 @@ dictionary& dimensionSystems() } -/* * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * */ - autoPtr > unitSetPtr_; autoPtr writeUnitSetPtr_; +class addDimensionSetsToDebug +: + public ::Foam::simpleRegIOobject +{ +public: + addDimensionSetsToDebug(const char* name) + : + ::Foam::simpleRegIOobject(Foam::debug::addDimensionSetObject, name) + {} + virtual ~addDimensionSetsToDebug() + {} + virtual void readData(Foam::Istream& is) + { + deleteDemandDrivenData(dimensionSystemsPtr_); + unitSetPtr_.clear(); + writeUnitSetPtr_.clear(); + dimensionSystemsPtr_ = new dictionary(is); + } + virtual void writeData(Foam::Ostream& os) const + { + os << dimensionSystems(); + } +}; +addDimensionSetsToDebug addDimensionSetsToDebug_("DimensionSets"); + + const HashTable& unitSet() { diff --git a/src/OpenFOAM/fields/cloud/cloud.C b/src/OpenFOAM/fields/cloud/cloud.C index 74f296fa0d..cae1cce299 100644 --- a/src/OpenFOAM/fields/cloud/cloud.C +++ b/src/OpenFOAM/fields/cloud/cloud.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 @@ -28,10 +28,14 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::cloud, 0); +namespace Foam +{ +defineTypeNameAndDebug(cloud, 0); + +const word cloud::prefix("lagrangian"); +word cloud::defaultName("defaultCloud"); +} -const Foam::word Foam::cloud::prefix("lagrangian"); -Foam::word Foam::cloud::defaultName("defaultCloud"); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/global/debug/debug.C b/src/OpenFOAM/global/debug/debug.C index cd2a0b2486..2abbc5826d 100644 --- a/src/OpenFOAM/global/debug/debug.C +++ b/src/OpenFOAM/global/debug/debug.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 @@ -30,6 +30,9 @@ Description #include "dictionary.H" #include "IFstream.H" #include "OSspecific.H" +#include "Ostream.H" +#include "demandDrivenData.H" +#include "simpleObjectRegistry.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -54,15 +57,35 @@ public: ~deleteControlDictPtr() { - if (controlDictPtr_) - { - delete controlDictPtr_; - controlDictPtr_ = 0; - } + deleteDemandDrivenData(controlDictPtr_); } }; deleteControlDictPtr deleteControlDictPtr_; + + +// Debug switch read and write callback tables. +simpleObjectRegistry* debugObjectsPtr_(NULL); +simpleObjectRegistry* infoObjectsPtr_(NULL); +simpleObjectRegistry* optimisationObjectsPtr_(NULL); +simpleObjectRegistry* dimensionSetObjectsPtr_(NULL); +class deleteDebugSwitchPtr +{ +public: + + deleteDebugSwitchPtr() + {} + + ~deleteDebugSwitchPtr() + { + deleteDemandDrivenData(debugObjectsPtr_); + deleteDemandDrivenData(infoObjectsPtr_); + deleteDemandDrivenData(optimisationObjectsPtr_); + deleteDemandDrivenData(dimensionSetObjectsPtr_); + } +}; + +deleteDebugSwitchPtr deleteDebugSwitchPtr_; //! \endcond @@ -165,6 +188,82 @@ int Foam::debug::optimisationSwitch(const char* name, const int defaultValue) } +void Foam::debug::addDebugObject(const char* name, simpleRegIOobject* obj) +{ + debugObjects().insert(name, obj); +} + + +void Foam::debug::addInfoObject(const char* name, simpleRegIOobject* obj) +{ + infoObjects().insert(name, obj); +} + + +void Foam::debug::addOptimisationObject +( + const char* name, + simpleRegIOobject* obj +) +{ + optimisationObjects().insert(name, obj); +} + + +void Foam::debug::addDimensionSetObject +( + const char* name, + simpleRegIOobject* obj +) +{ + dimensionSetObjects().insert(name, obj); +} + + +Foam::simpleObjectRegistry& Foam::debug::debugObjects() +{ + if (!debugObjectsPtr_) + { + debugObjectsPtr_ = new simpleObjectRegistry(1000); + } + + return *debugObjectsPtr_; +} + + +Foam::simpleObjectRegistry& Foam::debug::infoObjects() +{ + if (!infoObjectsPtr_) + { + infoObjectsPtr_ = new simpleObjectRegistry(1000); + } + + return *infoObjectsPtr_; +} + + +Foam::simpleObjectRegistry& Foam::debug::optimisationObjects() +{ + if (!optimisationObjectsPtr_) + { + optimisationObjectsPtr_ = new simpleObjectRegistry(1000); + } + + return *optimisationObjectsPtr_; +} + + +Foam::simpleObjectRegistry& Foam::debug::dimensionSetObjects() +{ + if (!dimensionSetObjectsPtr_) + { + dimensionSetObjectsPtr_ = new simpleObjectRegistry(1000); + } + + return *dimensionSetObjectsPtr_; +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/global/debug/debug.H b/src/OpenFOAM/global/debug/debug.H index b941fcbb7e..09697c57a7 100644 --- a/src/OpenFOAM/global/debug/debug.H +++ b/src/OpenFOAM/global/debug/debug.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 @@ -42,6 +42,10 @@ namespace Foam // Forward declaration of classes class dictionary; +class Istream; +class Ostream; +class simpleRegIOobject; +class simpleObjectRegistry; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -73,6 +77,36 @@ namespace debug //- Internal function to lookup a sub-dictionary from controlDict. dictionary& switchSet(const char* subDictName, dictionary*& subDictPtr); + + + // Registered debug switches + + //- Register debug switch read/write object + void addDebugObject(const char* name, simpleRegIOobject* obj); + + //- Register info switch read/write object + void addInfoObject(const char* name, simpleRegIOobject* obj); + + //- Register optimisation switch read/write object + void addOptimisationObject(const char* name, simpleRegIOobject* obj); + + //- Register DimensionSets read/write object + void addDimensionSetObject(const char* name, simpleRegIOobject* obj); + + + //- Get access to registered debug switch objects + simpleObjectRegistry& debugObjects(); + + //- Get access to registered info switch objects + simpleObjectRegistry& infoObjects(); + + //- Get access to registered optimisation switch objects + simpleObjectRegistry& optimisationObjects(); + + //- Get access to registered dimensionSets switch objects + simpleObjectRegistry& dimensionSetObjects(); + + } // End namespace debug diff --git a/src/OpenFOAM/global/debug/simpleObjectRegistry.H b/src/OpenFOAM/global/debug/simpleObjectRegistry.H new file mode 100644 index 0000000000..61d0931f49 --- /dev/null +++ b/src/OpenFOAM/global/debug/simpleObjectRegistry.H @@ -0,0 +1,74 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\/ 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 3 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, see . + +Class + Foam::simpleObjectRegistry + +Description + Object registry for simpleRegIOobject + +SourceFiles + +\*---------------------------------------------------------------------------*/ + +#ifndef simpleObjectRegistry_H +#define simpleObjectRegistry_H + +#include "HashTable.H" +#include "simpleRegIOobject.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class simpleObjectRegistry Declaration +\*---------------------------------------------------------------------------*/ + +class simpleObjectRegistry +: + public HashTable +{ +public: + + // Constructors + + //- Construct from initial estimate + simpleObjectRegistry(const label nIoObjects = 128) + : + HashTable(nIoObjects) + {} + +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/global/debug/simpleRegIOobject.H b/src/OpenFOAM/global/debug/simpleRegIOobject.H new file mode 100644 index 0000000000..c7ede5e818 --- /dev/null +++ b/src/OpenFOAM/global/debug/simpleRegIOobject.H @@ -0,0 +1,92 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\/ 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 3 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, see . + +Class + Foam::simpleRegIOobject + +Description + Abstract base class for registered object with I/O. Used in debug symbol + registration. + +SourceFiles + +\*---------------------------------------------------------------------------*/ + +#ifndef simpleRegIOobject_H +#define simpleRegIOobject_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes +class Istream; +class Ostream; + +/*---------------------------------------------------------------------------*\ + Class simpleRegIOobject Declaration +\*---------------------------------------------------------------------------*/ + +class simpleRegIOobject +{ +public: + + // Constructors + + //- Construct from objectregistry inserter and name + simpleRegIOobject + ( + void (*fn)(const char* name, simpleRegIOobject*), + const char* name + ) + { + (*fn)(name, this); + } + + + //- Destructor + virtual ~simpleRegIOobject() + {}; + + + // Member Functions + + //- Read + virtual void readData(Istream&) = 0; + + //- Write + virtual void writeData(Ostream&) const = 0; + +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/graph/writers/gnuplotGraph/gnuplotGraph.C b/src/OpenFOAM/graph/writers/gnuplotGraph/gnuplotGraph.C index ef2a2ddf71..1b00ef40b9 100644 --- a/src/OpenFOAM/graph/writers/gnuplotGraph/gnuplotGraph.C +++ b/src/OpenFOAM/graph/writers/gnuplotGraph/gnuplotGraph.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 @@ -28,11 +28,11 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::gnuplotGraph, 0); -const Foam::word Foam::gnuplotGraph::ext_("gplt"); - namespace Foam { + defineTypeNameAndDebug(gnuplotGraph, 0); + const word gnuplotGraph::ext_("gplt"); + typedef graph::writer graphWriter; addToRunTimeSelectionTable(graphWriter, gnuplotGraph, word); } diff --git a/src/OpenFOAM/graph/writers/jplotGraph/jplotGraph.C b/src/OpenFOAM/graph/writers/jplotGraph/jplotGraph.C index e41939eed1..1352498cf5 100644 --- a/src/OpenFOAM/graph/writers/jplotGraph/jplotGraph.C +++ b/src/OpenFOAM/graph/writers/jplotGraph/jplotGraph.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 @@ -28,15 +28,16 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::jplotGraph, 0); -const Foam::word Foam::jplotGraph::ext_("dat"); - namespace Foam { + defineTypeNameAndDebug(jplotGraph, 0); + const word jplotGraph::ext_("dat"); + typedef graph::writer graphWriter; addToRunTimeSelectionTable(graphWriter, jplotGraph, word); } + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void Foam::jplotGraph::write(const graph& g, Ostream& os) const diff --git a/src/OpenFOAM/graph/writers/rawGraph/rawGraph.C b/src/OpenFOAM/graph/writers/rawGraph/rawGraph.C index b791975db0..8f2a1938bf 100644 --- a/src/OpenFOAM/graph/writers/rawGraph/rawGraph.C +++ b/src/OpenFOAM/graph/writers/rawGraph/rawGraph.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 @@ -28,15 +28,16 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::rawGraph, 0); -const Foam::word Foam::rawGraph::ext_("xy"); - namespace Foam { + defineTypeNameAndDebug(rawGraph, 0); + const word rawGraph::ext_("xy"); + typedef graph::writer graphWriter; addToRunTimeSelectionTable(graphWriter, rawGraph, word); } + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void Foam::rawGraph::write(const graph& g, Ostream& os) const diff --git a/src/OpenFOAM/graph/writers/xmgrGraph/xmgrGraph.C b/src/OpenFOAM/graph/writers/xmgrGraph/xmgrGraph.C index db3d4657d5..806ba183a8 100644 --- a/src/OpenFOAM/graph/writers/xmgrGraph/xmgrGraph.C +++ b/src/OpenFOAM/graph/writers/xmgrGraph/xmgrGraph.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 @@ -28,11 +28,11 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::xmgrGraph, 0); -const Foam::word Foam::xmgrGraph::ext_("agr"); - namespace Foam { + defineTypeNameAndDebug(xmgrGraph, 0); + const word xmgrGraph::ext_("agr"); + typedef graph::writer graphWriter; addToRunTimeSelectionTable(graphWriter, xmgrGraph, word); } diff --git a/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolationName.C b/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolationName.C index 97221f73ce..c93e41f6ea 100644 --- a/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolationName.C +++ b/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolationName.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 @@ -27,6 +27,10 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::PatchToPatchInterpolationName, 0); +namespace Foam +{ +defineTypeNameAndDebug(PatchToPatchInterpolationName, 0); +} + // ************************************************************************* // diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/cyclicLduInterface.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/cyclicLduInterface.C index 65854c5e62..83203c1b39 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/cyclicLduInterface.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/cyclicLduInterface.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 @@ -28,7 +28,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::cyclicLduInterface, 0); +namespace Foam +{ +defineTypeNameAndDebug(cyclicLduInterface, 0); +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/lduInterface.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/lduInterface.C index fccc40c35d..ee0779ddea 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/lduInterface.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/lduInterface.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 @@ -27,7 +27,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::lduInterface, 0); +namespace Foam +{ +defineTypeNameAndDebug(lduInterface, 0); +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterface.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterface.C index e7f824ab60..769f7b4160 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterface.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterface.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 @@ -27,7 +27,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::processorLduInterface, 0); +namespace Foam +{ +defineTypeNameAndDebug(processorLduInterface, 0); +} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/cyclicLduInterfaceField/cyclicLduInterfaceField.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/cyclicLduInterfaceField/cyclicLduInterfaceField.C index b6ccfe754b..1cb4968df5 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/cyclicLduInterfaceField/cyclicLduInterfaceField.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/cyclicLduInterfaceField/cyclicLduInterfaceField.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 @@ -28,7 +28,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::cyclicLduInterfaceField, 0); +namespace Foam +{ +defineTypeNameAndDebug(cyclicLduInterfaceField, 0); +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/lduInterfaceField/lduInterfaceField.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/lduInterfaceField/lduInterfaceField.C index 25834cc430..57a5c10345 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/lduInterfaceField/lduInterfaceField.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/lduInterfaceField/lduInterfaceField.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 @@ -27,7 +27,11 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::lduInterfaceField, 0); +namespace Foam +{ +defineTypeNameAndDebug(lduInterfaceField, 0); +} + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/processorLduInterfaceField/processorLduInterfaceField.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/processorLduInterfaceField/processorLduInterfaceField.C index 060f197e9c..18a9bd1d11 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/processorLduInterfaceField/processorLduInterfaceField.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/processorLduInterfaceField/processorLduInterfaceField.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 @@ -28,7 +28,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::processorLduInterfaceField, 0); +namespace Foam +{ +defineTypeNameAndDebug(processorLduInterfaceField, 0); +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C index 16dd1a4188..1e4e5b8c42 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C @@ -28,7 +28,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::lduMatrix, 1); +namespace Foam +{ +defineTypeNameAndDebug(lduMatrix, 1); +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.C index b152ca2821..1c4cbfcd7f 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.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 @@ -27,7 +27,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::pairGAMGAgglomeration, 0); +namespace Foam +{ +defineTypeNameAndDebug(pairGAMGAgglomeration, 0); +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/diagonalSolver/diagonalSolver.C b/src/OpenFOAM/matrices/lduMatrix/solvers/diagonalSolver/diagonalSolver.C index 73e386f5ed..2170c1b90e 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/diagonalSolver/diagonalSolver.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/diagonalSolver/diagonalSolver.C @@ -27,7 +27,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::diagonalSolver, 0); +namespace Foam +{ +defineTypeNameAndDebug(diagonalSolver, 0); +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/solution/solution.C b/src/OpenFOAM/matrices/solution/solution.C index 0b770b7daa..1a1c215444 100644 --- a/src/OpenFOAM/matrices/solution/solution.C +++ b/src/OpenFOAM/matrices/solution/solution.C @@ -33,7 +33,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -int Foam::solution::debug(::Foam::debug::debugSwitch("solution", 0)); +namespace Foam +{ +defineDebugSwitchWithName(solution, "solution", 0); +} // List of sub-dictionaries to rewrite //! \cond localScope diff --git a/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.C b/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.C index 53d4e8985a..d285ca5ae4 100644 --- a/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.C +++ b/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.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 @@ -33,7 +33,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::commSchedule, 0); +namespace Foam +{ +defineTypeNameAndDebug(commSchedule, 0); +} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/lduMesh/lduMesh.C b/src/OpenFOAM/meshes/lduMesh/lduMesh.C index 44330226b1..2ab4cfe046 100644 --- a/src/OpenFOAM/meshes/lduMesh/lduMesh.C +++ b/src/OpenFOAM/meshes/lduMesh/lduMesh.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 @@ -28,7 +28,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::lduMesh, 0); +namespace Foam +{ +defineTypeNameAndDebug(lduMesh, 0); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/basic/coupled/coupledPointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/basic/coupled/coupledPointPatch.C index e9a1382aad..7e96f95087 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/basic/coupled/coupledPointPatch.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/basic/coupled/coupledPointPatch.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 @@ -30,7 +30,11 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::coupledPointPatch, 0); +namespace Foam +{ +defineTypeNameAndDebug(coupledPointPatch, 0); +} + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/derived/coupled/coupledFacePointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/derived/coupled/coupledFacePointPatch.C index f537df68cd..3fb238c718 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/derived/coupled/coupledFacePointPatch.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/derived/coupled/coupledFacePointPatch.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 @@ -28,7 +28,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::coupledFacePointPatch, 0); +namespace Foam +{ +defineTypeNameAndDebug(coupledFacePointPatch, 0); +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/pointPatch/pointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/pointPatch/pointPatch.C index e76e8b7a4c..c71d901678 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/pointPatch/pointPatch.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/pointPatch/pointPatch.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 @@ -27,6 +27,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::pointPatch, 0); +namespace Foam +{ +defineTypeNameAndDebug(pointPatch, 0); +} + // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C index 3115355f68..2c0ae4c102 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C @@ -41,13 +41,13 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::globalMeshData, 0); - -// Geometric matching tolerance. Factor of mesh bounding box. -const Foam::scalar Foam::globalMeshData::matchTol_ = 1e-8; - namespace Foam { +defineTypeNameAndDebug(globalMeshData, 0); + +// Geometric matching tolerance. Factor of mesh bounding box. +const scalar globalMeshData::matchTol_ = 1e-8; + template<> class minEqOp { diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C index b4333fc3a7..caad93731c 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C @@ -31,7 +31,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::globalPoints, 0); +namespace Foam +{ +defineTypeNameAndDebug(globalPoints, 0); +} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C index 72d386d57b..a4ababac70 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.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 @@ -33,7 +33,11 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::mapDistribute, 0); +namespace Foam +{ +defineTypeNameAndDebug(mapDistribute, 0); +} + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C index b4148405cf..c17e54be53 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C @@ -35,7 +35,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::polyBoundaryMesh, 0); +namespace Foam +{ +defineTypeNameAndDebug(polyBoundaryMesh, 0); +} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMeshEntries.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMeshEntries.C index c70b13211d..df0a21291d 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMeshEntries.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMeshEntries.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 @@ -27,6 +27,10 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::polyBoundaryMeshEntries, 0); +namespace Foam +{ +defineTypeNameAndDebug(polyBoundaryMeshEntries, 0); +} + // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index 0f4f93f940..49e91d4524 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -38,14 +38,25 @@ License #include "SubField.H" #include "pointMesh.H" +#include "Istream.H" +#include "Ostream.H" +#include "simpleRegIOobject.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::polyMesh, 0); +namespace Foam +{ +defineTypeNameAndDebug(polyMesh, 0); +registerDebugSwitchWithName +( + polyMesh, + polyMesh, + polyMesh::typeName_() +); - -Foam::word Foam::polyMesh::defaultRegion = "region0"; -Foam::word Foam::polyMesh::meshSubDir = "polyMesh"; +word polyMesh::defaultRegion = "region0"; +word polyMesh::meshSubDir = "polyMesh"; +} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C b/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C index 9d1b6e1504..23a7ab3d7f 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.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 @@ -30,7 +30,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::zone, 0); +namespace Foam +{ +defineTypeNameAndDebug(zone, 0); +} // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchName.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchName.C index d561c20efa..79dd0e2de4 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchName.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchName.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 @@ -27,6 +27,10 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::PrimitivePatchName, 0); +namespace Foam +{ +defineTypeNameAndDebug(PrimitivePatchName, 0); +} + // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C index 6d7516d7ea..595c286239 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.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 @@ -28,7 +28,10 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::primitiveMesh, 0); +namespace Foam +{ +defineTypeNameAndDebug(primitiveMesh, 0); +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C index 5b754a43e2..fe5a09b19f 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.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 @@ -25,10 +25,12 @@ License #include "patchZones.H" - // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::patchZones, 0); +namespace Foam +{ +defineTypeNameAndDebug(patchZones, 0); +} // * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C index e7015a1f5b..9e1455874b 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.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 @@ -28,7 +28,11 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::walkPatch, 0); +namespace Foam +{ +defineTypeNameAndDebug(walkPatch, 0); +} + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C index 66b556e27b..ec1e8efdda 100644 --- a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C +++ b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.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 @@ -28,9 +28,11 @@ License // * * * * * * * * * * * * Private Static Data Members * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::globalIndexAndTransform, 0); - -const Foam::label Foam::globalIndexAndTransform::base_ = 32; +namespace Foam +{ +defineTypeNameAndDebug(globalIndexAndTransform, 0); +const label globalIndexAndTransform::base_ = 32; +} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C b/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C index 3a776611f8..0aebc63a0d 100644 --- a/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C +++ b/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C @@ -123,7 +123,7 @@ void Foam::polyMeshFilter::checkMeshEdgesAndRelaxEdges } } - syncTools::syncEdgeList(mesh_, minEdgeLen_, minEqOp(), 0.0); + syncTools::syncEdgeList(mesh_, minEdgeLen_, minEqOp(), scalar(0.0)); for (label smoothIter = 0; smoothIter < maxSmoothIters_; ++smoothIter) { @@ -154,7 +154,13 @@ void Foam::polyMeshFilter::checkMeshEdgesAndRelaxEdges ); } - syncTools::syncEdgeList(mesh_, minEdgeLen_, minEqOp(), 0.0); + syncTools::syncEdgeList + ( + mesh_, + minEdgeLen_, + minEqOp(), + scalar(0.0) + ); } } @@ -343,7 +349,7 @@ void Foam::polyMeshFilter::mapOldMeshEdgeFieldToNewMesh newMesh, newMeshMinEdgeLen, maxEqOp(), - 0.0 + scalar(0.0) ); } diff --git a/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.C b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.C index 39ea30b0c3..6c6a6c0c53 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.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 @@ -28,10 +28,7 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -int Foam::pointMVCWeight::debug -( - debug::debugSwitch("pointMVCWeight", 0) -); +defineDebugSwitchWithName(Foam::pointMVCWeight, "pointMVCWeight", 0); Foam::scalar Foam::pointMVCWeight::tol(SMALL); diff --git a/src/parallel/decompose/Allwmake b/src/parallel/decompose/Allwmake index 9d0acbd618..5cea1fbd5e 100755 --- a/src/parallel/decompose/Allwmake +++ b/src/parallel/decompose/Allwmake @@ -44,7 +44,18 @@ wmakeLnInclude decompositionMethods if [ -n "$SCOTCH_ARCH_PATH" ] then wmake $makeType scotchDecomp - [ -d "$FOAM_LIBBIN/$FOAM_MPI" ] && wmakeMpiLib ptscotchDecomp + + if [ -d "$FOAM_LIBBIN/$FOAM_MPI" ] + then + #- Bit of a hack: ptscotch 6 requires scotch linked as well as. Can be + # removed once ptscotch declares dependency on scotch itself. + if [ "$SCOTCH_VERSION" = "scotch_6.0.0" ] + then + export LINK_FLAGS="-lscotch" + fi + + wmakeMpiLib ptscotchDecomp + fi else echo echo "Skipping scotchDecomp (ptscotchDecomp)" diff --git a/src/parallel/decompose/ptscotchDecomp/Make/options b/src/parallel/decompose/ptscotchDecomp/Make/options index d4e551bcac..acdebd8976 100644 --- a/src/parallel/decompose/ptscotchDecomp/Make/options +++ b/src/parallel/decompose/ptscotchDecomp/Make/options @@ -9,4 +9,4 @@ EXE_INC = \ -I../decompositionMethods/lnInclude LIB_LIBS = \ - -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lptscotch -lptscotcherrexit -lscotch -lrt + -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lptscotch -lptscotcherrexit ${LINK_FLAGS} -lrt diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C index b36832a1d3..617af63382 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C @@ -158,7 +158,7 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs() const volScalarField& rho = film.rho(); const scalarField rhop(rho.boundaryField()[patchI].patchInternalField()); - const scalarField Re(max(G, 0.0)/mup); + const scalarField Re(max(G, scalar(0.0))/mup); // TODO: currently re-evaluating the entire gTan field to return this patch const scalarField gTan(film.gTan()().boundaryField()[patchI] & n); diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C index 7f21d9a2e4..923a559dfa 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C @@ -158,7 +158,7 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs() const volScalarField& rho = film.rho(); const scalarField rhop(rho.boundaryField()[patchI].patchInternalField()); - const scalarField Re(max(G, 0.0)/mup); + const scalarField Re(max(G, scalar(0.0))/mup); // TODO: currently re-evaluating the entire gTan field to return this patch const scalarField gTan(film.gTan()().boundaryField()[patchI] & n); diff --git a/src/turbulenceModels/compressible/RAS/v2f/v2f.C b/src/turbulenceModels/compressible/RAS/v2f/v2f.C index 0fb834ac49..36e04932d7 100644 --- a/src/turbulenceModels/compressible/RAS/v2f/v2f.C +++ b/src/turbulenceModels/compressible/RAS/v2f/v2f.C @@ -407,7 +407,8 @@ void v2f::correct() 1.0/T*((C1_ - N)*v2_ - 2.0/3.0*k_*(C1_ - 1.0)) ); - tmp Ceps1 = 1.4*(1.0 + 0.05*min(sqrt(k_/v2_), 100.0)); + tmp Ceps1 = + 1.4*(1.0 + 0.05*min(sqrt(k_/v2_), scalar(100.0))); // Update epsilon (and possibly G) at the wall epsilon_.boundaryField().updateCoeffs(); diff --git a/src/turbulenceModels/incompressible/RAS/v2f/v2f.C b/src/turbulenceModels/incompressible/RAS/v2f/v2f.C index b8d20d2624..642dc819bf 100644 --- a/src/turbulenceModels/incompressible/RAS/v2f/v2f.C +++ b/src/turbulenceModels/incompressible/RAS/v2f/v2f.C @@ -374,7 +374,8 @@ void v2f::correct() ); - tmp Ceps1 = 1.4*(1.0 + 0.05*min(sqrt(k_/v2_), 100.0)); + tmp Ceps1 = + 1.4*(1.0 + 0.05*min(sqrt(k_/v2_), scalar(100.0))); // Update epsilon (and possibly G) at the wall epsilon_.boundaryField().updateCoeffs();