mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: debug: add dimensionSets
This commit is contained in:
@ -31,7 +31,6 @@ Description
|
||||
#include "IFstream.H"
|
||||
#include "OSspecific.H"
|
||||
#include "Ostream.H"
|
||||
//#include "HashTable.H"
|
||||
#include "demandDrivenData.H"
|
||||
#include "simpleObjectRegistry.H"
|
||||
|
||||
@ -69,6 +68,7 @@ deleteControlDictPtr deleteControlDictPtr_;
|
||||
simpleObjectRegistry* debugObjectsPtr_(NULL);
|
||||
simpleObjectRegistry* infoObjectsPtr_(NULL);
|
||||
simpleObjectRegistry* optimisationObjectsPtr_(NULL);
|
||||
simpleObjectRegistry* dimensionSetObjectsPtr_(NULL);
|
||||
class deleteDebugSwitchPtr
|
||||
{
|
||||
public:
|
||||
@ -81,7 +81,7 @@ public:
|
||||
deleteDemandDrivenData(debugObjectsPtr_);
|
||||
deleteDemandDrivenData(infoObjectsPtr_);
|
||||
deleteDemandDrivenData(optimisationObjectsPtr_);
|
||||
|
||||
deleteDemandDrivenData(dimensionSetObjectsPtr_);
|
||||
}
|
||||
};
|
||||
|
||||
@ -210,6 +210,16 @@ void Foam::debug::addOptimisationObject
|
||||
}
|
||||
|
||||
|
||||
void Foam::debug::addDimensionSetObject
|
||||
(
|
||||
const char* name,
|
||||
simpleRegIOobject* obj
|
||||
)
|
||||
{
|
||||
dimensionSetObjects().insert(name, obj);
|
||||
}
|
||||
|
||||
|
||||
Foam::simpleObjectRegistry& Foam::debug::debugObjects()
|
||||
{
|
||||
if (!debugObjectsPtr_)
|
||||
@ -243,6 +253,17 @@ Foam::simpleObjectRegistry& Foam::debug::optimisationObjects()
|
||||
}
|
||||
|
||||
|
||||
Foam::simpleObjectRegistry& Foam::debug::dimensionSetObjects()
|
||||
{
|
||||
if (!dimensionSetObjectsPtr_)
|
||||
{
|
||||
dimensionSetObjectsPtr_ = new simpleObjectRegistry(1000);
|
||||
}
|
||||
|
||||
return *dimensionSetObjectsPtr_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
|
||||
@ -84,22 +84,28 @@ namespace debug
|
||||
//- Register debug switch read/write object
|
||||
void addDebugObject(const char* name, simpleRegIOobject* obj);
|
||||
|
||||
//- Register debug switch read/write object
|
||||
//- Register info switch read/write object
|
||||
void addInfoObject(const char* name, simpleRegIOobject* obj);
|
||||
|
||||
//- Register debug switch read/write object
|
||||
//- 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 debug switch objects
|
||||
//- Get access to registered info switch objects
|
||||
simpleObjectRegistry& infoObjects();
|
||||
|
||||
//- Get access to registered debug switch objects
|
||||
//- Get access to registered optimisation switch objects
|
||||
simpleObjectRegistry& optimisationObjects();
|
||||
|
||||
//- Get access to registered dimensionSets switch objects
|
||||
simpleObjectRegistry& dimensionSetObjects();
|
||||
|
||||
|
||||
} // End namespace debug
|
||||
|
||||
|
||||
Reference in New Issue
Block a user