Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
laurence
2012-12-12 16:32:23 +00:00
72 changed files with 777 additions and 169 deletions

View File

@ -149,6 +149,7 @@ castellatedMeshControls
patchInfo
{
type patch;
inGroups (meshedPatches);
}
//- Optional angle to detect small-large cell situation

View File

@ -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);
}
// ************************************************************************* //

View File

@ -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 * * * * * * * * * * * * * * //

View File

@ -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);
}
// ************************************************************************* //

View File

@ -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 * * * * * * * * * * * //

View File

@ -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)

View File

@ -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);
}
// ************************************************************************* //

View File

@ -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);
}
// ************************************************************************* //

View File

@ -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);
}
// ************************************************************************* //

View File

@ -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);
}
// ************************************************************************* //

View File

@ -29,7 +29,11 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(Foam::IOobject, 0);
namespace Foam
{
defineTypeNameAndDebug(IOobject, 0);
}
// * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * //

View File

@ -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 * * * * * * * * * * * * * * //

View File

@ -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);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -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);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -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);
}
// ************************************************************************* //

View File

@ -30,10 +30,10 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(Foam::UPstream, 0);
namespace Foam
{
defineTypeNameAndDebug(UPstream, 0);
template<>
const char* Foam::NamedEnum
<

View File

@ -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 * * * * * * * * * * * * //

View File

@ -31,10 +31,10 @@ License
// * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * //
defineTypeNameAndDebug(Foam::Time, 0);
namespace Foam
{
defineTypeNameAndDebug(Time, 0);
template<>
const char* Foam::NamedEnum
<

View File

@ -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"));

View File

@ -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 * * * * * * * * * * * //

View File

@ -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 * * * * * * * * * * * * * * //

View File

@ -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 * * * * * * * * * * * * * * //

View File

@ -28,7 +28,10 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(Foam::objectRegistry, 0);
namespace Foam
{
defineTypeNameAndDebug(objectRegistry, 0);
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -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[] =
{

View File

@ -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) \

View File

@ -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 * * * * * * * * * * * * * * //

View File

@ -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<HashTable<dimensionedScalar> > unitSetPtr_;
autoPtr<dimensionSets> 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<dimensionedScalar>& unitSet()
{

View File

@ -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 * * * * * * * * * * * * * * //

View File

@ -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_;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -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

View File

@ -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 <http://www.gnu.org/licenses/>.
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<simpleRegIOobject*>
{
public:
// Constructors
//- Construct from initial estimate
simpleObjectRegistry(const label nIoObjects = 128)
:
HashTable<simpleRegIOobject*>(nIoObjects)
{}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -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 <http://www.gnu.org/licenses/>.
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
// ************************************************************************* //

View File

@ -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);
}

View File

@ -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

View File

@ -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

View File

@ -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);
}

View File

@ -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);
}
// ************************************************************************* //

View File

@ -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 * * * * * * * * * * * * * * * //

View File

@ -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 * * * * * * * * * * * * * * * //

View File

@ -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 * * * * * * * * * * * //

View File

@ -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 * * * * * * * * * * * * * * * //

View File

@ -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 * * * * * * * * * * * * * * * //

View File

@ -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 * * * * * * * * * * * * * * * //

View File

@ -28,7 +28,10 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(Foam::lduMatrix, 1);
namespace Foam
{
defineTypeNameAndDebug(lduMatrix, 1);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -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 * * * * * * * * * * * * * * //

View File

@ -27,7 +27,10 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(Foam::diagonalSolver, 0);
namespace Foam
{
defineTypeNameAndDebug(diagonalSolver, 0);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -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

View File

@ -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 * * * * * * * * * * * //

View File

@ -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 * * * * * * * * * * * * * //

View File

@ -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 * * * * * * * * * * * * * * //

View File

@ -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 * * * * * * * * * * * * * * //

View File

@ -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);
}
// ************************************************************************* //

View File

@ -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<labelPair>
{

View File

@ -31,7 +31,10 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(Foam::globalPoints, 0);
namespace Foam
{
defineTypeNameAndDebug(globalPoints, 0);
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -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 * * * * * * * * * * * //

View File

@ -35,7 +35,10 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(Foam::polyBoundaryMesh, 0);
namespace Foam
{
defineTypeNameAndDebug(polyBoundaryMesh, 0);
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -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);
}
// ************************************************************************* //

View File

@ -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 * * * * * * * * * * * //

View File

@ -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 * * * * * * * * * * //

View File

@ -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);
}
// ************************************************************************* //

View File

@ -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 * * * * * * * * * * * * * * //

View File

@ -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 * * * * * * * * * * * * * //

View File

@ -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 * * * * * * * * * * * //

View File

@ -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 * * * * * * * * * * * //

View File

@ -123,7 +123,7 @@ void Foam::polyMeshFilter::checkMeshEdgesAndRelaxEdges
}
}
syncTools::syncEdgeList(mesh_, minEdgeLen_, minEqOp<scalar>(), 0.0);
syncTools::syncEdgeList(mesh_, minEdgeLen_, minEqOp<scalar>(), scalar(0.0));
for (label smoothIter = 0; smoothIter < maxSmoothIters_; ++smoothIter)
{
@ -154,7 +154,13 @@ void Foam::polyMeshFilter::checkMeshEdgesAndRelaxEdges
);
}
syncTools::syncEdgeList(mesh_, minEdgeLen_, minEqOp<scalar>(), 0.0);
syncTools::syncEdgeList
(
mesh_,
minEdgeLen_,
minEqOp<scalar>(),
scalar(0.0)
);
}
}
@ -343,7 +349,7 @@ void Foam::polyMeshFilter::mapOldMeshEdgeFieldToNewMesh
newMesh,
newMeshMinEdgeLen,
maxEqOp<scalar>(),
0.0
scalar(0.0)
);
}

View File

@ -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);

View File

@ -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)"

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -407,7 +407,8 @@ void v2f::correct()
1.0/T*((C1_ - N)*v2_ - 2.0/3.0*k_*(C1_ - 1.0))
);
tmp<volScalarField> Ceps1 = 1.4*(1.0 + 0.05*min(sqrt(k_/v2_), 100.0));
tmp<volScalarField> 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();

View File

@ -374,7 +374,8 @@ void v2f::correct()
);
tmp<volScalarField> Ceps1 = 1.4*(1.0 + 0.05*min(sqrt(k_/v2_), 100.0));
tmp<volScalarField> 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();