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
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -56,7 +56,9 @@ Description
|
|||||||
#include "mapPolyMesh.H"
|
#include "mapPolyMesh.H"
|
||||||
#include "faceSet.H"
|
#include "faceSet.H"
|
||||||
#include "cellSet.H"
|
#include "cellSet.H"
|
||||||
|
#include "pointSet.H"
|
||||||
#include "syncTools.H"
|
#include "syncTools.H"
|
||||||
|
#include "ReadFields.H"
|
||||||
#include "polyTopoChange.H"
|
#include "polyTopoChange.H"
|
||||||
#include "polyModifyFace.H"
|
#include "polyModifyFace.H"
|
||||||
#include "polyAddFace.H"
|
#include "polyAddFace.H"
|
||||||
@ -315,6 +317,59 @@ void initCreatedPatches
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class TopoSet>
|
||||||
|
void subsetTopoSets
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const IOobjectList& objectsList,
|
||||||
|
const labelList& map,
|
||||||
|
const fvMesh& subMesh,
|
||||||
|
PtrList<TopoSet>& subSets
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// Read original sets
|
||||||
|
PtrList<TopoSet> sets;
|
||||||
|
ReadFields<TopoSet>(objectsList, sets);
|
||||||
|
|
||||||
|
subSets.setSize(sets.size());
|
||||||
|
forAll(sets, i)
|
||||||
|
{
|
||||||
|
TopoSet& set = sets[i];
|
||||||
|
|
||||||
|
Info<< "Subsetting " << set.type() << " " << set.name() << endl;
|
||||||
|
|
||||||
|
// Map the data
|
||||||
|
PackedBoolList isSet(set.maxSize(mesh));
|
||||||
|
forAllConstIter(labelHashSet, set, iter)
|
||||||
|
{
|
||||||
|
isSet[iter.key()] = true;
|
||||||
|
}
|
||||||
|
label nSet = 0;
|
||||||
|
forAll(map, i)
|
||||||
|
{
|
||||||
|
if (isSet[map[i]])
|
||||||
|
{
|
||||||
|
nSet++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
subSets.set
|
||||||
|
(
|
||||||
|
i,
|
||||||
|
new TopoSet(subMesh, set.name(), nSet, IOobject::AUTO_WRITE)
|
||||||
|
);
|
||||||
|
TopoSet& subSet = subSets[i];
|
||||||
|
forAll(map, i)
|
||||||
|
{
|
||||||
|
if (isSet[map[i]])
|
||||||
|
{
|
||||||
|
subSet.insert(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void createCoupledBaffles
|
void createCoupledBaffles
|
||||||
(
|
(
|
||||||
fvMesh& mesh,
|
fvMesh& mesh,
|
||||||
@ -923,6 +978,41 @@ int main(int argc, char *argv[])
|
|||||||
surfTensorFlds
|
surfTensorFlds
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Set handling
|
||||||
|
PtrList<cellSet> cellSets;
|
||||||
|
PtrList<faceSet> faceSets;
|
||||||
|
PtrList<pointSet> pointSets;
|
||||||
|
{
|
||||||
|
IOobjectList objects(mesh, mesh.facesInstance(), "polyMesh/sets");
|
||||||
|
subsetTopoSets
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
objects,
|
||||||
|
subsetter.cellMap(),
|
||||||
|
subsetter.subMesh(),
|
||||||
|
cellSets
|
||||||
|
);
|
||||||
|
subsetTopoSets
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
objects,
|
||||||
|
subsetter.faceMap(),
|
||||||
|
subsetter.subMesh(),
|
||||||
|
faceSets
|
||||||
|
);
|
||||||
|
subsetTopoSets
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
objects,
|
||||||
|
subsetter.pointMap(),
|
||||||
|
subsetter.subMesh(),
|
||||||
|
pointSets
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!overwrite)
|
if (!overwrite)
|
||||||
{
|
{
|
||||||
runTime++;
|
runTime++;
|
||||||
@ -1134,6 +1224,11 @@ int main(int argc, char *argv[])
|
|||||||
Zero
|
Zero
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Update numbering of topoSets
|
||||||
|
topoSet::updateMesh(subsetter.subMesh().facesInstance(), map, cellSets);
|
||||||
|
topoSet::updateMesh(subsetter.subMesh().facesInstance(), map, faceSets);
|
||||||
|
topoSet::updateMesh(subsetter.subMesh().facesInstance(), map, pointSets);
|
||||||
|
|
||||||
|
|
||||||
// Move mesh (since morphing might not do this)
|
// Move mesh (since morphing might not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
|
|||||||
@ -1,9 +1,11 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
|
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
|
-lreconstruct \
|
||||||
-ldynamicMesh
|
-ldynamicMesh
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -60,6 +60,8 @@ Description
|
|||||||
#include "mapPolyMesh.H"
|
#include "mapPolyMesh.H"
|
||||||
#include "unitConversion.H"
|
#include "unitConversion.H"
|
||||||
#include "motionSmoother.H"
|
#include "motionSmoother.H"
|
||||||
|
#include "topoSet.H"
|
||||||
|
#include "processorMeshes.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -450,6 +452,8 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Writing morphed mesh to time " << runTime.timeName() << endl;
|
Info<< "Writing morphed mesh to time " << runTime.timeName() << endl;
|
||||||
|
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
topoSet::removeFiles(mesh);
|
||||||
|
processorMeshes::removeFiles(mesh);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,7 +1,10 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
|
-lreconstruct \
|
||||||
-ldynamicMesh
|
-ldynamicMesh
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -62,6 +62,8 @@ Description
|
|||||||
#include "meshTools.H"
|
#include "meshTools.H"
|
||||||
#include "Pair.H"
|
#include "Pair.H"
|
||||||
#include "globalIndex.H"
|
#include "globalIndex.H"
|
||||||
|
#include "topoSet.H"
|
||||||
|
#include "processorMeshes.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -567,6 +569,8 @@ int main(int argc, char *argv[])
|
|||||||
// Write resulting mesh
|
// Write resulting mesh
|
||||||
Info<< "Writing modified mesh to time " << runTime.timeName() << endl;
|
Info<< "Writing modified mesh to time " << runTime.timeName() << endl;
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
topoSet::removeFiles(mesh);
|
||||||
|
processorMeshes::removeFiles(mesh);
|
||||||
}
|
}
|
||||||
else if (edgeToPos.size())
|
else if (edgeToPos.size())
|
||||||
{
|
{
|
||||||
@ -641,6 +645,8 @@ int main(int argc, char *argv[])
|
|||||||
// Write resulting mesh
|
// Write resulting mesh
|
||||||
Info<< "Writing modified mesh to time " << runTime.timeName() << endl;
|
Info<< "Writing modified mesh to time " << runTime.timeName() << endl;
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
topoSet::removeFiles(mesh);
|
||||||
|
processorMeshes::removeFiles(mesh);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -684,6 +690,8 @@ int main(int argc, char *argv[])
|
|||||||
// Write resulting mesh
|
// Write resulting mesh
|
||||||
Info<< "Writing modified mesh to time " << runTime.timeName() << endl;
|
Info<< "Writing modified mesh to time " << runTime.timeName() << endl;
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
topoSet::removeFiles(mesh);
|
||||||
|
processorMeshes::removeFiles(mesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude
|
-I$(LIB_SRC)/meshTools/lnInclude
|
||||||
|
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
|
-lreconstruct \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-lmeshTools \
|
|
||||||
-lfiniteVolume \
|
|
||||||
-lgenericPatchFields
|
-lgenericPatchFields
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -49,6 +49,7 @@ Description
|
|||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
#include "pointFields.H"
|
#include "pointFields.H"
|
||||||
#include "ReadFields.H"
|
#include "ReadFields.H"
|
||||||
|
#include "processorMeshes.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -197,6 +198,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
mesh.write();
|
mesh.write();
|
||||||
meshCutter.write();
|
meshCutter.write();
|
||||||
|
topoSet::removeFiles(mesh);
|
||||||
|
processorMeshes::removeFiles(mesh);
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,10 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
|
-lreconstruct \
|
||||||
-lmeshTools
|
-lmeshTools
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -53,6 +53,7 @@ Description
|
|||||||
#include "cellCuts.H"
|
#include "cellCuts.H"
|
||||||
#include "cellSet.H"
|
#include "cellSet.H"
|
||||||
#include "meshCutter.H"
|
#include "meshCutter.H"
|
||||||
|
#include "processorMeshes.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -257,6 +258,8 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Writing refined mesh to time " << runTime.timeName() << endl;
|
Info<< "Writing refined mesh to time " << runTime.timeName() << endl;
|
||||||
|
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
topoSet::removeFiles(mesh);
|
||||||
|
processorMeshes::removeFiles(mesh);
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
|
-lreconstruct \
|
||||||
-lgenericPatchFields
|
-lgenericPatchFields
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -44,6 +44,7 @@ Description
|
|||||||
#include "ReadFields.H"
|
#include "ReadFields.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
|
#include "processorMeshes.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -179,6 +180,8 @@ int main(int argc, char *argv[])
|
|||||||
// Take over refinement levels and write to new time directory.
|
// Take over refinement levels and write to new time directory.
|
||||||
Pout<< "Writing mesh to time " << runTime.timeName() << endl;
|
Pout<< "Writing mesh to time " << runTime.timeName() << endl;
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
topoSet::removeFiles(mesh);
|
||||||
|
processorMeshes::removeFiles(mesh);
|
||||||
|
|
||||||
Pout<< "End\n" << endl;
|
Pout<< "End\n" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/surfMesh/lnInclude \
|
-I$(LIB_SRC)/surfMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||||
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude
|
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
@ -11,4 +12,5 @@ EXE_LIBS = \
|
|||||||
-lsurfMesh \
|
-lsurfMesh \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
|
-lreconstruct \
|
||||||
-lextrudeModel
|
-lextrudeModel
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -56,6 +56,7 @@ Description
|
|||||||
#include "wedgePolyPatch.H"
|
#include "wedgePolyPatch.H"
|
||||||
#include "planeExtrusion.H"
|
#include "planeExtrusion.H"
|
||||||
#include "emptyPolyPatch.H"
|
#include "emptyPolyPatch.H"
|
||||||
|
#include "processorMeshes.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -1058,6 +1059,8 @@ int main(int argc, char *argv[])
|
|||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
// Remove any left-over files
|
||||||
|
processorMeshes::removeFiles(mesh);
|
||||||
|
|
||||||
// Need writing cellSet
|
// Need writing cellSet
|
||||||
label nAdded = returnReduce(addedCellsSet.size(), sumOp<label>());
|
label nAdded = returnReduce(addedCellsSet.size(), sumOp<label>());
|
||||||
|
|||||||
@ -3,6 +3,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||||
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude
|
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
@ -10,4 +11,5 @@ EXE_LIBS = \
|
|||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
|
-lreconstruct \
|
||||||
-lextrudeModel
|
-lextrudeModel
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -141,6 +141,7 @@ Notes:
|
|||||||
#include "fvMeshTools.H"
|
#include "fvMeshTools.H"
|
||||||
#include "OBJstream.H"
|
#include "OBJstream.H"
|
||||||
#include "PatchTools.H"
|
#include "PatchTools.H"
|
||||||
|
#include "processorMeshes.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -2646,6 +2647,8 @@ int main(int argc, char *argv[])
|
|||||||
<< " at location " << regionMesh.facesInstance()
|
<< " at location " << regionMesh.facesInstance()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
topoSet::removeFiles(regionMesh);
|
||||||
|
processorMeshes::removeFiles(regionMesh);
|
||||||
|
|
||||||
|
|
||||||
// See if we need to extrude coordinates as well
|
// See if we need to extrude coordinates as well
|
||||||
@ -2847,6 +2850,8 @@ int main(int argc, char *argv[])
|
|||||||
<< " at location " << mesh.facesInstance()
|
<< " at location " << mesh.facesInstance()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
topoSet::removeFiles(mesh);
|
||||||
|
processorMeshes::removeFiles(mesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info << "End\n" << endl;
|
||||||
|
|||||||
@ -2,11 +2,14 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/surfMesh/lnInclude \
|
-I$(LIB_SRC)/surfMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||||
-Iextrude2DMesh/lnInclude \
|
-Iextrude2DMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude
|
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lsurfMesh \
|
-lsurfMesh \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
|
-lreconstruct \
|
||||||
-lextrude2DMesh \
|
-lextrude2DMesh \
|
||||||
-lextrudeModel
|
-lextrudeModel
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -47,6 +47,8 @@ Note
|
|||||||
#include "addPatchCellLayer.H"
|
#include "addPatchCellLayer.H"
|
||||||
#include "patchToPoly2DMesh.H"
|
#include "patchToPoly2DMesh.H"
|
||||||
#include "globalIndex.H"
|
#include "globalIndex.H"
|
||||||
|
#include "topoSet.H"
|
||||||
|
#include "processorMeshes.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -323,6 +325,8 @@ int main(int argc, char *argv[])
|
|||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
|
|
||||||
mesh().write();
|
mesh().write();
|
||||||
|
topoSet::removeFiles(mesh());
|
||||||
|
processorMeshes::removeFiles(mesh());
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/edgeMesh/lnInclude \
|
-I$(LIB_SRC)/edgeMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/parallel/decompose/decompose/lnInclude \
|
-I$(LIB_SRC)/parallel/decompose/decompose/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
@ -22,4 +23,5 @@ EXE_LIBS = \
|
|||||||
-lfileFormats \
|
-lfileFormats \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-ldecompose \
|
-ldecompose \
|
||||||
|
-lreconstruct \
|
||||||
-lsnappyHexMesh
|
-lsnappyHexMesh
|
||||||
|
|||||||
@ -63,6 +63,7 @@ Description
|
|||||||
#include "decompositionModel.H"
|
#include "decompositionModel.H"
|
||||||
#include "fvMeshTools.H"
|
#include "fvMeshTools.H"
|
||||||
#include "profiling.H"
|
#include "profiling.H"
|
||||||
|
#include "processorMeshes.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -673,6 +674,11 @@ void writeMesh
|
|||||||
meshRefinement::writeType(writeLevel | meshRefinement::WRITEMESH),
|
meshRefinement::writeType(writeLevel | meshRefinement::WRITEMESH),
|
||||||
mesh.time().path()/meshRefiner.timeName()
|
mesh.time().path()/meshRefiner.timeName()
|
||||||
);
|
);
|
||||||
|
processorMeshes::removeFiles(mesh);
|
||||||
|
if (!debugLevel)
|
||||||
|
{
|
||||||
|
topoSet::removeFiles(mesh);
|
||||||
|
}
|
||||||
Info<< "Wrote mesh in = "
|
Info<< "Wrote mesh in = "
|
||||||
<< mesh.time().cpuTimeIncrement() << " s." << endl;
|
<< mesh.time().cpuTimeIncrement() << " s." << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,10 +2,12 @@ EXE_INC = \
|
|||||||
-IfaceSelection \
|
-IfaceSelection \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude
|
-I$(LIB_SRC)/meshTools/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
|
-lreconstruct \
|
||||||
-lgenericPatchFields
|
-lgenericPatchFields
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -53,6 +53,8 @@ Description
|
|||||||
#include "faceSelection.H"
|
#include "faceSelection.H"
|
||||||
|
|
||||||
#include "fvMeshTools.H"
|
#include "fvMeshTools.H"
|
||||||
|
#include "topoSet.H"
|
||||||
|
#include "processorMeshes.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -978,6 +980,8 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Writing mesh to " << runTime.timeName() << endl;
|
Info<< "Writing mesh to " << runTime.timeName() << endl;
|
||||||
|
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
topoSet::removeFiles(mesh);
|
||||||
|
processorMeshes::removeFiles(mesh);
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,10 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude
|
-I$(LIB_SRC)/meshTools/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
|
-lreconstruct \
|
||||||
-lmeshTools
|
-lmeshTools
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -52,6 +52,7 @@ Description
|
|||||||
#include "polyTopoChange.H"
|
#include "polyTopoChange.H"
|
||||||
#include "polyModifyFace.H"
|
#include "polyModifyFace.H"
|
||||||
#include "wordReList.H"
|
#include "wordReList.H"
|
||||||
|
#include "processorMeshes.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -900,6 +901,8 @@ int main(int argc, char *argv[])
|
|||||||
// Write resulting mesh
|
// Write resulting mesh
|
||||||
Info<< "Writing repatched mesh to " << runTime.timeName() << nl << endl;
|
Info<< "Writing repatched mesh to " << runTime.timeName() << nl << endl;
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
topoSet::removeFiles(mesh);
|
||||||
|
processorMeshes::removeFiles(mesh);
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-lmeshTools
|
-lreconstruct
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -35,6 +35,8 @@ Description
|
|||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "mergePolyMesh.H"
|
#include "mergePolyMesh.H"
|
||||||
|
#include "topoSet.H"
|
||||||
|
#include "processorMeshes.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -163,6 +165,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
masterMesh.write();
|
masterMesh.write();
|
||||||
|
topoSet::removeFiles(masterMesh);
|
||||||
|
processorMeshes::removeFiles(masterMesh);
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
|
||||||
-lgenericPatchFields \
|
-lgenericPatchFields \
|
||||||
-lmeshTools \
|
-lreconstruct \
|
||||||
-ldynamicMesh
|
-ldynamicMesh
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -63,6 +63,7 @@ Description
|
|||||||
#include "ReadFields.H"
|
#include "ReadFields.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
|
#include "processorMeshes.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -362,6 +363,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
Pout<< "Writing mesh to time " << runTime.timeName() << endl;
|
Pout<< "Writing mesh to time " << runTime.timeName() << endl;
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
topoSet::removeFiles(mesh);
|
||||||
|
processorMeshes::removeFiles(mesh);
|
||||||
|
|
||||||
// Dump duplicated points (if any)
|
// Dump duplicated points (if any)
|
||||||
if (split)
|
if (split)
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lgenericPatchFields \
|
-lgenericPatchFields \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
|
-lreconstruct \
|
||||||
-lmeshTools
|
-lmeshTools
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -74,6 +74,8 @@ Note
|
|||||||
#include "ReadFields.H"
|
#include "ReadFields.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
|
#include "topoSet.H"
|
||||||
|
#include "processorMeshes.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -552,6 +554,8 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Writing dual mesh to " << runTime.timeName() << endl;
|
Info<< "Writing dual mesh to " << runTime.timeName() << endl;
|
||||||
|
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
topoSet::removeFiles(mesh);
|
||||||
|
processorMeshes::removeFiles(mesh);
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -696,7 +696,6 @@ int main(int argc, char *argv[])
|
|||||||
bool writeMaps = false;
|
bool writeMaps = false;
|
||||||
bool orderPoints = false;
|
bool orderPoints = false;
|
||||||
label blockSize = 0;
|
label blockSize = 0;
|
||||||
bool renumberSets = true;
|
|
||||||
|
|
||||||
// Construct renumberMethod
|
// Construct renumberMethod
|
||||||
autoPtr<IOdictionary> renumberDictPtr;
|
autoPtr<IOdictionary> renumberDictPtr;
|
||||||
@ -756,8 +755,6 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Writing renumber maps (new to old) to polyMesh." << nl
|
Info<< "Writing renumber maps (new to old) to polyMesh." << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
renumberSets = renumberDict.lookupOrDefault("renumberSets", true);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -884,46 +881,12 @@ int main(int argc, char *argv[])
|
|||||||
PtrList<cellSet> cellSets;
|
PtrList<cellSet> cellSets;
|
||||||
PtrList<faceSet> faceSets;
|
PtrList<faceSet> faceSets;
|
||||||
PtrList<pointSet> pointSets;
|
PtrList<pointSet> pointSets;
|
||||||
if (renumberSets)
|
|
||||||
{
|
{
|
||||||
// Read sets
|
// Read sets
|
||||||
IOobjectList objects(mesh, mesh.facesInstance(), "polyMesh/sets");
|
IOobjectList objects(mesh, mesh.facesInstance(), "polyMesh/sets");
|
||||||
{
|
ReadFields(objects, cellSets);
|
||||||
IOobjectList cSets(objects.lookupClass(cellSet::typeName));
|
ReadFields(objects, faceSets);
|
||||||
if (cSets.size())
|
ReadFields(objects, pointSets);
|
||||||
{
|
|
||||||
Info<< "Reading cellSets:" << endl;
|
|
||||||
forAllConstIter(IOobjectList, cSets, iter)
|
|
||||||
{
|
|
||||||
cellSets.append(new cellSet(*iter()));
|
|
||||||
Info<< " " << cellSets.last().name() << endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{
|
|
||||||
IOobjectList fSets(objects.lookupClass(faceSet::typeName));
|
|
||||||
if (fSets.size())
|
|
||||||
{
|
|
||||||
Info<< "Reading faceSets:" << endl;
|
|
||||||
forAllConstIter(IOobjectList, fSets, iter)
|
|
||||||
{
|
|
||||||
faceSets.append(new faceSet(*iter()));
|
|
||||||
Info<< " " << faceSets.last().name() << endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{
|
|
||||||
IOobjectList pSets(objects.lookupClass(pointSet::typeName));
|
|
||||||
if (pSets.size())
|
|
||||||
{
|
|
||||||
Info<< "Reading pointSets:" << endl;
|
|
||||||
forAllConstIter(IOobjectList, pSets, iter)
|
|
||||||
{
|
|
||||||
pointSets.append(new pointSet(*iter()));
|
|
||||||
Info<< " " << pointSets.last().name() << endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1288,9 +1251,18 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
mesh.setInstance(oldInstance);
|
mesh.setInstance(oldInstance);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mesh.setInstance(runTime.timeName());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Info<< "Writing mesh to " << mesh.facesInstance() << endl;
|
Info<< "Writing mesh to " << mesh.facesInstance() << endl;
|
||||||
|
|
||||||
|
topoSet::updateMesh(mesh.facesInstance(), map(), cellSets);
|
||||||
|
topoSet::updateMesh(mesh.facesInstance(), map(), faceSets);
|
||||||
|
topoSet::updateMesh(mesh.facesInstance(), map(), pointSets);
|
||||||
|
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
|
||||||
if (cellProcAddressing.headerOk())
|
if (cellProcAddressing.headerOk())
|
||||||
@ -1437,27 +1409,6 @@ int main(int argc, char *argv[])
|
|||||||
).write();
|
).write();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (renumberSets)
|
|
||||||
{
|
|
||||||
forAll(cellSets, i)
|
|
||||||
{
|
|
||||||
cellSets[i].updateMesh(map());
|
|
||||||
cellSets[i].instance() = mesh.facesInstance();
|
|
||||||
cellSets[i].write();
|
|
||||||
}
|
|
||||||
forAll(faceSets, i)
|
|
||||||
{
|
|
||||||
faceSets[i].updateMesh(map());
|
|
||||||
faceSets[i].instance() = mesh.facesInstance();
|
|
||||||
faceSets[i].write();
|
|
||||||
}
|
|
||||||
forAll(pointSets, i)
|
|
||||||
{
|
|
||||||
pointSets[i].updateMesh(map());
|
|
||||||
pointSets[i].instance() = mesh.facesInstance();
|
|
||||||
pointSets[i].write();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -34,9 +34,6 @@ sortCoupledFaceCells false;
|
|||||||
// Optional entry: sort points into internal and boundary points
|
// Optional entry: sort points into internal and boundary points
|
||||||
//orderPoints false;
|
//orderPoints false;
|
||||||
|
|
||||||
// Optional: suppress renumbering cellSets,faceSets,pointSets
|
|
||||||
//renumberSets false;
|
|
||||||
|
|
||||||
|
|
||||||
method CuthillMcKee;
|
method CuthillMcKee;
|
||||||
//method Sloan;
|
//method Sloan;
|
||||||
|
|||||||
@ -1,7 +1,10 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude
|
-I$(LIB_SRC)/meshTools/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
|
-lreconstruct \
|
||||||
-lmeshTools
|
-lmeshTools
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -56,6 +56,7 @@ Description
|
|||||||
#include "attachPolyTopoChanger.H"
|
#include "attachPolyTopoChanger.H"
|
||||||
#include "regionSide.H"
|
#include "regionSide.H"
|
||||||
#include "primitiveFacePatch.H"
|
#include "primitiveFacePatch.H"
|
||||||
|
#include "processorMeshes.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -287,6 +288,9 @@ int main(int argc, char *argv[])
|
|||||||
<< "Failed writing polyMesh."
|
<< "Failed writing polyMesh."
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
topoSet::removeFiles(mesh);
|
||||||
|
processorMeshes::removeFiles(mesh);
|
||||||
|
|
||||||
|
|
||||||
Info<< nl << "End" << nl << endl;
|
Info<< nl << "End" << nl << endl;
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude
|
-I$(LIB_SRC)/meshTools/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lreconstruct \
|
||||||
-lgenericPatchFields \
|
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-lmeshTools
|
-lgenericPatchFields
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -107,6 +107,7 @@ Description
|
|||||||
#include "mappedWallPolyPatch.H"
|
#include "mappedWallPolyPatch.H"
|
||||||
#include "fvMeshTools.H"
|
#include "fvMeshTools.H"
|
||||||
#include "zeroGradientFvPatchFields.H"
|
#include "zeroGradientFvPatchFields.H"
|
||||||
|
#include "processorMeshes.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -941,6 +942,8 @@ void createAndWriteRegion
|
|||||||
|
|
||||||
newMesh().setInstance(newMeshInstance);
|
newMesh().setInstance(newMeshInstance);
|
||||||
newMesh().write();
|
newMesh().write();
|
||||||
|
topoSet::removeFiles(newMesh());
|
||||||
|
processorMeshes::removeFiles(newMesh());
|
||||||
|
|
||||||
// Write addressing files like decomposePar
|
// Write addressing files like decomposePar
|
||||||
Info<< "Writing addressing to base mesh" << endl;
|
Info<< "Writing addressing to base mesh" << endl;
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-ldynamicMesh \
|
-lreconstruct \
|
||||||
-lgenericPatchFields
|
-lgenericPatchFields
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -41,11 +41,15 @@ Description
|
|||||||
|
|
||||||
#include "fvMeshSubset.H"
|
#include "fvMeshSubset.H"
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "cellSet.H"
|
|
||||||
#include "IOobjectList.H"
|
#include "IOobjectList.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "topoDistanceData.H"
|
#include "topoDistanceData.H"
|
||||||
#include "FaceCellWave.H"
|
#include "FaceCellWave.H"
|
||||||
|
#include "cellSet.H"
|
||||||
|
#include "faceSet.H"
|
||||||
|
#include "pointSet.H"
|
||||||
|
#include "ReadFields.H"
|
||||||
|
#include "processorMeshes.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -262,6 +266,59 @@ void subsetDimensionedFields
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class TopoSet>
|
||||||
|
void subsetTopoSets
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const IOobjectList& objectsList,
|
||||||
|
const labelList& map,
|
||||||
|
const fvMesh& subMesh,
|
||||||
|
PtrList<TopoSet>& subSets
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// Read original sets
|
||||||
|
PtrList<TopoSet> sets;
|
||||||
|
ReadFields<TopoSet>(objectsList, sets);
|
||||||
|
|
||||||
|
subSets.setSize(sets.size());
|
||||||
|
forAll(sets, i)
|
||||||
|
{
|
||||||
|
TopoSet& set = sets[i];
|
||||||
|
|
||||||
|
Info<< "Subsetting " << set.type() << " " << set.name() << endl;
|
||||||
|
|
||||||
|
// Map the data
|
||||||
|
PackedBoolList isSet(set.maxSize(mesh));
|
||||||
|
forAllConstIter(labelHashSet, set, iter)
|
||||||
|
{
|
||||||
|
isSet[iter.key()] = true;
|
||||||
|
}
|
||||||
|
label nSet = 0;
|
||||||
|
forAll(map, i)
|
||||||
|
{
|
||||||
|
if (isSet[map[i]])
|
||||||
|
{
|
||||||
|
nSet++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
subSets.set
|
||||||
|
(
|
||||||
|
i,
|
||||||
|
new TopoSet(subMesh, set.name(), nSet, IOobject::AUTO_WRITE)
|
||||||
|
);
|
||||||
|
TopoSet& subSet = subSets[i];
|
||||||
|
forAll(map, i)
|
||||||
|
{
|
||||||
|
if (isSet[map[i]])
|
||||||
|
{
|
||||||
|
subSet.insert(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
@ -557,6 +614,43 @@ int main(int argc, char *argv[])
|
|||||||
subsetDimensionedFields(subsetter, tensorDimNames, tensorDimFlds);
|
subsetDimensionedFields(subsetter, tensorDimNames, tensorDimFlds);
|
||||||
|
|
||||||
|
|
||||||
|
// topoSets and subset
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
PtrList<cellSet> cellSets;
|
||||||
|
PtrList<faceSet> faceSets;
|
||||||
|
PtrList<pointSet> pointSets;
|
||||||
|
{
|
||||||
|
IOobjectList objects(mesh, mesh.facesInstance(), "polyMesh/sets");
|
||||||
|
objects.remove(currentSet);
|
||||||
|
subsetTopoSets
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
objects,
|
||||||
|
subsetter.cellMap(),
|
||||||
|
subsetter.subMesh(),
|
||||||
|
cellSets
|
||||||
|
);
|
||||||
|
subsetTopoSets
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
objects,
|
||||||
|
subsetter.faceMap(),
|
||||||
|
subsetter.subMesh(),
|
||||||
|
faceSets
|
||||||
|
);
|
||||||
|
subsetTopoSets
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
objects,
|
||||||
|
subsetter.pointMap(),
|
||||||
|
subsetter.subMesh(),
|
||||||
|
pointSets
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Write mesh and fields to new time
|
// Write mesh and fields to new time
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
@ -564,15 +658,22 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
runTime.setTime(instant(fieldsInstance), 0);
|
runTime.setTime(instant(fieldsInstance), 0);
|
||||||
subsetter.subMesh().setInstance(meshInstance);
|
subsetter.subMesh().setInstance(meshInstance);
|
||||||
|
topoSet::setInstance(meshInstance, cellSets);
|
||||||
|
topoSet::setInstance(meshInstance, faceSets);
|
||||||
|
topoSet::setInstance(meshInstance, pointSets);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
runTime++;
|
runTime++;
|
||||||
|
subsetter.subMesh().setInstance(runTime.timeName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Writing subsetted mesh and fields to time " << runTime.timeName()
|
Info<< "Writing subsetted mesh and fields to time " << runTime.timeName()
|
||||||
<< endl;
|
<< endl;
|
||||||
subsetter.subMesh().write();
|
subsetter.subMesh().write();
|
||||||
|
processorMeshes::removeFiles(subsetter.subMesh());
|
||||||
|
|
||||||
|
|
||||||
// Subsetting adds 'subset' prefix. Rename field to be like original.
|
// Subsetting adds 'subset' prefix. Rename field to be like original.
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -53,6 +53,7 @@ Description
|
|||||||
#include "fvMeshAdder.H"
|
#include "fvMeshAdder.H"
|
||||||
#include "polyTopoChange.H"
|
#include "polyTopoChange.H"
|
||||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||||
|
#include "topoSet.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -731,6 +732,7 @@ int main(int argc, char *argv[])
|
|||||||
<< "Failed writing polyMesh."
|
<< "Failed writing polyMesh."
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
topoSet::removeFiles(masterMesh);
|
||||||
|
|
||||||
if (writeCellDist)
|
if (writeCellDist)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -75,6 +75,7 @@ Usage
|
|||||||
#include "processorFvPatchField.H"
|
#include "processorFvPatchField.H"
|
||||||
#include "zeroGradientFvPatchFields.H"
|
#include "zeroGradientFvPatchFields.H"
|
||||||
#include "decompositionModel.H"
|
#include "decompositionModel.H"
|
||||||
|
#include "topoSet.H"
|
||||||
|
|
||||||
#include "parFvFieldReconstructor.H"
|
#include "parFvFieldReconstructor.H"
|
||||||
#include "parLagrangianRedistributor.H"
|
#include "parLagrangianRedistributor.H"
|
||||||
@ -1136,6 +1137,7 @@ autoPtr<mapDistributePolyMesh> redistributeAndWrite
|
|||||||
runTime.TimePaths::caseName() = baseRunTime.caseName();
|
runTime.TimePaths::caseName() = baseRunTime.caseName();
|
||||||
|
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
topoSet::removeFiles(mesh);
|
||||||
|
|
||||||
// Now we've written all. Reset caseName on master
|
// Now we've written all. Reset caseName on master
|
||||||
Info<< "Restoring caseName to " << proc0CaseName << endl;
|
Info<< "Restoring caseName to " << proc0CaseName << endl;
|
||||||
@ -1145,6 +1147,7 @@ autoPtr<mapDistributePolyMesh> redistributeAndWrite
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
topoSet::removeFiles(mesh);
|
||||||
}
|
}
|
||||||
Info<< "Written redistributed mesh to " << mesh.facesInstance() << nl
|
Info<< "Written redistributed mesh to " << mesh.facesInstance() << nl
|
||||||
<< endl;
|
<< 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>
|
return autoPtr<mapDistributePolyMesh>
|
||||||
(
|
(
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -28,6 +28,7 @@ License
|
|||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "mapDistributePolyMesh.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -228,6 +229,37 @@ void cellSet::updateMesh(const mapPolyMesh& morphMap)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void cellSet::distribute(const mapDistributePolyMesh& map)
|
||||||
|
{
|
||||||
|
boolList inSet(map.nOldCells());
|
||||||
|
forAllConstIter(cellSet, *this, iter)
|
||||||
|
{
|
||||||
|
inSet[iter.key()] = true;
|
||||||
|
}
|
||||||
|
map.distributeCellData(inSet);
|
||||||
|
|
||||||
|
// Count
|
||||||
|
label n = 0;
|
||||||
|
forAll(inSet, celli)
|
||||||
|
{
|
||||||
|
if (inSet[celli])
|
||||||
|
{
|
||||||
|
n++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
clear();
|
||||||
|
resize(n);
|
||||||
|
forAll(inSet, celli)
|
||||||
|
{
|
||||||
|
if (inSet[celli])
|
||||||
|
{
|
||||||
|
insert(celli);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::cellSet::writeDebug
|
void Foam::cellSet::writeDebug
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -147,9 +147,12 @@ public:
|
|||||||
//- Return max index+1.
|
//- Return max index+1.
|
||||||
virtual label maxSize(const polyMesh& mesh) const;
|
virtual label maxSize(const polyMesh& mesh) const;
|
||||||
|
|
||||||
//- Update any stored data for new labels
|
//- Update any stored data for new labels.
|
||||||
virtual void updateMesh(const mapPolyMesh& morphMap);
|
virtual void updateMesh(const mapPolyMesh& morphMap);
|
||||||
|
|
||||||
|
//- Update any stored data for mesh redistribution.
|
||||||
|
virtual void distribute(const mapDistributePolyMesh&);
|
||||||
|
|
||||||
//- Write maxLen items with label and coordinates.
|
//- Write maxLen items with label and coordinates.
|
||||||
virtual void writeDebug
|
virtual void writeDebug
|
||||||
(
|
(
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -27,6 +27,7 @@ License
|
|||||||
#include "mapPolyMesh.H"
|
#include "mapPolyMesh.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "syncTools.H"
|
#include "syncTools.H"
|
||||||
|
#include "mapDistributePolyMesh.H"
|
||||||
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
@ -161,6 +162,37 @@ void faceSet::updateMesh(const mapPolyMesh& morphMap)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void faceSet::distribute(const mapDistributePolyMesh& map)
|
||||||
|
{
|
||||||
|
boolList inSet(map.nOldFaces());
|
||||||
|
forAllConstIter(faceSet, *this, iter)
|
||||||
|
{
|
||||||
|
inSet[iter.key()] = true;
|
||||||
|
}
|
||||||
|
map.distributeFaceData(inSet);
|
||||||
|
|
||||||
|
// Count
|
||||||
|
label n = 0;
|
||||||
|
forAll(inSet, facei)
|
||||||
|
{
|
||||||
|
if (inSet[facei])
|
||||||
|
{
|
||||||
|
n++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
clear();
|
||||||
|
resize(n);
|
||||||
|
forAll(inSet, facei)
|
||||||
|
{
|
||||||
|
if (inSet[facei])
|
||||||
|
{
|
||||||
|
insert(facei);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void faceSet::writeDebug
|
void faceSet::writeDebug
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -116,6 +116,9 @@ public:
|
|||||||
//- Update any stored data for new labels
|
//- Update any stored data for new labels
|
||||||
virtual void updateMesh(const mapPolyMesh& morphMap);
|
virtual void updateMesh(const mapPolyMesh& morphMap);
|
||||||
|
|
||||||
|
//- Update any stored data for mesh redistribution.
|
||||||
|
virtual void distribute(const mapDistributePolyMesh&);
|
||||||
|
|
||||||
//- Write maxLen items with label and coordinates.
|
//- Write maxLen items with label and coordinates.
|
||||||
virtual void writeDebug
|
virtual void writeDebug
|
||||||
(
|
(
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -27,6 +27,7 @@ License
|
|||||||
#include "mapPolyMesh.H"
|
#include "mapPolyMesh.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "syncTools.H"
|
#include "syncTools.H"
|
||||||
|
#include "mapDistributePolyMesh.H"
|
||||||
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
@ -156,6 +157,37 @@ void pointSet::updateMesh(const mapPolyMesh& morphMap)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void pointSet::distribute(const mapDistributePolyMesh& map)
|
||||||
|
{
|
||||||
|
boolList inSet(map.nOldPoints());
|
||||||
|
forAllConstIter(pointSet, *this, iter)
|
||||||
|
{
|
||||||
|
inSet[iter.key()] = true;
|
||||||
|
}
|
||||||
|
map.distributePointData(inSet);
|
||||||
|
|
||||||
|
// Count
|
||||||
|
label n = 0;
|
||||||
|
forAll(inSet, pointi)
|
||||||
|
{
|
||||||
|
if (inSet[pointi])
|
||||||
|
{
|
||||||
|
n++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
clear();
|
||||||
|
resize(n);
|
||||||
|
forAll(inSet, pointi)
|
||||||
|
{
|
||||||
|
if (inSet[pointi])
|
||||||
|
{
|
||||||
|
insert(pointi);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void pointSet::writeDebug
|
void pointSet::writeDebug
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -119,6 +119,9 @@ public:
|
|||||||
//- Update any stored data for new labels
|
//- Update any stored data for new labels
|
||||||
//virtual void updateMesh(const polyTopoChange& meshMod);
|
//virtual void updateMesh(const polyTopoChange& meshMod);
|
||||||
|
|
||||||
|
//- Update any stored data for mesh redistribution.
|
||||||
|
virtual void distribute(const mapDistributePolyMesh&);
|
||||||
|
|
||||||
//- Write maxLen items with label and coordinates.
|
//- Write maxLen items with label and coordinates.
|
||||||
virtual void writeDebug
|
virtual void writeDebug
|
||||||
(
|
(
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -550,6 +550,26 @@ void Foam::topoSet::updateMesh(const mapPolyMesh&)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::topoSet::removeFiles(const polyMesh& mesh)
|
||||||
|
{
|
||||||
|
IOobject io
|
||||||
|
(
|
||||||
|
"dummy",
|
||||||
|
mesh.facesInstance(),
|
||||||
|
mesh.meshSubDir/"sets",
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
fileName setsDir(io.path());
|
||||||
|
|
||||||
|
if (debug) DebugVar(setsDir);
|
||||||
|
|
||||||
|
if (isDir(setsDir))
|
||||||
|
{
|
||||||
|
rmDir(setsDir);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::topoSet::operator=(const topoSet& rhs)
|
void Foam::topoSet::operator=(const topoSet& rhs)
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -32,6 +32,7 @@ Description
|
|||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
topoSet.C
|
topoSet.C
|
||||||
|
topoSetTemplates.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -54,6 +55,7 @@ namespace Foam
|
|||||||
class mapPolyMesh;
|
class mapPolyMesh;
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class primitiveMesh;
|
class primitiveMesh;
|
||||||
|
class mapDistributePolyMesh;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class topoSet Declaration
|
Class topoSet Declaration
|
||||||
@ -297,9 +299,28 @@ public:
|
|||||||
//- Update any stored data for new labels. Not implemented.
|
//- Update any stored data for new labels. Not implemented.
|
||||||
virtual void updateMesh(const mapPolyMesh& morphMap);
|
virtual void updateMesh(const mapPolyMesh& morphMap);
|
||||||
|
|
||||||
|
//- Update any stored data for mesh redistribution.
|
||||||
|
virtual void distribute(const mapDistributePolyMesh&) = 0;
|
||||||
|
|
||||||
//- Return max allowable index (+1). Not implemented.
|
//- Return max allowable index (+1). Not implemented.
|
||||||
virtual label maxSize(const polyMesh& mesh) const = 0;
|
virtual label maxSize(const polyMesh& mesh) const = 0;
|
||||||
|
|
||||||
|
//- Helper: call updateMesh on all sets in container (and
|
||||||
|
// updates instance)
|
||||||
|
template<class Container>
|
||||||
|
static void updateMesh
|
||||||
|
(
|
||||||
|
const fileName& instance,
|
||||||
|
const mapPolyMesh&,
|
||||||
|
Container&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Helper: set instance on all sets in container
|
||||||
|
template<class Container>
|
||||||
|
static void setInstance(const fileName& instance, Container&);
|
||||||
|
|
||||||
|
//- Helper: remove all sets files from mesh instance
|
||||||
|
static void removeFiles(const polyMesh&);
|
||||||
|
|
||||||
|
|
||||||
// Member operators
|
// Member operators
|
||||||
@ -316,6 +337,12 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
#include "topoSetTemplates.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
59
src/meshTools/sets/topoSets/topoSetTemplates.C
Normal file
59
src/meshTools/sets/topoSets/topoSetTemplates.C
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Container>
|
||||||
|
void Foam::topoSet::setInstance
|
||||||
|
(
|
||||||
|
const fileName& instance,
|
||||||
|
Container& lst
|
||||||
|
)
|
||||||
|
{
|
||||||
|
forAll(lst, i)
|
||||||
|
{
|
||||||
|
lst[i].instance() = instance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Container>
|
||||||
|
void Foam::topoSet::updateMesh
|
||||||
|
(
|
||||||
|
const fileName& instance,
|
||||||
|
const mapPolyMesh& map,
|
||||||
|
Container& lst
|
||||||
|
)
|
||||||
|
{
|
||||||
|
forAll(lst, i)
|
||||||
|
{
|
||||||
|
lst[i].instance() = instance;
|
||||||
|
lst[i].updateMesh(map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -27,6 +27,14 @@ License
|
|||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "primitiveMesh.H"
|
#include "primitiveMesh.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(processorMeshes, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::processorMeshes::read()
|
void Foam::processorMeshes::read()
|
||||||
@ -259,4 +267,52 @@ void Foam::processorMeshes::reconstructPoints(fvMesh& mesh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::processorMeshes::removeFiles(const polyMesh& mesh)
|
||||||
|
{
|
||||||
|
fileName pointPath
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"pointProcAddressing",
|
||||||
|
mesh.facesInstance(),
|
||||||
|
mesh.meshSubDir,
|
||||||
|
mesh
|
||||||
|
).objectPath()
|
||||||
|
);
|
||||||
|
if (debug) DebugVar(pointPath);
|
||||||
|
rm(pointPath);
|
||||||
|
|
||||||
|
rm
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"faceProcAddressing",
|
||||||
|
mesh.facesInstance(),
|
||||||
|
mesh.meshSubDir,
|
||||||
|
mesh
|
||||||
|
).objectPath()
|
||||||
|
);
|
||||||
|
rm
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"cellProcAddressing",
|
||||||
|
mesh.facesInstance(),
|
||||||
|
mesh.meshSubDir,
|
||||||
|
mesh
|
||||||
|
).objectPath()
|
||||||
|
);
|
||||||
|
rm
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"boundaryProcAddressing",
|
||||||
|
mesh.facesInstance(),
|
||||||
|
mesh.meshSubDir,
|
||||||
|
mesh
|
||||||
|
).objectPath()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -89,6 +89,10 @@ class processorMeshes
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
ClassName("processorMeshes");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
@ -133,7 +137,8 @@ public:
|
|||||||
return boundaryProcAddressing_;
|
return boundaryProcAddressing_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- Helper: remove all procAddressing files from mesh instance
|
||||||
|
static void removeFiles(const polyMesh& mesh);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user