Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
186c710f
Commit
186c710f
authored
Aug 07, 2018
by
Timo Koch
Browse files
[components] Make molar mass constexpr where possible
parent
dc49fcaf
Changes
14
Hide whitespace changes
Inline
Side-by-side
dumux/material/components/air.hh
View file @
186c710f
...
...
@@ -58,7 +58,7 @@ public:
*
* Taken from constrelair.hh.
*/
static
Scalar
molarMass
()
static
constexpr
Scalar
molarMass
()
{
return
0.02896
;
/* [kg/mol] */
}
/*!
...
...
dumux/material/components/benzene.hh
View file @
186c710f
...
...
@@ -56,7 +56,7 @@ public:
/*!
* \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of benzene
*/
static
Scalar
molarMass
()
static
constexpr
Scalar
molarMass
()
{
return
0.07811
;
}
/*!
...
...
dumux/material/components/brine.hh
View file @
186c710f
...
...
@@ -71,7 +71,7 @@ public:
*\param salinity The mass fraction of salt in brine
* This assumes that the salt is pure NaCl.
*/
static
Scalar
molarMass
(
Scalar
salinity
=
constantSalinity
)
static
constexpr
Scalar
molarMass
(
Scalar
salinity
=
constantSalinity
)
{
const
Scalar
M1
=
H2O
::
molarMass
();
const
Scalar
M2
=
Components
::
NaCl
<
Scalar
>::
molarMass
();
// molar mass of NaCl [kg/mol]
...
...
dumux/material/components/cao.hh
View file @
186c710f
...
...
@@ -56,7 +56,7 @@ public:
/*!
* \brief The molar mass of CaOH2 in \f$\mathrm{[kg/mol]}\f$.
*/
static
Scalar
molarMass
()
static
constexpr
Scalar
molarMass
()
{
return
56.0774e-3
;
}
...
...
dumux/material/components/cao2h2.hh
View file @
186c710f
...
...
@@ -57,7 +57,7 @@ public:
/*!
* \brief The molar mass of CaOH2 in \f$\mathrm{[kg/mol]}\f$.
*/
static
Scalar
molarMass
()
static
constexpr
Scalar
molarMass
()
{
return
74.093e-3
;
}
...
...
dumux/material/components/ch4.hh
View file @
186c710f
...
...
@@ -56,7 +56,7 @@ public:
/*!
* \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of molecular methane.
*/
static
Scalar
molarMass
()
static
constexpr
Scalar
molarMass
()
{
return
16.043e-3
;
/* [kg/mol] */
}
/*!
...
...
dumux/material/components/co2.hh
View file @
186c710f
...
...
@@ -68,7 +68,7 @@ public:
/*!
* \brief The mass in \f$\mathrm{[kg/mol]}\f$ of one mole of CO2.
*/
static
Scalar
molarMass
()
static
constexpr
Scalar
molarMass
()
{
return
44e-3
;
/* [kg/mol] */
}
/*!
...
...
dumux/material/components/granite.hh
View file @
186c710f
...
...
@@ -61,7 +61,7 @@ public:
/*!
* \brief The molar mass of Siliciumoxide which is 70 % of granite in \f$\mathrm{[kg/mol]}\f$.
*/
static
Scalar
molarMass
()
static
constexpr
Scalar
molarMass
()
{
return
60.08e-3
;
}
...
...
dumux/material/components/h2.hh
View file @
186c710f
...
...
@@ -57,7 +57,7 @@ public:
/*!
* \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of molecular hydrogen.
*/
static
Scalar
molarMass
()
static
constexpr
Scalar
molarMass
()
{
return
2.01588e-3
;
}
/*!
...
...
dumux/material/components/n2.hh
View file @
186c710f
...
...
@@ -57,7 +57,7 @@ public:
/*!
* \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of molecular nitrogen.
*/
static
Scalar
molarMass
()
static
constexpr
Scalar
molarMass
()
{
return
28.0134e-3
;}
/*!
...
...
dumux/material/components/nacl.hh
View file @
186c710f
...
...
@@ -57,7 +57,7 @@ public:
/*!
* \brief The molar mass of NaCl in \f$\mathrm{[kg/mol]}\f$.
*/
static
Scalar
molarMass
()
static
constexpr
Scalar
molarMass
()
{
return
58.4428e-3
;
}
...
...
dumux/material/components/simpleh2o.hh
View file @
186c710f
...
...
@@ -63,7 +63,7 @@ public:
/*!
* \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of water.
*/
static
Scalar
molarMass
()
static
constexpr
Scalar
molarMass
()
{
return
18e-3
;
}
/*!
...
...
dumux/material/components/tabulatedcomponent.hh
View file @
186c710f
...
...
@@ -158,7 +158,7 @@ public:
/*!
* \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of the component.
*/
static
Scalar
molarMass
()
static
constexpr
Scalar
molarMass
()
{
return
RawComponent
::
molarMass
();
}
/*!
...
...
dumux/material/components/trichloroethene.hh
View file @
186c710f
...
...
@@ -57,7 +57,7 @@ public:
/*!
* \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of TCE.
*/
static
Scalar
molarMass
()
static
constexpr
Scalar
molarMass
()
{
return
131.39e-3
;
// [kg/mol]
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment