Skip to content

Commit 69da8f3

Browse files
author
Henry Weller
committed
stitchMesh: Replacement utility based on the new patchIntersection algorithm
The mergePatchPairs functionality in blockMesh also now uses patchIntersection. The new mergePatchPairs and patchIntersection replaces the old, fragile and practically unusable polyTopoChanger::slidingInterface functionality the removal of which has allowed the deletion of a lot of other ancient and otherwise unused clutter including polyTopoChanger, polyMeshModifier, polyTopoChange::setAction and associated addObject/*, modifyObject/* and removeObject/*. This rationalisation paves the way for the completion of the update of zone handling allowing mesh points, faces and cells to exist in multiple zones which is currently not supported with mesh topology change. Application stitchMesh Description Utility to stitch or conform pairs of patches, converting the patch faces either into internal faces or conformal faces or another patch. Usage \b stitchMesh (\<list of patch pairs\>) E.g. to stitch patches \c top1 to \c top2 and \c bottom1 to \c bottom2 stitchMesh "((top1 top2) (bottom1 bottom2))" Options: - \par -overwrite \n Replace the old mesh with the new one, rather than writing the new one into a separate time directory - \par -region \<name\> Specify an alternative mesh region. - \par -fields Update vol and point fields - \par -tol Merge tolerance relative to local edge length (default 1e-4) See also Foam::mergePatchPairs
1 parent 602347f commit 69da8f3

File tree

57 files changed

+7724
-9847
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+7724
-9847
lines changed

applications/utilities/mesh/generation/blockMesh/blockMesh.C

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
========= |
33
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
44
\\ / O peration | Website: https://openfoam.org
5-
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
5+
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
66
\\/ M anipulation |
77
-------------------------------------------------------------------------------
88
License
@@ -48,24 +48,16 @@ Usage
4848
4949
\*---------------------------------------------------------------------------*/
5050

51+
#include "argList.H"
5152
#include "Time.H"
52-
#include "IOdictionary.H"
53-
#include "IOPtrList.H"
5453
#include "systemDict.H"
55-
5654
#include "blockMesh.H"
57-
#include "attachPolyTopoChanger.H"
55+
#include "mergePatchPairs.H"
5856
#include "polyTopoChange.H"
5957
#include "emptyPolyPatch.H"
6058
#include "cyclicPolyPatch.H"
61-
62-
#include "argList.H"
63-
#include "OSspecific.H"
6459
#include "OFstream.H"
6560

66-
#include "Pair.H"
67-
#include "slidingInterface.H"
68-
6961
using namespace Foam;
7062

7163
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -236,22 +228,23 @@ int main(int argc, char *argv[])
236228
// Read in a list of dictionaries for the merge patch pairs
237229
if (meshDict.found("mergePatchPairs"))
238230
{
239-
List<Pair<word>> mergePatchPairs
231+
List<Pair<word>> patchPairNames
240232
(
241233
meshDict.lookup("mergePatchPairs")
242234
);
243235

244-
#include "mergePatchPairs.H"
236+
if (patchPairNames.size())
237+
{
238+
const word oldInstance = mesh.pointsInstance();
239+
mergePatchPairs(mesh, patchPairNames, 1e-4);
240+
mesh.setInstance(oldInstance);
241+
}
245242
}
246243
else
247244
{
248-
Info<< nl << "There are no merge patch pairs edges" << endl;
245+
Info<< nl << "No patch pairs to merge" << endl;
249246
}
250247

251-
252-
// Set any cellZones (note: cell labelling unaffected by above
253-
// mergePatchPairs)
254-
255248
label nZones = blocks.numZonedBlocks();
256249

257250
if (nZones > 0)

applications/utilities/mesh/generation/blockMesh/mergePatchPairs.H

Lines changed: 0 additions & 119 deletions
This file was deleted.

0 commit comments

Comments
 (0)