mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated mechanism to create empty sets and zones
This commit is contained in:
@ -37,6 +37,11 @@ namespace Foam
|
||||
defineRunTimeSelectionTable(topoSet, word);
|
||||
defineRunTimeSelectionTable(topoSet, size);
|
||||
defineRunTimeSelectionTable(topoSet, set);
|
||||
|
||||
int Foam::topoSet::disallowGenericSets
|
||||
(
|
||||
debug::debugSwitch("disallowGenericSets", 0)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -297,14 +302,14 @@ Foam::IOobject Foam::topoSet::findIOobject
|
||||
writeOption w
|
||||
)
|
||||
{
|
||||
return IOobject
|
||||
IOobject io
|
||||
(
|
||||
name,
|
||||
mesh.time().findInstance
|
||||
(
|
||||
mesh.dbDir()/polyMesh::meshSubDir/"sets",
|
||||
word::null,
|
||||
r,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
mesh.facesInstance()
|
||||
),
|
||||
polyMesh::meshSubDir/"sets",
|
||||
@ -312,6 +317,14 @@ Foam::IOobject Foam::topoSet::findIOobject
|
||||
r,
|
||||
w
|
||||
);
|
||||
|
||||
if (!io.typeHeaderOk<topoSet>(false) && disallowGenericSets != 0)
|
||||
{
|
||||
DebugInfo<< "Setting no read for set " << name << endl;
|
||||
io.readOpt() = IOobject::NO_READ;
|
||||
}
|
||||
|
||||
return io;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -142,6 +142,9 @@ public:
|
||||
//- Name of file set will use.
|
||||
static fileName localPath(const polyMesh& mesh, const word& name);
|
||||
|
||||
//- Debug switch to disallow the use of generic sets
|
||||
static int disallowGenericSets;
|
||||
|
||||
|
||||
// Declare run-time constructor selection table
|
||||
|
||||
|
||||
Reference in New Issue
Block a user