26 February 2022 04:28:20 PM
LAGRANGE_INTERP_ND_TEST:
C version
Test the LAGRANGE_INTERP_ND library.
The R8LIB library is needed.
TEST01:
Interpolate in 1D, using orders.
LAGRANGE_INTERP_ND_GRID sets the interpolant.
LAGRANGE_INTERP_ND_VALUE evaluates it.
Zinterp Zexact Error
0.216702 0.216686 1.63e-05
0.817085 0.817074 1.10e-05
0.737595 0.7376 5.37e-06
0.532609 0.532622 1.33e-05
0.403489 0.403471 1.77e-05
TEST02:
Interpolate in 2D, using orders.
LAGRANGE_INTERP_ND_GRID sets the interpolant.
LAGRANGE_INTERP_ND_VALUE evaluates it.
Zinterp Zexact Error
0.83001 0.831022 1.01e-03
0.84218 0.842438 2.58e-04
0.405576 0.408251 2.68e-03
0.27169 0.276419 4.73e-03
0.594992 0.593563 1.43e-03
TEST03:
Interpolate in 3D, using orders.
LAGRANGE_INTERP_ND_GRID sets the interpolant.
LAGRANGE_INTERP_ND_VALUE evaluates it.
Zinterp Zexact Error
0.959476 0.95934 1.36e-04
0.645867 0.645501 3.66e-04
0.275349 0.279693 4.34e-03
0.703275 0.70301 2.66e-04
0.920134 0.920307 1.74e-04
TEST04:
Interpolate in 3D, using orders.
Use a sequence of increasing orders.
Level Order Average Error
1 27 4.52e-03
2 125 2.56e-04
3 729 5.20e-06
4 4913 2.19e-07
5 35937 1.82e-09
TEST05:
Repeat test #1, using levels.
LAGRANGE_INTERP_ND_GRID2 sets the interpolant.
LAGRANGE_INTERP_ND_VALUE2 evaluates it.
Zinterp Zexact Error
0.216702 0.216686 1.63e-05
0.817085 0.817074 1.10e-05
0.737595 0.7376 5.37e-06
0.532609 0.532622 1.33e-05
0.403489 0.403471 1.77e-05
TEST06:
Repeat test #2, using levels.
LAGRANGE_INTERP_ND_GRID2 sets the interpolant.
LAGRANGE_INTERP_ND_VALUE2 evaluates it.
Zinterp Zexact Error
0.83001 0.831022 1.01e-03
0.84218 0.842438 2.58e-04
0.405576 0.408251 2.68e-03
0.27169 0.276419 4.73e-03
0.594992 0.593563 1.43e-03
TEST07:
Repeat test #3, using levels.
LAGRANGE_INTERP_ND_GRID2 sets the interpolant.
LAGRANGE_INTERP_ND_VALUE2 evaluates it.
Zinterp Zexact Error
0.959476 0.95934 1.36e-04
0.645867 0.645501 3.66e-04
0.275349 0.279693 4.34e-03
0.703275 0.70301 2.66e-04
0.920134 0.920307 1.74e-04
TEST08:
Interpolate in 3D, using levels.
Use a sequence of increasing levels.
Level Order Average Error
0 1 3.52e-02
1 27 4.52e-03
2 125 2.56e-04
3 729 5.20e-06
4 4913 2.19e-07
5 35937 1.82e-09
TEST09:
Interpolate in 3D, using orders.
Use a sequence of increasing orders.
Use anisotropic resolution.
The interpoland is a polynomial of degrees 3, 5, 2
so our orders need to be at least 4, 6, 3 to match it.
Level Orders Average Error
0 1 1 1 5.08e-02
1 2 1 1 6.78e-02
2 1 2 1 5.44e-02
3 1 1 2 5.14e-02
4 4 2 2 2.75e-02
5 2 4 2 7.13e-02
6 2 2 4 8.94e-02
7 2 2 4 8.94e-02
8 6 4 4 7.78e-04
9 4 6 4 1.31e-16
10 4 4 6 7.78e-04
LAGRANGE_INTERP_ND_TEST:
Normal end of execution.
26 February 2022 04:28:20 PM