faceBoolSet.C
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 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
26\*---------------------------------------------------------------------------*/
27
28#include "faceBoolSet.H"
29#include "polyMesh.H"
30#include "mapPolyMesh.H"
31#include "syncTools.H"
33
34// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
35
36namespace Foam
37{
39}
40
41
42// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
43
45:
46 faceBoolSet(mesh, false)
47{}
48
49
51:
52 topoBoolSet(mesh, "faceBoolSet", mesh.nFaces(), val)
53{}
54
55
57(
58 const polyMesh& mesh,
59 const boolList& bools
60)
61:
62 topoBoolSet(mesh, "faceBoolSet", mesh.nFaces(), bools)
63{}
64
65
67(
68 const polyMesh& mesh,
69 boolList&& bools
70)
71:
72 topoBoolSet(mesh, "faceBoolSet", mesh.nFaces(), std::move(bools))
73{}
74
75
76// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
77
79{
81}
82
83
84Foam::label Foam::faceBoolSet::maxSize(const polyMesh& mesh) const
85{
86 return mesh.nFaces();
87}
88
89
91{
92 updateLabels(morphMap.reverseFaceMap());
93}
94
95
97{
98 map.distributeFaceData(selected_);
99}
100
101
103(
104 Ostream& os,
105 const primitiveMesh& mesh,
106 const label maxLen
107) const
108{
110}
111
112
113// ************************************************************************* //
label maxSize() const
The max row length used.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A special purpose topoSet with the face labels stored as a boolList. It does not correspond to a face...
Definition: faceBoolSet.H:54
virtual void distribute(const mapDistributePolyMesh &map)
Update any stored data for mesh redistribution.
Definition: faceBoolSet.C:96
void sync()
Do all: synchronise all IOFields and objectRegistry.
Definition: syncObjects.C:70
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
void distributeFaceData(List< T > &values) const
Distribute list of face data.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:162
const labelList & reverseFaceMap() const
Reverse face map.
Definition: mapPolyMesh.H:501
void updateMesh()
Update for new mesh topology.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
Cell-face mesh analysis engine.
Definition: primitiveMesh.H:79
const vectorField & faceCentres() const
label nFaces() const noexcept
Number of mesh faces.
void writeDebug() const
Debug write.
static void syncFaceList(const polyMesh &mesh, UList< T > &faceValues, const CombineOp &cop)
Synchronize values on all mesh faces.
Definition: syncTools.H:396
Base for a special purpose topoSet using labels stored as a boolList.
Definition: topoBoolSet.H:54
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition: className.H:121
dynamicFvMesh & mesh
OBJstream os(runTime.globalPath()/outputName)
const labelList nFaces(UPstream::listGatherValues< label >(aMesh.nFaces()))
Namespace for OpenFOAM.