Loading...
Searching...
No Matches
faceBitSet.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) 2018-2024 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::faceBitSet
28
29Description
30 A special purpose topoSet with the face labels stored as a bitSet.
31 It does not correspond to a faceSet either (no associated IOobject).
32
33SourceFiles
34 faceBitSet.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef Foam_faceBitSet_H
39#define Foam_faceBitSet_H
40
41#include "topoBitSet.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
48/*---------------------------------------------------------------------------*\
49 Class faceBitSet Declaration
50\*---------------------------------------------------------------------------*/
51
52class faceBitSet
53:
54 public topoBitSet
55{
56public:
57
58 //- Runtime type information
59 TypeNameNoDebug("faceBitSet");
60
61
62 // Constructors
63
64 //- Construct with nFaces elements,
65 //- all elements unset or initial value
66 explicit faceBitSet(const polyMesh& mesh, const bool val = false);
67
68 //- Copy construct from bitset, resizing to nFaces elements as required
69 faceBitSet(const polyMesh& mesh, const bitSet& bits);
70
71 //- Move construct from bitset, resizing to nFaces elements as required
72 faceBitSet(const polyMesh& mesh, bitSet&& bits);
73
74
75 //- Destructor
76 virtual ~faceBitSet() = default;
77
78
79 // Member Functions
80
81 //- Sync faceBitSet across coupled patches.
82 virtual void sync(const polyMesh& mesh);
83
84 //- Return max index+1.
85 virtual label maxSize(const polyMesh& mesh) const;
86
87 //- Update any stored data for new labels.
88 virtual void updateMesh(const mapPolyMesh& morphMap);
89
90 //- Update any stored data for mesh redistribution.
91 virtual void distribute(const mapDistributePolyMesh& map);
92
93 //- Write maxLen items with label and coordinates.
94 virtual void writeDebug
95 (
96 Ostream& os,
97 const primitiveMesh& mesh,
98 const label maxLen
99 ) const;
100};
101
102
103// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104
105} // End namespace Foam
106
107// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108
109#endif
110
111// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Definition bitSet.H:61
TypeNameNoDebug("faceBitSet")
Runtime type information.
virtual ~faceBitSet()=default
Destructor.
virtual void distribute(const mapDistributePolyMesh &map)
Update any stored data for mesh redistribution.
Definition faceBitSet.C:83
virtual void writeDebug(Ostream &os, const primitiveMesh &mesh, const label maxLen) const
Write maxLen items with label and coordinates.
Definition faceBitSet.C:97
virtual label maxSize(const polyMesh &mesh) const
Return max index+1.
Definition faceBitSet.C:71
virtual void sync(const polyMesh &mesh)
Sync faceBitSet across coupled patches.
Definition faceBitSet.C:65
virtual void updateMesh(const mapPolyMesh &morphMap)
Update any stored data for new labels.
Definition faceBitSet.C:77
faceBitSet(const polyMesh &mesh, const bool val=false)
Construct with nFaces elements, all elements unset or initial value.
Definition faceBitSet.C:37
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
Cell-face mesh analysis engine.
topoBitSet(const polyMesh &mesh, const word &setName)
Construct (no-read) with empty selection.
Definition topoBitSet.C:106
dynamicFvMesh & mesh
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
#define TypeNameNoDebug(TypeNameString)
Declare a ClassNameNoDebug() with extra virtual type info.
Definition typeInfo.H:61