OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
TestQuaternion.cpp File Reference
#include "gtest/gtest.h"
#include "Algorithms/Matrix.h"
#include "Algorithms/Quaternion.hpp"
#include "Ippl.h"
#include "Utilities/GeneralOpalException.h"
#include <cmath>
Include dependency graph for TestQuaternion.cpp:

Go to the source code of this file.

Classes

class  QuaternionTest
 

Functions

 TEST_F (QuaternionTest, DefaultConstructor)
 
 TEST_F (QuaternionTest, ComponentConstructor)
 
 TEST_F (QuaternionTest, VectorConstructor)
 
 TEST_F (QuaternionTest, RealPlusVectorConstructor)
 
 TEST_F (QuaternionTest, CopyConstructor)
 
 TEST_F (QuaternionTest, RealAndImagParts)
 
 TEST_F (QuaternionTest, NormAndLength)
 
 TEST_F (QuaternionTest, IsUnit)
 
 TEST_F (QuaternionTest, IsPure)
 
 TEST_F (QuaternionTest, IsPureUnit)
 
 TEST_F (QuaternionTest, Conjugate)
 
 TEST_F (QuaternionTest, Normalize)
 
 TEST_F (QuaternionTest, Inverse)
 
 TEST_F (QuaternionTest, ScalarMultiplication)
 
 TEST_F (QuaternionTest, ScalarDivision)
 
 TEST_F (QuaternionTest, QuaternionMultiplication)
 
 TEST_F (QuaternionTest, QuaternionMultiplicationAssociativity)
 
 TEST_F (QuaternionTest, RotateVector90DegreesAroundZ)
 
 TEST_F (QuaternionTest, RotateVector180DegreesAroundX)
 
 TEST_F (QuaternionTest, RotateVectorIdentity)
 
 TEST_F (QuaternionTest, GetRotationMatrix90DegreesZ)
 
 TEST_F (QuaternionTest, GetRotationMatrixIdentity)
 
 TEST_F (QuaternionTest, MatrixConstructorRoundTrip)
 
 TEST_F (QuaternionTest, GetQuaternionSameVectors)
 
 TEST_F (QuaternionTest, GetQuaternionOrthogonalVectors)
 
 TEST_F (QuaternionTest, GetQuaternionOppositeVectors)
 
 TEST_F (QuaternionTest, ConjugatePreservesNorm)
 
 TEST_F (QuaternionTest, MultiplicationByConjugateGivesNorm)
 
 TEST_F (QuaternionTest, NormalizeZeroQuaternionThrows)
 
 TEST_F (QuaternionTest, InverseZeroQuaternionThrows)
 
 TEST_F (QuaternionTest, RotateRequiresUnitQuaternion)
 
 TEST_F (QuaternionTest, GetQuaternionRejectsZeroVector)
 

Function Documentation

◆ TEST_F() [1/32]

TEST_F ( QuaternionTest  ,
ComponentConstructor   
)

Definition at line 39 of file TestQuaternion.cpp.

References Quaternion::real().

Here is the call graph for this function:

◆ TEST_F() [2/32]

TEST_F ( QuaternionTest  ,
Conjugate   
)

Definition at line 118 of file TestQuaternion.cpp.

References Quaternion::conjugate(), and Quaternion::real().

Here is the call graph for this function:

◆ TEST_F() [3/32]

TEST_F ( QuaternionTest  ,
ConjugatePreservesNorm   
)

Definition at line 346 of file TestQuaternion.cpp.

References Quaternion::conjugate(), and Quaternion::Norm().

Here is the call graph for this function:

◆ TEST_F() [4/32]

TEST_F ( QuaternionTest  ,
CopyConstructor   
)

Definition at line 67 of file TestQuaternion.cpp.

References Quaternion::real().

Here is the call graph for this function:

◆ TEST_F() [5/32]

TEST_F ( QuaternionTest  ,
DefaultConstructor   
)

Definition at line 30 of file TestQuaternion.cpp.

References Quaternion::real().

Here is the call graph for this function:

◆ TEST_F() [6/32]

TEST_F ( QuaternionTest  ,
GetQuaternionOppositeVectors   
)

Definition at line 329 of file TestQuaternion.cpp.

References getQuaternion(), Quaternion::isUnit(), Quaternion::real(), and Quaternion::rotate().

Here is the call graph for this function:

◆ TEST_F() [7/32]

TEST_F ( QuaternionTest  ,
GetQuaternionOrthogonalVectors   
)

Definition at line 313 of file TestQuaternion.cpp.

References getQuaternion(), Quaternion::isUnit(), and Quaternion::rotate().

Here is the call graph for this function:

◆ TEST_F() [8/32]

TEST_F ( QuaternionTest  ,
GetQuaternionRejectsZeroVector   
)

Definition at line 382 of file TestQuaternion.cpp.

References getQuaternion().

Here is the call graph for this function:

◆ TEST_F() [9/32]

TEST_F ( QuaternionTest  ,
GetQuaternionSameVectors   
)

Definition at line 302 of file TestQuaternion.cpp.

References getQuaternion(), Quaternion::isUnit(), and Quaternion::real().

Here is the call graph for this function:

◆ TEST_F() [10/32]

TEST_F ( QuaternionTest  ,
GetRotationMatrix90DegreesZ   
)

Definition at line 234 of file TestQuaternion.cpp.

References Quaternion::getRotationMatrix().

Here is the call graph for this function:

◆ TEST_F() [11/32]

TEST_F ( QuaternionTest  ,
GetRotationMatrixIdentity   
)

Definition at line 257 of file TestQuaternion.cpp.

References Quaternion::getRotationMatrix().

Here is the call graph for this function:

◆ TEST_F() [12/32]

TEST_F ( QuaternionTest  ,
Inverse   
)

Definition at line 136 of file TestQuaternion.cpp.

References Quaternion::inverse(), and Quaternion::real().

Here is the call graph for this function:

◆ TEST_F() [13/32]

TEST_F ( QuaternionTest  ,
InverseZeroQuaternionThrows   
)

Definition at line 369 of file TestQuaternion.cpp.

References Quaternion::inverse().

Here is the call graph for this function:

◆ TEST_F() [14/32]

TEST_F ( QuaternionTest  ,
IsPure   
)

Definition at line 102 of file TestQuaternion.cpp.

References Quaternion::isPure().

Here is the call graph for this function:

◆ TEST_F() [15/32]

TEST_F ( QuaternionTest  ,
IsPureUnit   
)

Definition at line 109 of file TestQuaternion.cpp.

References Quaternion::isPureUnit().

Here is the call graph for this function:

◆ TEST_F() [16/32]

TEST_F ( QuaternionTest  ,
IsUnit   
)

Definition at line 93 of file TestQuaternion.cpp.

References Quaternion::isUnit().

Here is the call graph for this function:

◆ TEST_F() [17/32]

TEST_F ( QuaternionTest  ,
MatrixConstructorRoundTrip   
)

Definition at line 273 of file TestQuaternion.cpp.

References Quaternion::getRotationMatrix().

Here is the call graph for this function:

◆ TEST_F() [18/32]

TEST_F ( QuaternionTest  ,
MultiplicationByConjugateGivesNorm   
)

Definition at line 353 of file TestQuaternion.cpp.

References Quaternion::conjugate(), Quaternion::Norm(), and Quaternion::real().

Here is the call graph for this function:

◆ TEST_F() [19/32]

TEST_F ( QuaternionTest  ,
Normalize   
)

Definition at line 128 of file TestQuaternion.cpp.

References Quaternion::isUnit(), Quaternion::Norm(), and Quaternion::normalize().

Here is the call graph for this function:

◆ TEST_F() [20/32]

TEST_F ( QuaternionTest  ,
NormalizeZeroQuaternionThrows   
)

Definition at line 363 of file TestQuaternion.cpp.

References Quaternion::normalize().

Here is the call graph for this function:

◆ TEST_F() [21/32]

TEST_F ( QuaternionTest  ,
NormAndLength   
)

Definition at line 86 of file TestQuaternion.cpp.

References Quaternion::length(), and Quaternion::Norm().

Here is the call graph for this function:

◆ TEST_F() [22/32]

TEST_F ( QuaternionTest  ,
QuaternionMultiplication   
)

Definition at line 169 of file TestQuaternion.cpp.

References Quaternion::real().

Here is the call graph for this function:

◆ TEST_F() [23/32]

TEST_F ( QuaternionTest  ,
QuaternionMultiplicationAssociativity   
)

Definition at line 180 of file TestQuaternion.cpp.

References Quaternion::real().

Here is the call graph for this function:

◆ TEST_F() [24/32]

TEST_F ( QuaternionTest  ,
RealAndImagParts   
)

Definition at line 76 of file TestQuaternion.cpp.

References Quaternion::imag(), and Quaternion::real().

Here is the call graph for this function:

◆ TEST_F() [25/32]

TEST_F ( QuaternionTest  ,
RealPlusVectorConstructor   
)

Definition at line 58 of file TestQuaternion.cpp.

References Quaternion::real().

Here is the call graph for this function:

◆ TEST_F() [26/32]

TEST_F ( QuaternionTest  ,
RotateRequiresUnitQuaternion   
)

Definition at line 375 of file TestQuaternion.cpp.

References Quaternion::rotate().

Here is the call graph for this function:

◆ TEST_F() [27/32]

TEST_F ( QuaternionTest  ,
RotateVector180DegreesAroundX   
)

Definition at line 208 of file TestQuaternion.cpp.

References Quaternion::rotate().

Here is the call graph for this function:

◆ TEST_F() [28/32]

TEST_F ( QuaternionTest  ,
RotateVector90DegreesAroundZ   
)

Definition at line 194 of file TestQuaternion.cpp.

References Quaternion::rotate().

Here is the call graph for this function:

◆ TEST_F() [29/32]

TEST_F ( QuaternionTest  ,
RotateVectorIdentity   
)

Definition at line 222 of file TestQuaternion.cpp.

References Quaternion::rotate().

Here is the call graph for this function:

◆ TEST_F() [30/32]

TEST_F ( QuaternionTest  ,
ScalarDivision   
)

Definition at line 159 of file TestQuaternion.cpp.

References Quaternion::real().

Here is the call graph for this function:

◆ TEST_F() [31/32]

TEST_F ( QuaternionTest  ,
ScalarMultiplication   
)

Definition at line 149 of file TestQuaternion.cpp.

References Quaternion::real().

Here is the call graph for this function:

◆ TEST_F() [32/32]

TEST_F ( QuaternionTest  ,
VectorConstructor   
)

Definition at line 48 of file TestQuaternion.cpp.

References Quaternion::isPure(), and Quaternion::real().

Here is the call graph for this function: