cloudSet.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 | Copyright (C) 2011-2012 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::cloudSet
26 
27 Description
28 
29 SourceFiles
30  cloudSet.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef cloudSet_H
35 #define cloudSet_H
36 
37 #include "sampledSet.H"
38 #include "DynamicList.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 // Forward declaration of classes
46 class passiveParticle;
47 template<class Type> class particle;
48 
49 /*---------------------------------------------------------------------------*\
50  Class cloudSet Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class cloudSet
54 :
55  public sampledSet
56 {
57  // Private data
58 
59  //- Sampling points
60  List<point> sampleCoords_;
61 
62 
63  // Private Member Functions
64 
65  //- Samples all points in sampleCoords.
66  void calcSamples
67  (
68  DynamicList<point>& samplingPts,
69  DynamicList<label>& samplingCells,
70  DynamicList<label>& samplingFaces,
71  DynamicList<label>& samplingSegments,
72  DynamicList<scalar>& samplingCurveDist
73  ) const;
74 
75  //- Uses calcSamples to obtain samples. Copies them into *this.
76  void genSamples();
77 
78 
79 public:
80 
81  //- Runtime type information
82  TypeName("cloud");
83 
84 
85  // Constructors
86 
87  //- Construct from components
88  cloudSet
89  (
90  const word& name,
91  const polyMesh& mesh,
92  const meshSearch& searchEngine,
93  const word& axis,
94  const List<point>& sampleCoords
95  );
96 
97  //- Construct from dictionary
98  cloudSet
99  (
100  const word& name,
101  const polyMesh& mesh,
102  const meshSearch& searchEngine,
103  const dictionary& dict
104  );
105 
106 
107  //- Destructor
108  virtual ~cloudSet();
109 };
110 
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 } // End namespace Foam
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 #endif
119 
120 // ************************************************************************* //
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search...
Definition: meshSearch.H:57
dictionary dict
const polyMesh & mesh() const
Definition: sampledSet.H:241
word axis() const
Definition: coordSet.H:116
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:60
TypeName("cloud")
Runtime type information.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
Definition: DynamicList.H:56
Holds list of sampling points which is filled at construction time. Various implementations of this b...
Definition: sampledSet.H:64
A class for handling words, derived from string.
Definition: word.H:59
virtual ~cloudSet()
Destructor.
Definition: cloudSet.C:152
const word & name() const
Definition: coordSet.H:111
const meshSearch & searchEngine() const
Definition: sampledSet.H:246
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
cloudSet(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const word &axis, const List< point > &sampleCoords)
Construct from components.
Definition: cloudSet.C:110
Namespace for OpenFOAM.