BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / sampling / sampledSet / polyLine / polyLineSet.H
blobc4cccd3b4bd6151f01e7f9f5302636af42030868
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::polyLineSet
27 Description
28     Sample along poly line defined by a list of points (knots)
30 SourceFiles
31     polyLineSet.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef polyLineSet_H
36 #define polyLineSet_H
38 #include "sampledSet.H"
39 #include "DynamicList.H"
40 #include "passiveParticleCloud.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                         Class polyLineSet Declaration
49 \*---------------------------------------------------------------------------*/
51 class polyLineSet
53     public sampledSet
55     // Private data
57         //- sampling points
58         List<point> sampleCoords_;
61     // Private Member Functions
63         //- Sample till hits boundary. Called with singleParticle at position
64         //  inbetween sampleCoords_[sampleI] and sampleCoords_[sampleI+1].
65         //  Returns false if end of samples reached.
66         bool trackToBoundary
67         (
68             passiveParticle& singleParticle,
69             label& sampleI,
70             DynamicList<point>& samplingPts,
71             DynamicList<label>& samplingCells,
72             DynamicList<label>& samplingFaces,
73             DynamicList<scalar>& samplingCurveDist
74         ) const;
76         //- Samples all point in sampleCoords_
77         //  samplingSegments contains segmentNo for each sample.
78         void calcSamples
79         (
80             DynamicList<point>& samplingPts,
81             DynamicList<label>& samplingCells,
82             DynamicList<label>& samplingFaces,
83             DynamicList<label>& samplingSegments,
84             DynamicList<scalar>& samplingCurveDist
85         ) const;
87         //- Uses calcSamples to obtain samples. Copies them into *this.
88         void genSamples();
91 public:
93     //- Runtime type information
94     TypeName("polyLine");
97     // Constructors
99         //- Construct from components
100         polyLineSet
101         (
102             const word& name,
103             const polyMesh& mesh,
104             meshSearch& searchEngine,
105             const word& axis,
106             const List<point>& samplePoints
107         );
109         //- Construct from dictionary
110         polyLineSet
111         (
112             const word& name,
113             const polyMesh& mesh,
114             meshSearch& searchEngine,
115             const dictionary& dict
116         );
119     //- Destructor
120     virtual ~polyLineSet();
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 } // End namespace Foam
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 #endif
132 // ************************************************************************* //