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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2012 OpenFOAM Foundation
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::cloudSet
28
29Description
30 Samples at arbitrary locations with a volume mesh.
31
32 For a dictionary specification:
33 \table
34 Property | Description | Required | Default
35 type | cloud | yes |
36 axis | x, y, z, xyz, distance | yes |
37 points | The locations | yes |
38 \endtable
39
40SourceFiles
41 cloudSet.C
42
43\*---------------------------------------------------------------------------*/
44
45#ifndef cloudSet_H
46#define cloudSet_H
47
48#include "sampledSet.H"
49#include "DynamicList.H"
50
51// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53namespace Foam
54{
55
56// Forward declarations
57class passiveParticle;
58template<class Type> class particle;
59
60/*---------------------------------------------------------------------------*\
61 Class cloudSet Declaration
62\*---------------------------------------------------------------------------*/
63
64class cloudSet
65:
66 public sampledSet
67{
68 // Private data
69
70 //- Sampling points
71 pointField sampleCoords_;
72
73
74 // Private Member Functions
75
76 //- Samples all points in sampleCoords.
77 void calcSamples
78 (
79 DynamicList<point>& samplingPts,
80 DynamicList<label>& samplingCells,
81 DynamicList<label>& samplingFaces,
82 DynamicList<label>& samplingSegments,
83 DynamicList<scalar>& samplingCurveDist
84 ) const;
85
86 //- Uses calcSamples to obtain samples. Copies them into *this.
87 void genSamples();
88
89
90public:
91
92 //- Runtime type information
93 TypeName("cloud");
94
95
96 // Constructors
97
98 //- Construct from components
100 (
101 const word& name,
102 const polyMesh& mesh,
104 const word& axis,
105 const List<point>& sampleCoords
106 );
107
108 //- Construct from dictionary
110 (
111 const word& name,
114 const dictionary& dict
115 );
116
117
118 //- Destructor
119 virtual ~cloudSet() = default;
120};
121
122
123// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124
125} // End namespace Foam
126
127// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128
129#endif
130
131// ************************************************************************* //
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition: DynamicList.H:72
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:77
Samples at arbitrary locations with a volume mesh.
Definition: cloudSet.H:86
TypeName("cloud")
Runtime type information.
virtual ~cloudSet()=default
Destructor.
const word & axis() const
The sort axis name.
Definition: coordSet.H:140
const word & name() const noexcept
The coord-set name.
Definition: coordSet.H:134
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search.
Definition: meshSearch.H:61
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
Holds list of sampling points which is filled at construction time. Various implementations of this b...
Definition: sampledSet.H:86
const meshSearch & searchEngine() const noexcept
Definition: sampledSet.H:324
const polyMesh & mesh() const noexcept
Definition: sampledSet.H:319
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:44
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73