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/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/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/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..4ae022c2d8 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,10 @@ Description #include "dictionary.H" #include "IFstream.H" #include "OSspecific.H" +#include "Ostream.H" +//#include "HashTable.H" +#include "demandDrivenData.H" +#include "simpleObjectRegistry.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -54,15 +58,34 @@ 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); +class deleteDebugSwitchPtr +{ +public: + + deleteDebugSwitchPtr() + {} + + ~deleteDebugSwitchPtr() + { + deleteDemandDrivenData(debugObjectsPtr_); + deleteDemandDrivenData(infoObjectsPtr_); + deleteDemandDrivenData(optimisationObjectsPtr_); + + } +}; + +deleteDebugSwitchPtr deleteDebugSwitchPtr_; //! \endcond @@ -165,6 +188,61 @@ 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); +} + + +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_; +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/global/debug/debug.H b/src/OpenFOAM/global/debug/debug.H index b941fcbb7e..a88493b0bd 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,30 @@ 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 debug switch read/write object + void addInfoObject(const char* name, simpleRegIOobject* obj); + + //- Register debug switch read/write object + void addOptimisationObject(const char* name, simpleRegIOobject* obj); + + + //- Get access to registered debug switch objects + simpleObjectRegistry& debugObjects(); + + //- Get access to registered debug switch objects + simpleObjectRegistry& infoObjects(); + + //- Get access to registered debug switch objects + simpleObjectRegistry& optimisationObjects(); + + } // End namespace debug 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 2122b282d7..2fb95ad042 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 * * * * * * * * * * * //