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 "IFstream.H"
|
||||||
#include "OSspecific.H"
|
#include "OSspecific.H"
|
||||||
#include "Ostream.H"
|
#include "Ostream.H"
|
||||||
//#include "HashTable.H"
|
|
||||||
#include "demandDrivenData.H"
|
#include "demandDrivenData.H"
|
||||||
#include "simpleObjectRegistry.H"
|
#include "simpleObjectRegistry.H"
|
||||||
|
|
||||||
@ -69,6 +68,7 @@ deleteControlDictPtr deleteControlDictPtr_;
|
|||||||
simpleObjectRegistry* debugObjectsPtr_(NULL);
|
simpleObjectRegistry* debugObjectsPtr_(NULL);
|
||||||
simpleObjectRegistry* infoObjectsPtr_(NULL);
|
simpleObjectRegistry* infoObjectsPtr_(NULL);
|
||||||
simpleObjectRegistry* optimisationObjectsPtr_(NULL);
|
simpleObjectRegistry* optimisationObjectsPtr_(NULL);
|
||||||
|
simpleObjectRegistry* dimensionSetObjectsPtr_(NULL);
|
||||||
class deleteDebugSwitchPtr
|
class deleteDebugSwitchPtr
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -81,7 +81,7 @@ public:
|
|||||||
deleteDemandDrivenData(debugObjectsPtr_);
|
deleteDemandDrivenData(debugObjectsPtr_);
|
||||||
deleteDemandDrivenData(infoObjectsPtr_);
|
deleteDemandDrivenData(infoObjectsPtr_);
|
||||||
deleteDemandDrivenData(optimisationObjectsPtr_);
|
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()
|
Foam::simpleObjectRegistry& Foam::debug::debugObjects()
|
||||||
{
|
{
|
||||||
if (!debugObjectsPtr_)
|
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
|
//- Register debug switch read/write object
|
||||||
void addDebugObject(const char* name, simpleRegIOobject* obj);
|
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);
|
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);
|
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
|
//- Get access to registered debug switch objects
|
||||||
simpleObjectRegistry& debugObjects();
|
simpleObjectRegistry& debugObjects();
|
||||||
|
|
||||||
//- Get access to registered debug switch objects
|
//- Get access to registered info switch objects
|
||||||
simpleObjectRegistry& infoObjects();
|
simpleObjectRegistry& infoObjects();
|
||||||
|
|
||||||
//- Get access to registered debug switch objects
|
//- Get access to registered optimisation switch objects
|
||||||
simpleObjectRegistry& optimisationObjects();
|
simpleObjectRegistry& optimisationObjects();
|
||||||
|
|
||||||
|
//- Get access to registered dimensionSets switch objects
|
||||||
|
simpleObjectRegistry& dimensionSetObjects();
|
||||||
|
|
||||||
|
|
||||||
} // End namespace debug
|
} // End namespace debug
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user