initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / test / slicedField / slicedFieldTest.C
bloba82b4ac71298032c02073b84fc4f86c6eee13b23
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 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 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
19     for more details.
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
25 Application
26     volField
28 Description
30 \*---------------------------------------------------------------------------*/
32 #include "fvCFD.H"
33 #include "SlicedGeometricField.H"
34 #include "slicedFvPatchFields.H"
36 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38 int main(int argc, char *argv[])
41 #   include "setRootCase.H"
43 #   include "createTime.H"
44 #   include "createMesh.H"
46     Info<< "Reading field p\n" << endl;
47     volScalarField p
48     (
49         IOobject
50         (
51             "p",
52             runTime.timeName(),
53             mesh,
54             IOobject::MUST_READ,
55             IOobject::AUTO_WRITE
56         ),
57         mesh
58     );
60     //Info<< min(p, p);
62     Info<< "Reading field U\n" << endl;
63     volVectorField U
64     (
65         IOobject
66         (
67             "U",
68             runTime.timeName(),
69             mesh,
70             IOobject::MUST_READ,
71             IOobject::AUTO_WRITE
72         ),
73         mesh
74     );
76     SlicedGeometricField<vector, fvPatchField, slicedFvPatchField, volMesh>
77     C
78     (
79         IOobject
80         (
81             "C2",
82             runTime.timeName(),
83             mesh
84         ),
85         mesh,
86         dimLength,
87         mesh.cellCentres(),
88         mesh.faceCentres()
89     );
91     Info<< C << endl;
92     Info<< (C & U) << endl;
94     SlicedGeometricField<vector, fvPatchField, slicedFvPatchField, surfaceMesh>
95     Sf
96     (
97         IOobject
98         (
99             "Sf2",
100             runTime.timeName(),
101             mesh
102         ),
103         mesh,
104         dimArea,
105         mesh.faceAreas()
106     );
108     Info<< Sf << endl;
110     return 0;
114 // ************************************************************************* //