Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
1ffbb4c2
Commit
1ffbb4c2
authored
Apr 21, 2011
by
reichenbach
Browse files
[FIX] fixed uninitialized matrices in spherical harmonics test
[STYLE] corrected indention
parent
05f16efc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
src/common/math/test/WSymmetricSphericalHarmonic_test.h
src/common/math/test/WSymmetricSphericalHarmonic_test.h
+6
-4
No files found.
src/common/math/test/WSymmetricSphericalHarmonic_test.h
View file @
1ffbb4c2
...
...
@@ -63,16 +63,17 @@ public:
{
WMatrix_2
result
(
WSymmetricSphericalHarmonic
::
calcFRTMatrix
(
4
)
);
WMatrix_2
reference
(
15
,
15
);
reference
.
setZero
();
// j 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
// lj 0 2 2 2 2 2 4 4 4 4 4 4 4 4 4
reference
(
0
,
0
)
=
2.0
*
piDouble
;
for
(
size_t
i
=
1
;
i
<=
5
;
i
++
)
{
reference
(
i
,
i
)
=
-
2.0
*
piDouble
*
1.0
/
2.0
;
reference
(
i
,
i
)
=
-
2.0
*
piDouble
*
1.0
/
2.0
;
}
for
(
size_t
i
=
6
;
i
<=
14
;
i
++
)
{
reference
(
i
,
i
)
=
2.0
*
piDouble
*
3.0
/
8.0
;
reference
(
i
,
i
)
=
2.0
*
piDouble
*
3.0
/
8.0
;
}
TS_ASSERT_EQUALS
(
result
,
reference
);
}
...
...
@@ -85,16 +86,17 @@ public:
{
WMatrix_2
result
(
WSymmetricSphericalHarmonic
::
calcSmoothingMatrix
(
4
)
);
WMatrix_2
reference
(
15
,
15
);
reference
.
setZero
();
// j 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
// lj 0 2 2 2 2 2 4 4 4 4 4 4 4 4 4
reference
(
0
,
0
)
=
0.0
;
for
(
size_t
i
=
1
;
i
<=
5
;
i
++
)
{
reference
(
i
,
i
)
=
36.0
;
reference
(
i
,
i
)
=
36.0
;
}
for
(
size_t
i
=
6
;
i
<=
14
;
i
++
)
{
reference
(
i
,
i
)
=
400.0
;
reference
(
i
,
i
)
=
400.0
;
}
TS_ASSERT_EQUALS
(
result
,
reference
);
}
...
...
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