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

Test class for all tensor operators. More...

#include <WTensorFunctions_test.h>

+ Inheritance diagram for WTensorOperatorsTest:
+ Collaboration diagram for WTensorOperatorsTest:

Public Member Functions

void testMultiplyTensorsOperator ()
 Test order 2 tensor multiplication. More...
 
void testEvaluateSphericalFunction ()
 The optimizations for symmetric tensors should not corrupt the result. More...
 

Private Member Functions

void setUp ()
 Initialize a lot of tensors. More...
 
double calcTens (WTensorSym< 4, 3, double > const &t, WVector3d const &v)
 A helper function that implements the simple approach to tensor evaluation. More...
 

Private Attributes

WTensor< 2, 3, int > one
 a test tensor More...
 
WTensor< 2, 3, int > zero
 a test tensor More...
 
WTensor< 2, 3, int > rdm1
 a test tensor More...
 
WTensor< 2, 3, int > rdm2
 a test tensor More...
 
WTensor< 2, 3, int > res1
 a test tensor More...
 
WTensor< 2, 3, int > res2
 a test tensor More...
 
WTensor< 2, 3, int > res3
 a test tensor More...
 
WTensor< 2, 3, int > res4
 a test tensor More...
 
WTensorSym< 2, 3, int > sone
 a test tensor More...
 
WTensorSym< 2, 3, int > szero
 a test tensor More...
 
WTensorSym< 2, 3, int > srdm1
 a test tensor More...
 
WTensorSym< 2, 3, int > srdm2
 a test tensor More...
 

Detailed Description

Test class for all tensor operators.

Definition at line 578 of file WTensorFunctions_test.h.

Member Function Documentation

◆ calcTens()

double WTensorOperatorsTest::calcTens ( WTensorSym< 4, 3, double > const &  t,
WVector3d const &  v 
)
inlineprivate

A helper function that implements the simple approach to tensor evaluation.

Parameters
tThe tensor.
vThe gradient.
Returns
value

Definition at line 745 of file WTensorFunctions_test.h.

Referenced by testEvaluateSphericalFunction().

+ Here is the caller graph for this function:

◆ setUp()

void WTensorOperatorsTest::setUp ( )
inlineprivate

Initialize a lot of tensors.

Definition at line 664 of file WTensorFunctions_test.h.

References one, rdm1, rdm2, res1, res2, res3, res4, sone, srdm1, and srdm2.

◆ testEvaluateSphericalFunction()

void WTensorOperatorsTest::testEvaluateSphericalFunction ( )
inline

The optimizations for symmetric tensors should not corrupt the result.

Definition at line 625 of file WTensorFunctions_test.h.

References calcTens().

+ Here is the call graph for this function:

◆ testMultiplyTensorsOperator()

void WTensorOperatorsTest::testMultiplyTensorsOperator ( )
inline

Test order 2 tensor multiplication.

Definition at line 584 of file WTensorFunctions_test.h.

References one, rdm1, rdm2, res1, res2, res3, res4, sone, srdm1, srdm2, szero, and zero.

Member Data Documentation

◆ one

WTensor< 2, 3, int > WTensorOperatorsTest::one
private

a test tensor

Definition at line 765 of file WTensorFunctions_test.h.

Referenced by setUp(), and testMultiplyTensorsOperator().

◆ rdm1

WTensor< 2, 3, int > WTensorOperatorsTest::rdm1
private

a test tensor

Definition at line 769 of file WTensorFunctions_test.h.

Referenced by setUp(), and testMultiplyTensorsOperator().

◆ rdm2

WTensor< 2, 3, int > WTensorOperatorsTest::rdm2
private

a test tensor

Definition at line 771 of file WTensorFunctions_test.h.

Referenced by setUp(), and testMultiplyTensorsOperator().

◆ res1

WTensor< 2, 3, int > WTensorOperatorsTest::res1
private

a test tensor

Definition at line 773 of file WTensorFunctions_test.h.

Referenced by setUp(), and testMultiplyTensorsOperator().

◆ res2

WTensor< 2, 3, int > WTensorOperatorsTest::res2
private

a test tensor

Definition at line 775 of file WTensorFunctions_test.h.

Referenced by setUp(), and testMultiplyTensorsOperator().

◆ res3

WTensor< 2, 3, int > WTensorOperatorsTest::res3
private

a test tensor

Definition at line 777 of file WTensorFunctions_test.h.

Referenced by setUp(), and testMultiplyTensorsOperator().

◆ res4

WTensor< 2, 3, int > WTensorOperatorsTest::res4
private

a test tensor

Definition at line 779 of file WTensorFunctions_test.h.

Referenced by setUp(), and testMultiplyTensorsOperator().

◆ sone

WTensorSym< 2, 3, int > WTensorOperatorsTest::sone
private

a test tensor

Definition at line 781 of file WTensorFunctions_test.h.

Referenced by setUp(), and testMultiplyTensorsOperator().

◆ srdm1

WTensorSym< 2, 3, int > WTensorOperatorsTest::srdm1
private

a test tensor

Definition at line 785 of file WTensorFunctions_test.h.

Referenced by setUp(), and testMultiplyTensorsOperator().

◆ srdm2

WTensorSym< 2, 3, int > WTensorOperatorsTest::srdm2
private

a test tensor

Definition at line 787 of file WTensorFunctions_test.h.

Referenced by setUp(), and testMultiplyTensorsOperator().

◆ szero

WTensorSym< 2, 3, int > WTensorOperatorsTest::szero
private

a test tensor

Definition at line 783 of file WTensorFunctions_test.h.

Referenced by testMultiplyTensorsOperator().

◆ zero

WTensor< 2, 3, int > WTensorOperatorsTest::zero
private

a test tensor

Definition at line 767 of file WTensorFunctions_test.h.

Referenced by testMultiplyTensorsOperator().


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