From 170e0bc9ddd49b565d21fd6f0fa4588589721db2 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 4 Jul 2011 09:49:39 +0100 Subject: [PATCH] ENH: partialWrite: support regions --- .../functionObjects/IO/partialWrite/partialWrite.C | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.C b/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.C index 327c7b80..1ea7ae25 100644 --- a/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.C +++ b/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.C @@ -27,6 +27,7 @@ License #include "dictionary.H" #include "Time.H" #include "IOobjectList.H" +#include "polyMesh.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -123,14 +124,26 @@ void Foam::partialWrite::write() else { // Delete all but marked objects + fileName dbDir; + if (isA(obr_)) + { + dbDir = dynamic_cast(obr_).dbDir(); + } + IOobjectList objects(obr_, obr_.time().timeName()); forAllConstIter(HashPtrTable, objects, iter) { if (!objectNames_.found(iter()->name())) { - const fileName f = obr_.time().timePath()/iter()->name(); - //Pout<< " rm " << f << endl; + const fileName f = + obr_.time().timePath() + /dbDir + /iter()->name(); + if (debug) + { + Pout<< " rm " << f << endl; + } rm(f); } } -- 2.11.4.GIT