RowVectorI.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) 2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26\*---------------------------------------------------------------------------*/
27
28// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
29
30template<class Cmpt>
32{}
33
34
35template<class Cmpt>
37:
38 RowVector::msType(Zero)
39{}
40
41
42template<class Cmpt>
43template<class Cmpt2>
45(
46 const MatrixSpace<RowVector<Cmpt2>, Cmpt2, 1, 3>& ms
47)
48:
49 RowVector::msType(ms)
50{}
51
52
53template<class Cmpt>
55(
56 const Cmpt& rvx,
57 const Cmpt& rvy,
58 const Cmpt& rvz
59)
60{
61 this->v_[X] = rvx;
62 this->v_[Y] = rvy;
63 this->v_[Z] = rvz;
64}
65
66
67template<class Cmpt>
69:
70 RowVector::msType(is)
71{}
72
73
74// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
75
76template<class Cmpt>
77inline const Cmpt& Foam::RowVector<Cmpt>::x() const
78{
79 return this->v_[X];
80}
81
82template<class Cmpt>
83inline const Cmpt& Foam::RowVector<Cmpt>::y() const
84{
85 return this->v_[Y];
86}
87
88template<class Cmpt>
89inline const Cmpt& Foam::RowVector<Cmpt>::z() const
90{
91 return this->v_[Z];
92}
93
94
95template<class Cmpt>
97{
98 return this->v_[X];
99}
100
101template<class Cmpt>
103{
104 return this->v_[Y];
105}
106
107template<class Cmpt>
109{
110 return this->v_[Z];
111}
112
113
114// ************************************************************************* //
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
Templated matrix space.
Definition: MatrixSpace.H:61
Templated 3D row-vector derived from MatrixSpace adding construction from 3 components and element ac...
Definition: RowVector.H:56
const Cmpt & z() const
Definition: RowVectorI.H:89
const Cmpt & y() const
Definition: RowVectorI.H:83
const Cmpt & x() const
Definition: RowVectorI.H:77
RowVector()
Construct null.
Definition: RowVectorI.H:31
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition: zero.H:63
PtrList< volScalarField > & Y