OpenFOAM
10
The OpenFOAM Foundation
Barycentric2DI.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) 2017-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>
29
inline
Foam::Barycentric2D<Cmpt>::Barycentric2D
()
30
{}
31
32
33
template
<
class
Cmpt>
34
inline
Foam::Barycentric2D<Cmpt>::Barycentric2D
(
const
Foam::zero
)
35
:
36
Barycentric2D
::
vsType
(
Zero
)
37
{}
38
39
40
template
<
class
Cmpt>
41
inline
Foam::Barycentric2D<Cmpt>::Barycentric2D
42
(
43
const
Cmpt& va,
44
const
Cmpt& vb,
45
const
Cmpt& vc
46
)
47
{
48
this->
v_
[
A
] = va;
49
this->
v_
[
B
] = vb;
50
this->
v_
[
C
] = vc;
51
}
52
53
54
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
55
56
template
<
class
Cmpt>
57
inline
const
Cmpt&
Foam::Barycentric2D<Cmpt>::a
()
const
58
{
59
return
this->
v_
[
A
];
60
}
61
62
63
template
<
class
Cmpt>
64
inline
const
Cmpt&
Foam::Barycentric2D<Cmpt>::b
()
const
65
{
66
return
this->
v_
[
B
];
67
}
68
69
70
template
<
class
Cmpt>
71
inline
const
Cmpt&
Foam::Barycentric2D<Cmpt>::c
()
const
72
{
73
return
this->
v_
[
C
];
74
}
75
76
77
template
<
class
Cmpt>
78
inline
Cmpt&
Foam::Barycentric2D<Cmpt>::a
()
79
{
80
return
this->
v_
[
A
];
81
}
82
83
84
template
<
class
Cmpt>
85
inline
Cmpt&
Foam::Barycentric2D<Cmpt>::b
()
86
{
87
return
this->
v_
[
B
];
88
}
89
90
91
template
<
class
Cmpt>
92
inline
Cmpt&
Foam::Barycentric2D<Cmpt>::c
()
93
{
94
return
this->
v_
[
C
];
95
}
96
97
98
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
99
100
namespace
Foam
101
{
102
103
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
104
105
template
<
class
Cmpt>
106
inline
Cmpt
operator
&
107
(
108
const
Barycentric2D<Cmpt>
& b1,
109
const
Barycentric2D<Cmpt>
& b2
110
)
111
{
112
return
b1.
a
()*b2.a() + b1.
b
()*b2.b() + b1.
c
()*b2.c();
113
}
114
115
116
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117
118
}
// End namespace Foam
119
120
// ************************************************************************* //
Foam::Barycentric2D::c
const Cmpt & c() const
Definition:
Barycentric2DI.H:71
Foam::VectorSpace
Templated vector space.
Definition:
VectorSpace.H:53
Foam::Barycentric2D::a
const Cmpt & a() const
Definition:
Barycentric2DI.H:57
Foam::Barycentric2D::B
Definition:
Barycentric2D.H:67
Foam::Barycentric2D
Templated 2D Barycentric derived from VectorSpace. Has 3 components, one of which is redundant...
Definition:
Barycentric2D.H:50
Foam::Barycentric2D::Barycentric2D
Barycentric2D()
Construct null.
Definition:
Barycentric2DI.H:29
Foam::Zero
static const zero Zero
Definition:
zero.H:97
Foam::Barycentric2D::C
Definition:
Barycentric2D.H:67
Foam::zero
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
Definition:
zero.H:49
Foam::Barycentric2D::b
const Cmpt & b() const
Definition:
Barycentric2DI.H:64
Foam::Barycentric2D::A
Definition:
Barycentric2D.H:67
Foam::VectorSpace< Barycentric2D< Cmpt >, Cmpt, 3 >::v_
Cmpt v_[Ncmpts]
The components of this vector space.
Definition:
VectorSpace.H:84
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.H:213
src
OpenFOAM
primitives
Barycentric2D
Barycentric2DI.H
Generated by
1.8.13