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::invertedBox
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 // ************************************************************************* //
Foam::sampledSet
Holds list of sampling points which is filled at construction time. Various implementations of this b...
Definition: sampledSet.H:83
Foam::coordSet::name
const word & name() const
Definition: coordSet.H:125
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::meshSearch
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search.
Definition: meshSearch.H:60
Foam::cellCentreSet::TypeName
TypeName("cellCentre")
Runtime type information.
Foam::sampledSet::searchEngine
const meshSearch & searchEngine() const
Definition: sampledSet.H:286
Foam::boundBox::invertedBox
static const boundBox invertedBox
A large inverted boundBox: min/max == +/- ROOTVGREAT.
Definition: boundBox.H:86
Foam::cellCentreSet::cellCentreSet
cellCentreSet(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const word &axis, const boundBox &bbox=boundBox::invertedBox)
Construct from components.
Definition: cellCentreSet.C:106
Foam::coordSet::axis
word axis() const
Definition: coordSet.H:130
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::cellCentreSet::~cellCentreSet
virtual ~cellCentreSet()=default
Destructor.
sampledSet.H
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
boundBox.H
Foam::sampledSet::mesh
const polyMesh & mesh() const
Definition: sampledSet.H:281
Foam::boundBox
A bounding box defined in terms of min/max extrema points.
Definition: boundBox.H:63
Foam::cellCentreSet
A sampleSet based on cell centres.
Definition: cellCentreSet.H:79