cellCentreSet.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 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
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 Class
27  Foam::cellCentreSet
28 
29 Description
30  A sampleSet based on cell centres
31 
32  For a dictionary specification:
33  \table
34  Property | Description | Required | Default
35  type | cellCentre | yes |
36  axis | x, y, z, xyz, distance | no | xyz
37  bounds | limit with bounding box | no |
38  \endtable
39 
40 SourceFiles
41  cellCentreSet.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef cellCentreSet_H
46 #define cellCentreSet_H
47 
48 #include "sampledSet.H"
49 #include "boundBox.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class cellCentreSet Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 class cellCentreSet
61 :
62  public sampledSet
63 {
64  // Private data
65 
66  //- Optional bounding box to restrict the geometry
67  const boundBox bounds_;
68 
69 
70  // Private Member Functions
71 
72  //- Generate samples
73  void genSamples();
74 
75 
76 public:
77 
78  //- Runtime type information
79  TypeName("cellCentre");
80 
81 
82  // Constructors
83 
84  //- Construct from components
86  (
87  const word& name,
88  const polyMesh& mesh,
89  const meshSearch& searchEngine,
90  const word& axis,
91  const boundBox& bbox = boundBox::null()
92  );
93 
94  //- Construct from dictionary
96  (
97  const word& name,
98  const polyMesh& mesh,
99  const meshSearch& searchEngine,
100  const dictionary& dict
101  );
102 
103 
104  //- Destructor
105  virtual ~cellCentreSet() = default;
106 };
107 
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 } // End namespace Foam
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 #endif
116 
117 // ************************************************************************* //
static const boundBox & null() noexcept
The null boundBox is the same as an inverted box.
Definition: boundBox.H:137
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search...
Definition: meshSearch.H:56
dictionary dict
const word & axis() const
The sort axis name.
Definition: coordSet.H:160
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
A bounding box defined in terms of min/max extrema points.
Definition: boundBox.H:63
TypeName("cellCentre")
Runtime type information.
A class for handling words, derived from Foam::string.
Definition: word.H:63
const word & name() const noexcept
The coord-set name.
Definition: coordSet.H:152
const polyMesh & mesh() const noexcept
Definition: sampledSet.H:373
cellCentreSet(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const word &axis, const boundBox &bbox=boundBox::null())
Construct from components.
Definition: cellCentreSet.C:99
virtual ~cellCentreSet()=default
Destructor.
const meshSearch & searchEngine() const noexcept
Definition: sampledSet.H:378
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Namespace for OpenFOAM.