OpenWalnut
1.4.0
|
Test basic functionality of WDataSetVector. More...
#include <WDataSetVector_test.h>
Public Member Functions | |
void | setUp (void) |
Constructs unit test environment. | |
void | testInterpolate (void) |
An interpolate of an vector is as if every components were interpolated. | |
void | testEigenVectorInterpolate (void) |
Checks if the reorientation of the vectors is applied in eigenVectorInterpolate(). | |
void | testBoundary_ticket313 (void) |
Using interpolate on Positions on the boundary of the grid the success flag is true but there should not be any segfaults. | |
void | testRotatedGridInterpolate (void) |
When the grid for this dataset was rotated the interpolation should still work. | |
Private Member Functions | |
bool | delta (WVector3d lhs, WVector3d rhs, double d) |
Computes if both vectors are almost similar and their components do not differ from a certain given delta. |
Test basic functionality of WDataSetVector.
Definition at line 41 of file WDataSetVector_test.h.
bool WDataSetVectorTest::delta | ( | WVector3d | lhs, |
WVector3d | rhs, | ||
double | d | ||
) | [inline, private] |
Computes if both vectors are almost similar and their components do not differ from a certain given delta.
lhs | First vector |
rhs | Second vector |
d | The given delta |
Definition at line 242 of file WDataSetVector_test.h.
Referenced by testEigenVectorInterpolate(), testInterpolate(), and testRotatedGridInterpolate().
void WDataSetVectorTest::setUp | ( | void | ) | [inline] |
Constructs unit test environment.
Definition at line 47 of file WDataSetVector_test.h.
References WLogger::startup().
void WDataSetVectorTest::testBoundary_ticket313 | ( | void | ) | [inline] |
Using interpolate on Positions on the boundary of the grid the success flag is true but there should not be any segfaults.
See ticket #313 for more informations.
Definition at line 161 of file WDataSetVector_test.h.
References WDataSetVector::interpolate().
void WDataSetVectorTest::testEigenVectorInterpolate | ( | void | ) | [inline] |
Checks if the reorientation of the vectors is applied in eigenVectorInterpolate().
v_6( 1, 0, 0 ) v_7( 1, 0, 0 ) /----------------------------/ z A /| /| | / | / | |/ | / | /---+------------------------/ | v_4( 1, 0, 0 ) v_5( 1, 0, 0 ) | | | | | | | | | | | | | | y | | | | / | | | | / | | | | / | | | | v_2( 1, 0, 0 ) | | v_3( 1, 0, 0 ) | /------------------------+---/ | / | / | / | / |/ |/ /----------------------------/------------------> x v_0( -1, 0, 0) v_1( 1, 0, 0 )
Definition at line 120 of file WDataSetVector_test.h.
References delta(), WDataSetVector::eigenVectorInterpolate(), and WDataSetVector::interpolate().
void WDataSetVectorTest::testInterpolate | ( | void | ) | [inline] |
An interpolate of an vector is as if every components were interpolated.
Definition at line 55 of file WDataSetVector_test.h.
References wlimits::DBL_EPS, delta(), and WDataSetVector::interpolate().
void WDataSetVectorTest::testRotatedGridInterpolate | ( | void | ) | [inline] |
When the grid for this dataset was rotated the interpolation should still work.
Definition at line 179 of file WDataSetVector_test.h.
References delta(), WDataSetVector::eigenVectorInterpolate(), WDataSetVector::interpolate(), and WMatrix< T >::makeIdentity().