OpenWalnut  1.5.0dev
Public Member Functions | Private Member Functions | List of all members
WDataSetVectorTest Class Reference

Test basic functionality of WDataSetVector. More...

#include <WDataSetVector_test.h>

+ Inheritance diagram for WDataSetVectorTest:
+ Collaboration diagram for WDataSetVectorTest:

Public Member Functions

void setUp (void)
 Constructs unit test environment. More...
 
void testInterpolate (void)
 An interpolate of an vector is as if every components were interpolated. More...
 
void testEigenVectorInterpolate (void)
 Checks if the reorientation of the vectors is applied in eigenVectorInterpolate(). More...
 
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. More...
 
void testRotatedGridInterpolate (void)
 When the grid for this dataset was rotated the interpolation should still work. More...
 
void testTranslatedGridInterpolation ()
 Check whether interpolation works for a translated dataset. More...
 

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. More...
 

Detailed Description

Test basic functionality of WDataSetVector.

Definition at line 42 of file WDataSetVector_test.h.

Member Function Documentation

◆ delta()

bool WDataSetVectorTest::delta ( WVector3d  lhs,
WVector3d  rhs,
double  d 
)
inlineprivate

Computes if both vectors are almost similar and their components do not differ from a certain given delta.

Parameters
lhsFirst vector
rhsSecond vector
dThe given delta
Returns
True if and only if all components differing at most by the given delta.

Definition at line 310 of file WDataSetVector_test.h.

◆ setUp()

void WDataSetVectorTest::setUp ( void  )
inline

Constructs unit test environment.

Definition at line 48 of file WDataSetVector_test.h.

References WLogger::startup().

+ Here is the call graph for this function:

◆ testBoundary_ticket313()

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 162 of file WDataSetVector_test.h.

◆ testEigenVectorInterpolate()

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 121 of file WDataSetVector_test.h.

◆ testInterpolate()

void WDataSetVectorTest::testInterpolate ( void  )
inline

An interpolate of an vector is as if every components were interpolated.

Definition at line 56 of file WDataSetVector_test.h.

References wlimits::DBL_EPS.

◆ testRotatedGridInterpolate()

void WDataSetVectorTest::testRotatedGridInterpolate ( void  )
inline

When the grid for this dataset was rotated the interpolation should still work.

Definition at line 180 of file WDataSetVector_test.h.

References WMatrix< T >::makeIdentity().

+ Here is the call graph for this function:

◆ testTranslatedGridInterpolation()

void WDataSetVectorTest::testTranslatedGridInterpolation ( )
inline

Check whether interpolation works for a translated dataset.

Definition at line 236 of file WDataSetVector_test.h.

References WMatrix< T >::makeIdentity().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: