BUG: cloudSet.C: force early construction of tetBasePtIs to avoid demand-driven comms
[OpenFOAM-2.0.x.git] / src / sampling / sampledSet / cloud / cloudSet.H
blob0ea1526ba1e540dc1f3665ec3a64f7c10b37ab65
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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.
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.
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/>.
24 Class
25     Foam::cloudSet
27 Description
29 SourceFiles
30     cloudSet.C
32 \*---------------------------------------------------------------------------*/
34 #ifndef cloudSet_H
35 #define cloudSet_H
37 #include "sampledSet.H"
38 #include "DynamicList.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 namespace Foam
45 // Forward declaration of classes
46 class passiveParticle;
47 template<class Type> class particle;
49 /*---------------------------------------------------------------------------*\
50                            Class cloudSet Declaration
51 \*---------------------------------------------------------------------------*/
53 class cloudSet
55     public sampledSet
57     // Private data
59         //- Sampling points
60         List<point> sampleCoords_;
63     // Private Member Functions
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;
75         //- Uses calcSamples to obtain samples. Copies them into *this.
76         void genSamples();
79 public:
81     //- Runtime type information
82     TypeName("cloud");
85     // Constructors
87         //- Construct from components
88         cloudSet
89         (
90             const word& name,
91             const polyMesh& mesh,
92             meshSearch& searchEngine,
93             const word& axis,
94             const List<point>& sampleCoords
95         );
97         //- Construct from dictionary
98         cloudSet
99         (
100             const word& name,
101             const polyMesh& mesh,
102             meshSearch& searchEngine,
103             const dictionary& dict
104         );
107     //- Destructor
108     virtual ~cloudSet();
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 } // End namespace Foam
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 #endif
120 // ************************************************************************* //