Skip to content
GitLab
Menu
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
6f12eca9
Commit
6f12eca9
authored
Feb 08, 2021
by
Timo Koch
Browse files
[simpleh2o] More const+constexpr
parent
d29bee81
Changes
1
Hide whitespace changes
Inline
Side-by-side
dumux/material/components/simpleh2o.hh
View file @
6f12eca9
...
@@ -107,25 +107,23 @@ public:
...
@@ -107,25 +107,23 @@ public:
if
(
T
<
tripleTemperature
())
if
(
T
<
tripleTemperature
())
return
0
;
// water is solid: We don't take sublimation into account
return
0
;
// water is solid: We don't take sublimation into account
static
const
Scalar
n
[
10
]
=
{
const
expr
Scalar
n
[
10
]
=
{
0.11670521452767e4
,
-
0.72421316703206e6
,
-
0.17073846940092e2
,
0.11670521452767e4
,
-
0.72421316703206e6
,
-
0.17073846940092e2
,
0.12020824702470e5
,
-
0.32325550322333e7
,
0.14915108613530e2
,
0.12020824702470e5
,
-
0.32325550322333e7
,
0.14915108613530e2
,
-
0.48232657361591e4
,
0.40511340542057e6
,
-
0.23855557567849
,
-
0.48232657361591e4
,
0.40511340542057e6
,
-
0.23855557567849
,
0.65017534844798e3
0.65017534844798e3
};
};
Scalar
sigma
=
T
+
n
[
8
]
/
(
T
-
n
[
9
]);
const
Scalar
sigma
=
T
+
n
[
8
]
/
(
T
-
n
[
9
]);
Scalar
A
=
(
sigma
+
n
[
0
])
*
sigma
+
n
[
1
];
const
Scalar
A
=
(
sigma
+
n
[
0
])
*
sigma
+
n
[
1
];
Scalar
B
=
(
n
[
2
]
*
sigma
+
n
[
3
])
*
sigma
+
n
[
4
];
const
Scalar
B
=
(
n
[
2
]
*
sigma
+
n
[
3
])
*
sigma
+
n
[
4
];
Scalar
C
=
(
n
[
5
]
*
sigma
+
n
[
6
])
*
sigma
+
n
[
7
];
const
Scalar
C
=
(
n
[
5
]
*
sigma
+
n
[
6
])
*
sigma
+
n
[
7
];
using
std
::
sqrt
;
using
std
::
sqrt
;
Scalar
tmp
=
Scalar
(
2.0
)
*
C
/
(
sqrt
(
B
*
B
-
Scalar
(
4.0
)
*
A
*
C
)
-
B
);
const
Scalar
term
=
Scalar
(
2.0
)
*
C
/
(
sqrt
(
B
*
B
-
Scalar
(
4.0
)
*
A
*
C
)
-
B
);
tmp
*=
tmp
;
tmp
*=
tmp
;
return
Scalar
(
1e6
)
*
term
*
term
*
term
*
term
;
return
Scalar
(
1e6
)
*
tmp
;
}
}
/*!
/*!
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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