Peano
Loading...
Searching...
No Matches
toolbox::multiprecision::tests::CompressedFloatingPointNumbersTest Class Reference

This is just a default test case that demonstrated how to write unit tests in Peano. More...

#include <CompressedFloatingPointNumbersTest.h>

Inheritance diagram for toolbox::multiprecision::tests::CompressedFloatingPointNumbersTest:
Collaboration diagram for toolbox::multiprecision::tests::CompressedFloatingPointNumbersTest:

Public Member Functions

 CompressedFloatingPointNumbersTest ()
 
virtual ~CompressedFloatingPointNumbersTest ()
 
virtual void run ()
 This routine is triggered by the TestCaseCollection.
 
- Public Member Functions inherited from tarch::tests::TestCase
 TestCase (const std::string &testCaseName)
 Constructor.
 
virtual ~TestCase ()
 Destructor.
 
int getNumberOfErrors () const
 
std::string getTestCaseName () const
 

Private Member Functions

void testDecomposeWithLongInt ()
 
void testDecomposeWithInt ()
 
void testDecomposeWithChar ()
 
void testBatchDecomposition ()
 
void testBatchDecompositionWithArrayOfFour ()
 
void testErrorComputation ()
 
void testTinyValues ()
 
void testDecompose ()
 Something taken from the ParCo presentation.
 
void testComposeDecompose ()
 

Static Private Attributes

static tarch::logging::Log _log
 

Additional Inherited Members

- Protected Member Functions inherited from tarch::tests::TestCase
 TestCase ()=delete
 
- Protected Attributes inherited from tarch::tests::TestCase
const std::string _testCaseName
 Name of the test case.
 
int _errors
 Error counter.
 
bool _error
 Indicate within macro if one specific validation failed.
 

Detailed Description

This is just a default test case that demonstrated how to write unit tests in Peano.

Feel free to rename, remove, or duplicate it.

Definition at line 23 of file CompressedFloatingPointNumbersTest.h.

Constructor & Destructor Documentation

◆ CompressedFloatingPointNumbersTest()

toolbox::multiprecision::tests::CompressedFloatingPointNumbersTest::CompressedFloatingPointNumbersTest ( )

◆ ~CompressedFloatingPointNumbersTest()

virtual toolbox::multiprecision::tests::CompressedFloatingPointNumbersTest::~CompressedFloatingPointNumbersTest ( )
virtual

Member Function Documentation

◆ run()

virtual void toolbox::multiprecision::tests::CompressedFloatingPointNumbersTest::run ( )
virtual

This routine is triggered by the TestCaseCollection.

Implements tarch::tests::TestCase.

◆ testBatchDecomposition()

void toolbox::multiprecision::tests::CompressedFloatingPointNumbersTest::testBatchDecomposition ( )
private

◆ testBatchDecompositionWithArrayOfFour()

void toolbox::multiprecision::tests::CompressedFloatingPointNumbersTest::testBatchDecompositionWithArrayOfFour ( )
private

◆ testComposeDecompose()

void toolbox::multiprecision::tests::CompressedFloatingPointNumbersTest::testComposeDecompose ( )
private
   From ExaHyPE:
assertion in file /home/tobias/git/ExaHyPE/Code/./ExaHyPE/exahype/solvers/ADERDGSolver.cpp, line 2983 failed: tarch::la::equals( DataHeap::getInstance().getData(heapIndex)[i], reconstructedValue, CompressionAccuracy )
parameter DataHeap::getInstance().getData(heapIndex)[i]: 1.68855695855260723448e+00
parameter reconstructedValue: 1.01768855695855017984e+03
parameter DataHeap::getInstance().getData(heapIndex)[i] - reconstructedValue: -1.01599999999999761258e+03
parameter CompressionAccuracy: 1.00000000000000006228e-09
parameter bytesForMantissa: 5
ExaHyPE-Euler: /home/tobias/git/ExaHyPE/Code/./ExaHyPE/exahype/solvers/ADERDGSolver.cpp:2983: void exahype::solvers::ADERDGSolver::glueTogether(int, int, int): Assertion `false' failed.
#define assertion(expr)
This file is part of the multigrid project within Peano 4.
Definition __init__.py:1
bool equals(const Matrix< Rows, Cols, Scalar > &lhs, const Matrix< Rows, Cols, Scalar > &rhs, const Scalar &tolerance=NUMERICAL_ZERO_DIFFERENCE)
Compares to matrices on equality by means of a numerical accuracy.
 But I used /4.0 here for the accuracy.

◆ testDecompose()

void toolbox::multiprecision::tests::CompressedFloatingPointNumbersTest::testDecompose ( )
private

Something taken from the ParCo presentation.

◆ testDecomposeWithChar()

void toolbox::multiprecision::tests::CompressedFloatingPointNumbersTest::testDecomposeWithChar ( )
private

◆ testDecomposeWithInt()

void toolbox::multiprecision::tests::CompressedFloatingPointNumbersTest::testDecomposeWithInt ( )
private

◆ testDecomposeWithLongInt()

void toolbox::multiprecision::tests::CompressedFloatingPointNumbersTest::testDecomposeWithLongInt ( )
private

◆ testErrorComputation()

void toolbox::multiprecision::tests::CompressedFloatingPointNumbersTest::testErrorComputation ( )
private

◆ testTinyValues()

void toolbox::multiprecision::tests::CompressedFloatingPointNumbersTest::testTinyValues ( )
private

Field Documentation

◆ _log

tarch::logging::Log toolbox::multiprecision::tests::CompressedFloatingPointNumbersTest::_log
staticprivate

Definition at line 25 of file CompressedFloatingPointNumbersTest.h.


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