1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Sample field data with a choice of interpolation schemes, sampling options
31 @param setFormat : set output format, choice of \n
37 @param surfaceFormat : surface output format, choice of \n
38 - null : suppress output
39 - foamFile : separate points, faces and values file
40 - dx : DX scalar or vector format
41 - vtk : VTK ascii format
42 - raw : x y z value format for use with e.g. gnuplot 'splot'.
43 - obj : Wavefron stl. Does not contain values!
44 - stl : ascii stl. Does not contain values!
46 @param interpolationScheme : interpolation scheme, choice of \n
47 - cell : use cell-centre value; constant over cells (default)
48 - cellPoint : use cell-centre and vertex values
49 - cellPointFace : use cell-centre, vertex and face values. \n
50 -# vertex values determined from neighbouring cell-centre values
51 -# face values determined using the current face interpolation scheme
52 for the field (linear, limitedLinear, etc.)
54 @param fields : list of fields to sample
56 @param sets : list of sets to sample, choice of \n
57 - uniform evenly distributed points on line
58 - face one point per face intersection
59 - midPoint one point per cell, inbetween two face intersections
60 - midPointAndFace combination of face and midPoint
62 - curve specified points, not nessecary on line, uses
64 - cloud specified points, uses findCell
66 Option axis: how to write point coordinate. Choice of
67 - x/y/z: x/y/z coordinate only
69 (probably does not make sense for anything but raw)
70 - distance: distance from start of sampling line (if uses line)
71 or distance from first specified sampling point
73 Type specific options:
74 uniform, face, midPoint, midPointAndFace : start and end coordinate
75 uniform: extra number of sampling points
76 curve, cloud: list of coordinates
78 @param surfaces : list of surfaces to sample, choice of \n
79 - plane : values on plane defined by point, normal.
80 - patch : values on patch.
85 \*---------------------------------------------------------------------------*/
88 #include "timeSelector.H"
89 #include "IOsampledSets.H"
90 #include "IOsampledSurfaces.H"
94 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97 int main(int argc, char *argv[])
99 timeSelector::addOptions();
100 # include "addRegionOption.H"
101 # include "setRootCase.H"
102 # include "createTime.H"
103 instantList timeDirs = timeSelector::select0(runTime, args);
104 # include "createNamedMesh.H"
108 sampledSets::typeName,
115 IOsampledSurfaces sSurfs
117 sampledSurfaces::typeName,
124 forAll(timeDirs, timeI)
126 runTime.setTime(timeDirs[timeI], timeI);
127 Info<< "Time = " << runTime.timeName() << endl;
129 // Handle geometry/topology changes
130 polyMesh::readUpdateState state = mesh.readUpdate();
132 sSets.readUpdate(state);
133 sSurfs.readUpdate(state);
141 Info<< "End\n" << endl;
147 // ************************************************************************* //