mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: checkMesh: use built-in merging
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015-2017 OpenFOAM Foundation
|
Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2022 OpenCFD Ltd.
|
Copyright (C) 2015-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -233,58 +233,15 @@ void Foam::mergeAndWrite
|
|||||||
const fileName& outputDir
|
const fileName& outputDir
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (Pstream::parRun())
|
writer.open
|
||||||
{
|
(
|
||||||
labelList pointToGlobal;
|
setPatch.localPoints(),
|
||||||
labelList uniqueMeshPointLabels;
|
setPatch.localFaces(),
|
||||||
autoPtr<globalIndex> globalPoints;
|
(outputDir / name)
|
||||||
autoPtr<globalIndex> globalFaces;
|
);
|
||||||
faceList mergedFaces;
|
|
||||||
pointField mergedPoints;
|
|
||||||
Foam::PatchTools::gatherAndMerge
|
|
||||||
(
|
|
||||||
mesh,
|
|
||||||
setPatch.localFaces(),
|
|
||||||
setPatch.meshPoints(),
|
|
||||||
setPatch.meshPointMap(),
|
|
||||||
|
|
||||||
pointToGlobal,
|
writer.write();
|
||||||
uniqueMeshPointLabels,
|
writer.clear();
|
||||||
globalPoints,
|
|
||||||
globalFaces,
|
|
||||||
|
|
||||||
mergedFaces,
|
|
||||||
mergedPoints
|
|
||||||
);
|
|
||||||
|
|
||||||
// Write
|
|
||||||
if (Pstream::master())
|
|
||||||
{
|
|
||||||
writer.open
|
|
||||||
(
|
|
||||||
mergedPoints,
|
|
||||||
mergedFaces,
|
|
||||||
(outputDir / name),
|
|
||||||
false // serial - already merged
|
|
||||||
);
|
|
||||||
|
|
||||||
writer.write();
|
|
||||||
writer.clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
writer.open
|
|
||||||
(
|
|
||||||
setPatch.localPoints(),
|
|
||||||
setPatch.localFaces(),
|
|
||||||
(outputDir / name),
|
|
||||||
false // serial - already merged
|
|
||||||
);
|
|
||||||
|
|
||||||
writer.write();
|
|
||||||
writer.clear();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user