|
| | theta<< 1.0, 2.0, 3.0, 4.0, 5.0, 6.0;auto result=PolynomialSquaredNorm< 2 > (theta) |
| |
| | CHECK (result.size()==3) |
| |
| | CHECK (result(0)==doctest::Approx(1.0+16.0)) |
| |
| | CHECK (result(1)==doctest::Approx(4.0+25.0)) |
| |
| | CHECK (result(2)==doctest::Approx(9.0+36.0)) |
| |
| | theta<< 2.0, 1.0, 3.0, 4.0, 5.0, 6.0;auto result=PolynomialSquaredNorm< 2 > (theta) |
| |
| | theta<< 1.0, 2.0, 3.0, 4.0;auto result=PolynomialSquaredNorm< 2 > (theta) |
| |
| | theta<< 1.0, 2.0, 3.0, 4.0, 5.0, 6.0;auto result=PolynomialSquaredNorm< 3 > (theta) |
| |
| | for (int i=0;i< 10;i++) theta(i = theta(i, 0) * theta(i, 0) |
| |
| | TEST_CASE ("PolynomialDotProduct<2> self-product equals PolynomialSquaredNorm") |
| |
| | TEST_CASE ("PolynomialDotProduct<2> linearity") |
| |
| | TEST_CASE ("FMINMOD_Biway: same-sign inputs") |
| |
| | TEST_CASE ("FMINMOD_Biway: opposite-sign inputs produce zero") |
| |
| | TEST_CASE ("FMINMOD_Biway: zero input") |
| |
| | TEST_CASE ("FVanLeer_Biway: same-sign inputs") |
| |
| | TEST_CASE ("FVanLeer_Biway: opposite-sign produces zero") |
| |
| | TEST_CASE ("FVanLeer_Biway: equal inputs return same value") |
| |
| | TEST_CASE ("FWBAP_L2_Biway: identical inputs pass through") |
| |
| | TEST_CASE ("FWBAP_L2_Biway: no NaN for random inputs") |
| |
| | TEST_CASE ("FWBAP_L2_Biway: output bounded by inputs for same-sign") |
| |
| | TEST_CASE ("FWBAP_L2_Cut_Biway: opposite-sign cut to zero") |
| |
| | TEST_CASE ("FWBAP_L2_Cut_Biway: no NaN") |
| |
| | TEST_CASE ("FWBAP_L2_Multiway: all identical inputs pass through") |
| |
| | TEST_CASE ("FWBAP_L2_Multiway: no NaN for random inputs") |
| |
| | TEST_CASE ("FWBAP_L2_Multiway_Polynomial2D: all identical pass through") |
| |
Unit tests for standalone limiter functions in CFV/Limiters.hpp.
Tests cover:
- PolynomialSquaredNorm<2> and <3> for all supported row counts
- PolynomialDotProduct<2> for all supported row counts
- FWBAP_L2_Biway: sign preservation, identical-input pass-through, NaN-free
- FWBAP_L2_Cut_Biway: sign preservation with cutting
- FMINMOD_Biway: classical minmod properties
- FVanLeer_Biway: classical Van-Leer limiter properties
- FWBAP_L2_Multiway: multi-stencil weighted averaging
- FWBAP_L2_Multiway_Polynomial2D: polynomial-norm weighted multi-stencil
- FWBAP_L2_Multiway_PolynomialOrth: orthogonal polynomial multi-stencil
- FWBAP_L2_Biway_PolynomialNorm<2>: polynomial-norm biway
- FMEMM_Biway_PolynomialNorm<2>: MEMM biway
- FMEMM_Multiway_Polynomial2D: MEMM multi-stencil
- FWBAP_L2_Biway_PolynomialOrth: orthogonal biway
Definition in file test_Limiters.cpp.