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-------------------------------------------------------------------------------
11License
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
27Typedef
28 Foam::vectorField
29
30Description
31 Specialisation of Field<T> for vector.
32
33SourceFiles
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
46namespace Foam
47{
48
49// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51typedef Field<vector> vectorField;
52
53// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54
55//- Inplace normalise (float) vector field
56template<> void Field<Vector<float>>::normalise();
57
58//- Inplace normalise (double) vector field
59template<> void Field<Vector<double>>::normalise();
60
61
62//- Zip together vector field from components
63template<class Cmpt>
64void 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
73template<class Cmpt>
75(
76 const Field<Cmpt>& x,
77 const Field<Cmpt>& y,
78 const Field<Cmpt>& z
79);
80
81//- Unzip vector field into components
82template<class Cmpt>
83void unzip
84(
85 const UList<Vector<Cmpt>>& input,
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// ************************************************************************* //
scalar y
Generic templated field type.
Definition: Field.H:82
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: UList.H:94
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
Definition: Vector.H:65
A class for managing temporary objects.
Definition: tmp.H:65
Namespace for OpenFOAM.
static Istream & input(Istream &is, IntRange< T > &range)
Definition: IntRanges.C:55
Field< vector > vectorField
Specialisation of Field<T> for vector.
void unzip(const FieldField< Field, SphericalTensor< Cmpt > > &input, FieldField< Field, Cmpt > &ii)
Unzip sphericalTensor field field into components.
void zip(FieldField< Field, SphericalTensor< Cmpt > > &result, const FieldField< Field, Cmpt > &ii)
Zip together sphericalTensor field field from components.