OpenFOAM: API Guide
v2112
The open source CFD toolbox
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
-------------------------------------------------------------------------------
10
License
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
30
template
<
class
Cmpt>
31
inline
Foam::RowVector<Cmpt>::RowVector
()
32
{}
33
34
35
template
<
class
Cmpt>
36
inline
Foam::RowVector<Cmpt>::RowVector
(
const
Foam::zero
)
37
:
38
RowVector
::
msType
(
Zero
)
39
{}
40
41
42
template
<
class
Cmpt>
43
template
<
class
Cmpt2>
44
inline
Foam::RowVector<Cmpt>::RowVector
45
(
46
const
MatrixSpace
<
RowVector<Cmpt2>
, Cmpt2, 1, 3>& ms
47
)
48
:
49
RowVector::msType
(ms)
50
{}
51
52
53
template
<
class
Cmpt>
54
inline
Foam::RowVector<Cmpt>::RowVector
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
67
template
<
class
Cmpt>
68
inline
Foam::RowVector<Cmpt>::RowVector
(
Istream
& is)
69
:
70
RowVector
::
msType
(is)
71
{}
72
73
74
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
75
76
template
<
class
Cmpt>
77
inline
const
Cmpt&
Foam::RowVector<Cmpt>::x
()
const
78
{
79
return
this->v_[X];
80
}
81
82
template
<
class
Cmpt>
83
inline
const
Cmpt&
Foam::RowVector<Cmpt>::y
()
const
84
{
85
return
this->v_[
Y
];
86
}
87
88
template
<
class
Cmpt>
89
inline
const
Cmpt&
Foam::RowVector<Cmpt>::z
()
const
90
{
91
return
this->v_[Z];
92
}
93
94
95
template
<
class
Cmpt>
96
inline
Cmpt&
Foam::RowVector<Cmpt>::x
()
97
{
98
return
this->v_[X];
99
}
100
101
template
<
class
Cmpt>
102
inline
Cmpt&
Foam::RowVector<Cmpt>::y
()
103
{
104
return
this->v_[
Y
];
105
}
106
107
template
<
class
Cmpt>
108
inline
Cmpt&
Foam::RowVector<Cmpt>::z
()
109
{
110
return
this->v_[Z];
111
}
112
113
114
// ************************************************************************* //
Foam::RowVector
Templated 3D row-vector derived from MatrixSpace adding construction from 3 components and element ac...
Definition:
RowVector.H:53
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition:
zero.H:131
Foam::MatrixSpace
Templated matrix space.
Definition:
MatrixSpace.H:58
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition:
Istream.H:61
Foam::RowVector::x
const Cmpt & x() const
Definition:
RowVectorI.H:77
Foam::MatrixSpace< RowVector< Cmpt >, Cmpt, 1, 3 >::msType
MatrixSpace< RowVector< Cmpt >, Cmpt, Mrows, Ncols > msType
MatrixSpace type.
Definition:
MatrixSpace.H:67
Foam::RowVector::y
const Cmpt & y() const
Definition:
RowVectorI.H:83
Y
PtrList< volScalarField > & Y
Definition:
createFieldRefs.H:7
Foam::RowVector::z
const Cmpt & z() const
Definition:
RowVectorI.H:89
Foam::RowVector::RowVector
RowVector()
Construct null.
Definition:
RowVectorI.H:31
Foam::zero
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition:
zero.H:62
src
OpenFOAM
primitives
RowVector
RowVectorI.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.