RowVectorI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
27 
28 template<class Cmpt>
30 {}
31 
32 
33 template<class Cmpt>
35 :
37 {}
38 
39 
40 template<class Cmpt>
41 template<class Cmpt2>
43 (
44  const MatrixSpace<RowVector<Cmpt2>, Cmpt2, 1, 3>& ms
45 )
46 :
48 {}
49 
50 
51 template<class Cmpt>
53 (
54  const Cmpt& rvx,
55  const Cmpt& rvy,
56  const Cmpt& rvz
57 )
58 {
59  this->v_[X] = rvx;
60  this->v_[Y] = rvy;
61  this->v_[Z] = rvz;
62 }
63 
64 
65 template<class Cmpt>
67 :
68  RowVector::msType(is)
69 {}
70 
71 
72 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
73 
74 template<class Cmpt>
75 inline const Cmpt& Foam::RowVector<Cmpt>::x() const
76 {
77  return this->v_[X];
78 }
79 
80 template<class Cmpt>
81 inline const Cmpt& Foam::RowVector<Cmpt>::y() const
82 {
83  return this->v_[Y];
84 }
85 
86 template<class Cmpt>
87 inline const Cmpt& Foam::RowVector<Cmpt>::z() const
88 {
89  return this->v_[Z];
90 }
91 
92 
93 template<class Cmpt>
95 {
96  return this->v_[X];
97 }
98 
99 template<class Cmpt>
101 {
102  return this->v_[Y];
103 }
104 
105 template<class Cmpt>
107 {
108  return this->v_[Z];
109 }
110 
111 
112 // ************************************************************************* //
const Cmpt & z() const
Definition: RowVectorI.H:87
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
const Cmpt & x() const
Definition: RowVectorI.H:75
MatrixSpace< RowVector< Cmpt >, Cmpt, Mrows, Ncols > msType
MatrixSpace type.
Definition: MatrixSpace.H:63
Templated matrix space.
Definition: MatrixSpace.H:55
const Cmpt & y() const
Definition: RowVectorI.H:81
static const zero Zero
Definition: zero.H:97
RowVector()
Construct null.
Definition: RowVectorI.H:29
Templated 3D row-vector derived from MatrixSpace adding construction from 3 components and element ac...
Definition: RowVector.H:51
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
Definition: zero.H:49
Cmpt v_[Ncmpts]
The components of this vector space.
Definition: VectorSpace.H:84