Loading...
Searching...
No Matches
checkTopology.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2023 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
12
13Description
14 Global functions for topology checking
15
16\*---------------------------------------------------------------------------*/
17
18#include "labelList.H"
19#include "autoPtr.H"
20#include "ZoneMesh.H"
21#include "topoSet.H"
22
23namespace Foam
24{
25
26// Forward Declarations
27class polyMesh;
28class pointSet;
29class coordSetWriter;
30class surfaceWriter;
31
32
33// Check patch topology.
34// In parallel, uses count of edge connections
35template<class PatchType>
36bool checkPatch
37(
38 const bool allGeometry,
39 const std::string& name,
40 const polyMesh& mesh,
41 const PatchType& pp,
42 const labelUList& meshEdges,
43 labelHashSet* pointSetPtr = nullptr,
44 labelHashSet* badEdgesPtr = nullptr
45);
46
47// OLDER CODE
48// ~~~~~~~~~~
49// Check patch topology.
50// In parallel, uses mesh face ids and global face numbering
51template<class PatchType>
52bool checkPatch
53(
54 const bool allGeometry,
55 const std::string& name,
56 const polyMesh& mesh,
57 const PatchType& pp,
58 const labelUList& meshFaces,
59 const labelUList& meshEdges,
60 labelHashSet* pointSetPtr = nullptr,
61 labelHashSet* badEdgesPtr = nullptr
62);
63
64template<class Zone>
65label checkZones
66(
67 const polyMesh& mesh,
69 topoSet& set
70);
71
72label checkTopology
73(
74 const polyMesh& mesh,
75 const bool allTopology,
76 const bool allGeometry,
77 autoPtr<surfaceWriter>& surfWriter,
78 autoPtr<coordSetWriter>& setWriter,
79 const bool writeBadEdges = false
80);
81
82} // End namespace Foam
83
84// ************************************************************************* //
labelHashSet * pointSetPtr
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
labelHashSet * badEdgesPtr
A list of mesh zones.
Definition ZoneMesh.H:65
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
Base class for writing coordSet(s) and tracks with fields.
A set of point labels.
Definition pointSet.H:50
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
Base class for surface writers.
General set of labels of mesh quantity (points, cells, faces).
Definition topoSet.H:63
dynamicFvMesh & mesh
Namespace for OpenFOAM.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
Definition HashSet.H:85
label checkTopology(const polyMesh &mesh, const bool allTopology, const bool allGeometry, autoPtr< surfaceWriter > &surfWriter, autoPtr< coordSetWriter > &setWriter, const bool writeBadEdges=false)
label checkZones(const polyMesh &mesh, const ZoneMesh< Zone, polyMesh > &zones, topoSet &set)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
UList< label > labelUList
A UList of labels.
Definition UList.H:75
bool checkPatch(const bool allGeometry, const std::string &name, const polyMesh &mesh, const PatchType &pp, const labelUList &meshEdges, labelHashSet *pointSetPtr=nullptr, labelHashSet *badEdgesPtr=nullptr)