mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: topoSet: clear sets upon writing modified mesh. Fixes #129.
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -53,6 +53,7 @@ Description
|
||||
#include "fvMeshAdder.H"
|
||||
#include "polyTopoChange.H"
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
#include "topoSet.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
@ -731,6 +732,7 @@ int main(int argc, char *argv[])
|
||||
<< "Failed writing polyMesh."
|
||||
<< exit(FatalError);
|
||||
}
|
||||
topoSet::removeFiles(masterMesh);
|
||||
|
||||
if (writeCellDist)
|
||||
{
|
||||
|
||||
@ -75,6 +75,7 @@ Usage
|
||||
#include "processorFvPatchField.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "decompositionModel.H"
|
||||
#include "topoSet.H"
|
||||
|
||||
#include "parFvFieldReconstructor.H"
|
||||
#include "parLagrangianRedistributor.H"
|
||||
@ -1136,6 +1137,7 @@ autoPtr<mapDistributePolyMesh> redistributeAndWrite
|
||||
runTime.TimePaths::caseName() = baseRunTime.caseName();
|
||||
|
||||
mesh.write();
|
||||
topoSet::removeFiles(mesh);
|
||||
|
||||
// Now we've written all. Reset caseName on master
|
||||
Info<< "Restoring caseName to " << proc0CaseName << endl;
|
||||
@ -1145,6 +1147,7 @@ autoPtr<mapDistributePolyMesh> redistributeAndWrite
|
||||
else
|
||||
{
|
||||
mesh.write();
|
||||
topoSet::removeFiles(mesh);
|
||||
}
|
||||
Info<< "Written redistributed mesh to " << mesh.facesInstance() << nl
|
||||
<< endl;
|
||||
@ -1209,6 +1212,55 @@ autoPtr<mapDistributePolyMesh> redistributeAndWrite
|
||||
}
|
||||
}
|
||||
|
||||
//// Sets. Disabled for now.
|
||||
//{
|
||||
// // Read sets
|
||||
// if (Pstream::master() && decompose)
|
||||
// {
|
||||
// runTime.TimePaths::caseName() = baseRunTime.caseName();
|
||||
// }
|
||||
// IOobjectList objects(mesh, mesh.facesInstance(), "polyMesh/sets");
|
||||
//
|
||||
// PtrList<cellSet> cellSets;
|
||||
// ReadFields(objects, cellSets);
|
||||
//
|
||||
// if (Pstream::master() && decompose)
|
||||
// {
|
||||
// runTime.TimePaths::caseName() = proc0CaseName;
|
||||
// }
|
||||
//
|
||||
// forAll(cellSets, i)
|
||||
// {
|
||||
// cellSets[i].distribute(map);
|
||||
// }
|
||||
//
|
||||
// if (nDestProcs == 1)
|
||||
// {
|
||||
// if (Pstream::master())
|
||||
// {
|
||||
// Info<< "Setting caseName to " << baseRunTime.caseName()
|
||||
// << " to write reconstructed refinement data." << endl;
|
||||
// runTime.TimePaths::caseName() = baseRunTime.caseName();
|
||||
//
|
||||
// forAll(cellSets, i)
|
||||
// {
|
||||
// cellSets[i].distribute(map);
|
||||
// }
|
||||
//
|
||||
// // Now we've written all. Reset caseName on master
|
||||
// Info<< "Restoring caseName to " << proc0CaseName << endl;
|
||||
// runTime.TimePaths::caseName() = proc0CaseName;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// forAll(cellSets, i)
|
||||
// {
|
||||
// cellSets[i].distribute(map);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
return autoPtr<mapDistributePolyMesh>
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user