1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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
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/>.
28 Generation of streamlines. Samples along track of passive particle.
33 \*---------------------------------------------------------------------------*/
38 #include "volFieldsFwd.H"
39 #include "pointFieldFwd.H"
41 #include "DynamicList.H"
42 #include "scalarList.H"
43 #include "vectorList.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 // Forward declaration of classes
59 /*---------------------------------------------------------------------------*\
60 Class streamLine Declaration
61 \*---------------------------------------------------------------------------*/
70 //- Name of this set of field averages.
73 //- Database this class is registered to
74 const objectRegistry& obr_;
76 //- Load fields from files (not from objectRegistry)
83 //- List of fields to sample
86 //- Field to transport particle with
89 //- Whether to use +u or -u
92 //- Maximum lifetime (= number of cells) of particle
95 //- Number of subcycling steps
98 //- Optional specified name of particles
104 //- Names of scalar fields
105 wordList scalarNames_;
107 //- Names of vector fields
108 wordList vectorNames_;
114 //- Mesh searching enigne
115 autoPtr<meshSearch> meshSearchPtr_;
118 autoPtr<sampledSet> sampledSetPtr_;
120 //- Axis of the sampled points to output
121 word sampledSetAxis_;
123 //- File output writer
124 autoPtr<writer<scalar> > scalarFormatterPtr_;
126 autoPtr<writer<vector> > vectorFormatterPtr_;
131 //- All tracks. Per particle the points it passed through
132 DynamicList<List<point> > allTracks_;
134 //- Per scalarField, per particle, the sampled value.
135 List<DynamicList<scalarList> > allScalars_;
137 //- Per scalarField, per particle, the sampled value.
138 List<DynamicList<vectorList> > allVectors_;
142 //- Do all seeding and tracking
145 //- Disallow default bitwise copy construct
146 streamLine(const streamLine&);
148 //- Disallow default bitwise assignment
149 void operator=(const streamLine&);
154 //- Runtime type information
155 TypeName("streamLine");
160 //- Construct for given objectRegistry and dictionary.
161 // Allow the possibility to load fields from files
165 const objectRegistry&,
167 const bool loadFromFiles = false
172 virtual ~streamLine();
177 //- Return name of the set of field averages
178 virtual const word& name() const
183 //- Read the field average data
184 virtual void read(const dictionary&);
186 //- Execute the averaging
187 virtual void execute();
189 //- Execute the averaging at the final time-loop, currently does nothing
192 //- Calculate the field average data and write
193 virtual void write();
195 //- Update for changes of mesh
196 virtual void updateMesh(const mapPolyMesh&);
198 //- Update for mesh point-motion
199 virtual void movePoints(const pointField&);
201 ////- Update for changes of mesh due to readUpdate
202 //virtual void readUpdate(const polyMesh::readUpdateState state);
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208 } // End namespace Foam
210 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 // ************************************************************************* //