Project
Loading...
Searching...
No Matches
testChebyshev3D.cxx File Reference

Accuracy of the Chebyshev3D evaluation kernel. More...

#include <boost/test/unit_test.hpp>
#include <cmath>
#include <random>
#include "MathUtils/Chebyshev3D.h"

Go to the source code of this file.

Macros

#define BOOST_TEST_MODULE   Test Chebyshev3D
 
#define BOOST_TEST_MAIN
 
#define BOOST_TEST_DYN_LINK
 

Functions

 BOOST_AUTO_TEST_CASE (Chebyshev3D_eval_accuracy)
 

Detailed Description

Accuracy of the Chebyshev3D evaluation kernel.

Guards Chebyshev3DCalc::Eval / chebyshevEvaluation1D (the Clenshaw recurrence that dominates magnetic-field evaluation in track extrapolation). We build an in-memory parameterization of a known smooth function and check that Eval reproduces it to the requested precision over many random points, and that the per-dimension and double-precision overloads agree with the float vector overload. Any breakage of the recurrence (e.g. a wrong FMA regrouping) makes the reproduction error explode and fails the test.

Definition in file testChebyshev3D.cxx.

Macro Definition Documentation

◆ BOOST_TEST_DYN_LINK

#define BOOST_TEST_DYN_LINK

Definition at line 25 of file testChebyshev3D.cxx.

◆ BOOST_TEST_MAIN

#define BOOST_TEST_MAIN

Definition at line 24 of file testChebyshev3D.cxx.

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   Test Chebyshev3D

Definition at line 23 of file testChebyshev3D.cxx.

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( Chebyshev3D_eval_accuracy  )

Definition at line 47 of file testChebyshev3D.cxx.