OpenFOAM: API Guide
v2112
The open source CFD toolbox
BarycentricI.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-2017 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
ANB 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::Barycentric<Cmpt>::Barycentric
(
const
Foam::zero
)
32
:
33
Barycentric
::
vsType
(
Zero
)
34
{}
35
36
37
template
<
class
Cmpt>
38
inline
Foam::Barycentric<Cmpt>::Barycentric
39
(
40
const
Cmpt& va,
41
const
Cmpt& vb,
42
const
Cmpt& vc,
43
const
Cmpt& vd
44
)
45
{
46
this->v_[
A
] = va;
47
this->v_[
B
] = vb;
48
this->v_[
C
] = vc;
49
this->v_[
D
] = vd;
50
}
51
52
53
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
54
55
template
<
class
Cmpt>
56
inline
const
Cmpt&
Foam::Barycentric<Cmpt>::a
()
const
57
{
58
return
this->v_[
A
];
59
}
60
61
62
template
<
class
Cmpt>
63
inline
const
Cmpt&
Foam::Barycentric<Cmpt>::b
()
const
64
{
65
return
this->v_[
B
];
66
}
67
68
69
template
<
class
Cmpt>
70
inline
const
Cmpt&
Foam::Barycentric<Cmpt>::c
()
const
71
{
72
return
this->v_[
C
];
73
}
74
75
76
template
<
class
Cmpt>
77
inline
const
Cmpt&
Foam::Barycentric<Cmpt>::d
()
const
78
{
79
return
this->v_[
D
];
80
}
81
82
83
template
<
class
Cmpt>
84
inline
Cmpt&
Foam::Barycentric<Cmpt>::a
()
85
{
86
return
this->v_[
A
];
87
}
88
89
90
template
<
class
Cmpt>
91
inline
Cmpt&
Foam::Barycentric<Cmpt>::b
()
92
{
93
return
this->v_[
B
];
94
}
95
96
97
template
<
class
Cmpt>
98
inline
Cmpt&
Foam::Barycentric<Cmpt>::c
()
99
{
100
return
this->v_[
C
];
101
}
102
103
104
template
<
class
Cmpt>
105
inline
Cmpt&
Foam::Barycentric<Cmpt>::d
()
106
{
107
return
this->v_[
D
];
108
}
109
110
111
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112
113
namespace
Foam
114
{
115
116
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
117
118
template
<
class
Cmpt>
119
inline
Cmpt
operator&
(
const
Barycentric<Cmpt>
& b1,
const
Barycentric<Cmpt>
& b2)
120
{
121
return
b1.
a
()*b2.
a
() + b1.
b
()*b2.
b
() + b1.
c
()*b2.
c
() + b1.
d
()*b2.
d
();
122
}
123
124
125
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126
127
}
// End namespace Foam
128
129
// ************************************************************************* //
Foam::operator&
tmp< GeometricField< Type, fvPatchField, volMesh > > operator&(const fvMatrix< Type > &, const DimensionedField< Type, volMesh > &)
Foam::Barycentric::a
const Cmpt & a() const
Definition:
BarycentricI.H:56
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition:
zero.H:131
B
static const Foam::dimensionedScalar B("", Foam::dimless, 18.678)
A
static const Foam::dimensionedScalar A("", Foam::dimPressure, 611.21)
Foam::Barycentric::c
const Cmpt & c() const
Definition:
BarycentricI.H:70
C
volScalarField & C
Definition:
readThermalProperties.H:102
Foam::VectorSpace
Templated vector space.
Definition:
VectorSpace.H:56
Foam::Barycentric
Templated 3D Barycentric derived from VectorSpace. Has 4 components, one of which is redundant.
Definition:
Barycentric.H:54
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
Foam::Barycentric::d
const Cmpt & d() const
Definition:
BarycentricI.H:77
D
const dimensionedScalar & D
Definition:
solveBulkSurfactant.H:4
Foam::Barycentric::Barycentric
Barycentric()=default
Default construct.
Foam::Barycentric::b
const Cmpt & b() const
Definition:
BarycentricI.H:63
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
Barycentric
BarycentricI.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.