vector.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 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
27Class
28 Foam::vector
29
30Description
31 A Vector of values with scalar precision,
32 where scalar is float/double depending on the compilation flags.
33
34SourceFiles
35 floatVectors.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef Foam_vector_H
40#define Foam_vector_H
41
42#include "scalar.H"
43#include "Vector.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51
55typedef Vector<float> floatVector;
59typedef Vector<double> doubleVector;
60
61// With float or double precision (depending on compilation)
63
64// With float or double precision (depending on compilation)
66
67
68// Traits
69
70template<class Type>
71class flux
72:
73 public innerProduct<vector, Type>
74{};
75
76
77template<>
78class flux<scalar>
79{
80public:
82 typedef scalar type;
83};
84
85
86// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
87
88} // End namespace Foam
89
90// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
91
92#endif
93
94// ************************************************************************* //
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
Definition: Vector.H:65
typeOfRank< typenamepTraits< vector >::cmptType, direction(pTraits< vector >::rank)+direction(pTraits< Type >::rank) -2 >::type type
Definition: products.H:149
Namespace for OpenFOAM.
Vector< float > floatVector
Definition: vector.H:54
Vector< double > doubleVector
Definition: vector.H:58
Vector< scalar > vector
Definition: vector.H:61
Vector< solveScalar > solveVector
Definition: vector.H:64