25 #ifndef WSYMMETRICSPHERICALHARMONIC_TEST_H
26 #define WSYMMETRICSPHERICALHARMONIC_TEST_H
39 #include <cxxtest/TestSuite.h>
41 #include "../WMatrix.h"
42 #include "../WValue.h"
44 #include "../WGeometryFunctions.h"
45 #include "../WSymmetricSphericalHarmonic.h"
46 #include "../WTensorSym.h"
47 #include "../WTensorFunctions.h"
49 #include "WMatrixTraits.h"
68 reference( 0, 0 ) = 2.0 * pi();
69 for(
size_t i = 1; i <= 5; i++ )
71 reference( i, i ) = -2.0 * pi() * 1.0 / 2.0;
73 for(
size_t i = 6; i <= 14; i++ )
75 reference( i, i ) = 2.0 * pi() * 3.0 / 8.0;
78 for(
size_t i = 0; i < 15; ++i )
80 for(
size_t j = 0; j < 15; ++j )
82 TS_ASSERT_DELTA( result( i, j ), reference( i, j ), 1e-9 );
98 reference( 0, 0 ) = 0.0;
99 for(
size_t i = 1; i <= 5; i++ )
101 reference( i, i ) = 36.0;
103 for(
size_t i = 6; i <= 14; i++ )
105 reference( i, i ) = 400.0;
108 for(
size_t i = 0; i < 15; ++i )
110 for(
size_t j = 0; j < 15; ++j )
112 TS_ASSERT_DELTA( result( i, j ), reference( i, j ), 1e-9 );
void setZero()
Resets the matrix components to zero.
Testsuite for WSymmetricSphericalHarmonic.
void testCalcFRTMatrix(void)
testCalcFRTMatrix
void testCalcSmoothingMatrix(void)
testCalcSmoothingMatrix
Class for symmetric spherical harmonics The index scheme of the coefficients/basis values is like in ...