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
a23766d9
Commit
a23766d9
authored
Sep 24, 2020
by
Timo Koch
Browse files
[common][spline] Move assert checking requirements to updatePoints
parent
2de0b751
Changes
1
Hide whitespace changes
Inline
Side-by-side
dumux/common/monotonecubicspline.hh
View file @
a23766d9
...
...
@@ -64,11 +64,6 @@ public:
*/
MonotoneCubicSpline
(
const
std
::
vector
<
Scalar
>&
x
,
const
std
::
vector
<
Scalar
>&
y
)
{
// check some requirements
assert
(
x
.
size
()
==
y
.
size
());
assert
(
x
.
size
()
>=
2
);
assert
(
std
::
is_sorted
(
x
.
begin
(),
x
.
end
()));
updatePoints
(
x
,
y
);
}
...
...
@@ -79,6 +74,11 @@ public:
*/
void
updatePoints
(
const
std
::
vector
<
Scalar
>&
x
,
const
std
::
vector
<
Scalar
>&
y
)
{
// check some requirements
assert
(
x
.
size
()
==
y
.
size
());
assert
(
x
.
size
()
>=
2
);
assert
(
std
::
is_sorted
(
x
.
begin
(),
x
.
end
()));
// save a copy of the control points
x_
=
x
;
y_
=
y
;
...
...
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