Loading...
Searching...
No Matches
cloudFunctionObjectTools.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.
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::cloudFunctionObjectTools::collector
28
29Description
30 Implementation of template-invariant tools for
31 various function objects such as Foam::ParticleHistogram.
32
33SourceFiles
34 cloudFunctionObjectTools.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef cloudFunctionObjectTools_collector_H
39#define cloudFunctionObjectTools_collector_H
40
41#include "polyMesh.H"
42#include "boundBox.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
49/*---------------------------------------------------------------------------*\
50 Namespace cloudFunctionObjectTools Declaration
51\*---------------------------------------------------------------------------*/
52
54{
56/*---------------------------------------------------------------------------*\
57 Class collector Declaration
58\*---------------------------------------------------------------------------*/
59
60class collector
61{
62 // Private Data
63
64 //- Flag to decide if the collector is patch based
65 bool isPatch_;
66
67 //- List of indices of collectors (zones or patches)
68 labelList IDs_;
69
70 //- List of names of collectors
71 wordList names_;
72
73 //- List of bounding-boxes of collectors
74 List<boundBox> BBs_;
75
76
77public:
78
79 // Constructors
80
81 //- Construct from dictionary
83 (
84 const dictionary& dict,
85 const polyMesh& mesh
86 );
87
88 //- Copy construct
89 collector(const collector& phc);
90
91 //- No copy assignment
92 void operator=(const collector&) = delete;
93
94
95 //- Destructor
96 virtual ~collector() = default;
97
98
99 // Member Functions
100
101 // Access
102
103 //- Return the flag if the collector is patch based
104 bool isPatch() const noexcept { return isPatch_; }
105
106 //- Return number of collectors (zones or patches)
107 label size() const noexcept { return IDs_.size(); }
108
109 //- Return const reference to the indices of collectors
110 const labelList& IDs() const noexcept { return IDs_; }
111
112 //- Return const reference to the names of collectors
113 const wordList& names() const noexcept { return names_; }
114
115 //- Return const reference to the bounding-boxes of collectors
116 const List<boundBox>& BBs() const noexcept { return BBs_; }
118
119
120// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121
122} // End namespace cloudFunctionObjectTools
123} // End namespace Foam
124
125// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126
127#endif
128
129// ************************************************************************* //
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
const wordList & names() const noexcept
Return const reference to the names of collectors.
bool isPatch() const noexcept
Return the flag if the collector is patch based.
void operator=(const collector &)=delete
No copy assignment.
const List< boundBox > & BBs() const noexcept
Return const reference to the bounding-boxes of collectors.
label size() const noexcept
Return number of collectors (zones or patches).
collector(const dictionary &dict, const polyMesh &mesh)
Construct from dictionary.
virtual ~collector()=default
Destructor.
const labelList & IDs() const noexcept
Return const reference to the indices of collectors.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
dynamicFvMesh & mesh
Namespace for OpenFOAM.
List< word > wordList
List of word.
Definition fileName.H:60
List< label > labelList
A List of labels.
Definition List.H:62
const direction noexcept
Definition scalarImpl.H:265
dictionary dict