ENH: patchCloud: return pTraits<Type>::max for unfound points
[OpenFOAM-1.7.x.git] / applications / test / slicedField / slicedFieldTest.C
blobbb333e9e081d8b8fb74df890633efb2618f578fa
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
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 Application
25     slicedFieldTest
27 Description
29 \*---------------------------------------------------------------------------*/
31 #include "fvCFD.H"
32 #include "SlicedGeometricField.H"
33 #include "slicedFvPatchFields.H"
34 #include "slicedSurfaceFields.H"
36 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38 int main(int argc, char *argv[])
40     #include "setRootCase.H"
42     #include "createTime.H"
43     #include "createMesh.H"
45     Info<< "Reading field p\n" << endl;
46     volScalarField p
47     (
48         IOobject
49         (
50             "p",
51             runTime.timeName(),
52             mesh,
53             IOobject::MUST_READ,
54             IOobject::AUTO_WRITE
55         ),
56         mesh
57     );
59     //Info<< min(p, p);
61     Info<< "Reading field U\n" << endl;
62     volVectorField U
63     (
64         IOobject
65         (
66             "U",
67             runTime.timeName(),
68             mesh,
69             IOobject::MUST_READ,
70             IOobject::AUTO_WRITE
71         ),
72         mesh
73     );
75     SlicedGeometricField<vector, fvPatchField, slicedFvPatchField, volMesh>
76     C
77     (
78         IOobject
79         (
80             "C2",
81             runTime.timeName(),
82             mesh
83         ),
84         mesh,
85         dimLength,
86         mesh.cellCentres(),
87         mesh.faceCentres()
88     );
90     Info<< C << endl;
91     Info<< (C & U) << endl;
93     SlicedGeometricField<vector, fvsPatchField, slicedFvsPatchField, surfaceMesh>
94     Sf
95     (
96         IOobject
97         (
98             "Sf2",
99             runTime.timeName(),
100             mesh
101         ),
102         mesh,
103         dimArea,
104         mesh.faceAreas()
105     );
107     //Info<< Sf << endl;
109     return 0;
113 // ************************************************************************* //