Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
57b2be13
"plugins/amoeba/openmmapi/src/AmoebaAngleForceImpl.cpp" did not exist on "58b094cec72f74db91e131277804e82e168c16e0"
Commit
57b2be13
authored
Mar 31, 2020
by
Charlles Abreu
Browse files
Test of derivative continuity in periodic spline
parent
a39e5bee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
tests/TestSplineFitter.cpp
tests/TestSplineFitter.cpp
+6
-1
No files found.
tests/TestSplineFitter.cpp
View file @
57b2be13
...
@@ -82,6 +82,12 @@ void testPeriodicSpline() {
...
@@ -82,6 +82,12 @@ void testPeriodicSpline() {
ASSERT_EQUAL_TOL
(
sin
((
double
)
i
),
SplineFitter
::
evaluateSpline
(
x
,
y
,
deriv
,
i
),
0.05
);
ASSERT_EQUAL_TOL
(
sin
((
double
)
i
),
SplineFitter
::
evaluateSpline
(
x
,
y
,
deriv
,
i
),
0.05
);
ASSERT_EQUAL_TOL
(
cos
((
double
)
i
),
SplineFitter
::
evaluateSplineDerivative
(
x
,
y
,
deriv
,
i
),
0.05
);
ASSERT_EQUAL_TOL
(
cos
((
double
)
i
),
SplineFitter
::
evaluateSplineDerivative
(
x
,
y
,
deriv
,
i
),
0.05
);
}
}
double
ya
[]
=
{
15.579
,
16.235
,
17.325
,
18.741
,
20.454
,
22.517
,
24.944
,
27.554
,
29.942
,
31.657
,
32.486
,
32.612
,
32.494
,
32.532
,
32.785
,
32.917
,
32.402
,
30.842
,
28.229
,
24.989
,
21.762
,
19.074
,
17.147
,
15.970
,
15.467
,
15.579
};
y
.
assign
(
ya
,
ya
+
y
.
size
());
ASSERT_EQUAL_TOL
(
SplineFitter
::
evaluateSplineDerivative
(
x
,
y
,
deriv
,
x
[
0
]),
SplineFitter
::
evaluateSplineDerivative
(
x
,
y
,
deriv
,
x
[
x
.
size
()
-
1
]),
1e-6
);
}
}
void
test2DSpline
()
{
void
test2DSpline
()
{
...
@@ -177,4 +183,3 @@ int main() {
...
@@ -177,4 +183,3 @@ int main() {
cout
<<
"Done"
<<
endl
;
cout
<<
"Done"
<<
endl
;
return
0
;
return
0
;
}
}
Write
Preview
Markdown
is supported
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