vectorField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9  Copyright (C) 2019-2022 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Typedef
28  Foam::vectorField
29 
30 Description
31  Specialisation of Field<T> for vector.
32 
33 SourceFiles
34  vectorFieldTemplates.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef Foam_vectorField_H
39 #define Foam_vectorField_H
40 
41 #include "scalarField.H"
42 #include "vector.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 typedef Field<vector> vectorField;
52 
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 
55 //- Inplace normalise (float) vector field
56 template<> void Field<Vector<float>>::normalise();
57 
58 //- Inplace normalise (double) vector field
59 template<> void Field<Vector<double>>::normalise();
60 
61 
62 //- Zip together vector field from components
63 template<class Cmpt>
64 void zip
65 (
66  Field<Vector<Cmpt>>& result,
67  const UList<Cmpt>& x,
68  const UList<Cmpt>& y,
69  const UList<Cmpt>& z
70 );
71 
72 //- Zip together vector field from components
73 template<class Cmpt>
74 tmp<Field<Vector<Cmpt>>> zip
75 (
76  const Field<Cmpt>& x,
77  const Field<Cmpt>& y,
78  const Field<Cmpt>& z
79 );
80 
81 //- Unzip vector field into components
82 template<class Cmpt>
83 void unzip
84 (
85  const UList<Vector<Cmpt>>& input,
86  Field<Cmpt>& x,
87  Field<Cmpt>& y,
88  Field<Cmpt>& z
89 );
90 
91 
92 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93 
94 } // End namespace Foam
95 
96 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97 
98 #ifdef NoRepository
99  #include "vectorFieldTemplates.C"
100 #endif
101 
102 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103 
104 #endif
105 
106 // ************************************************************************* //
void zip(FieldField< Field, SphericalTensor< Cmpt >> &result, const FieldField< Field, Cmpt > &ii)
Zip together sphericalTensor field field from components.
void unzip(const FieldField< Field, SphericalTensor< Cmpt >> &input, FieldField< Field, Cmpt > &ii)
Unzip sphericalTensor field field into components.
scalar y
static Istream & input(Istream &is, IntRange< T > &range)
Definition: IntRanges.C:33
Field< vector > vectorField
Specialisation of Field<T> for vector.
Namespace for OpenFOAM.