mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: partialWrite: support regions
This commit is contained in:
@ -27,6 +27,7 @@ License
|
|||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "IOobjectList.H"
|
#include "IOobjectList.H"
|
||||||
|
#include "polyMesh.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -123,14 +124,26 @@ void Foam::partialWrite::write()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Delete all but marked objects
|
// Delete all but marked objects
|
||||||
|
fileName dbDir;
|
||||||
|
if (isA<polyMesh>(obr_))
|
||||||
|
{
|
||||||
|
dbDir = dynamic_cast<const polyMesh&>(obr_).dbDir();
|
||||||
|
}
|
||||||
|
|
||||||
IOobjectList objects(obr_, obr_.time().timeName());
|
IOobjectList objects(obr_, obr_.time().timeName());
|
||||||
|
|
||||||
forAllConstIter(HashPtrTable<IOobject>, objects, iter)
|
forAllConstIter(HashPtrTable<IOobject>, objects, iter)
|
||||||
{
|
{
|
||||||
if (!objectNames_.found(iter()->name()))
|
if (!objectNames_.found(iter()->name()))
|
||||||
{
|
{
|
||||||
const fileName f = obr_.time().timePath()/iter()->name();
|
const fileName f =
|
||||||
//Pout<< " rm " << f << endl;
|
obr_.time().timePath()
|
||||||
|
/dbDir
|
||||||
|
/iter()->name();
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Pout<< " rm " << f << endl;
|
||||||
|
}
|
||||||
rm(f);
|
rm(f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user