cellSetSampledSet.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2020-2025 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::sampledSets::cellSet
26 
27 Description
28  Samples at the cell-centres of a given cell set
29 
30 Usage
31  \table
32  Property | Description | Req'd? | Default
33  set | Name of the cell set | yes |
34  \endtable
35 
36  Example specification:
37  \verbatim
38  {
39  type cellSet;
40  set c0;
41  }
42  \endverbatim
43 
44 SourceFiles
45  cellSet.C
46 
47 \*---------------------------------------------------------------------------*/
48 
49 #ifndef cellSetSampledSet_H
50 #define cellSetSampledSet_H
51 
52 #include "sampledSet.H"
53 #include "DynamicList.H"
54 
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 
57 namespace Foam
58 {
59 namespace sampledSets
60 {
61 
62 /*---------------------------------------------------------------------------*\
63  Class cellSet Declaration
64 \*---------------------------------------------------------------------------*/
65 
66 class cellSet
67 :
68  public sampledSet
69 {
70  // Private Data
71 
72  //- Name of the cell set
73  const word setName_;
74 
75 
76  // Private Member Functions
77 
78  //- Calculate all the sampling points
79  virtual bool calcSamples
80  (
81  DynamicList<point>& samplingPositions,
83  DynamicList<label>& samplingSegments,
84  DynamicList<label>& samplingCells,
85  DynamicList<label>& samplingFaces
86  ) const;
87 
88 
89 public:
90 
91  //- Runtime type information
92  TypeName("cellSet");
93 
94 
95  // Constructors
96 
97  //- Construct from dictionary
98  cellSet
99  (
100  const word& name,
101  const polyMesh& mesh,
102  const dictionary& dict
103  );
104 
105 
106  //- Destructor
107  virtual ~cellSet();
108 };
109 
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 } // End namespace sampledSets
114 } // End namespace Foam
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 #endif
119 
120 // ************************************************************************* //
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition: DynamicList.H:78
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:78
const polyMesh & mesh() const
Access the mesh.
Definition: sampledSetI.H:36
const word & name() const
Access the name.
Definition: sampledSetI.H:30
virtual ~cellSet()
Destructor.
cellSet(const word &name, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
TypeName("cellSet")
Runtime type information.
Set of sets to sample. Call sampledSets.write() to sample&write files.
A class for handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.
dictionary dict