We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f467444 commit 57925ecCopy full SHA for 57925ec
1 file changed
src/tests/shammath/sphkernelsTests.cpp
@@ -82,13 +82,25 @@ inline void validate_kernel_3d(
82
// is df = f' ?
83
Tscal L2_sum = 0;
84
Tscal step = 0.01;
85
- for (Tscal x = 0; x < Ker::Rkern; x += step) {
+
86
+ // for (Tscal x = 0; x < Ker::Rkern; x += step) {
87
+ // Tscal diff = Ker::df(x) - shammath::derivative_upwind<Tscal>(x, dx, [](Tscal x) {
88
+ // return Ker::f(x);
89
+ // });
90
+ // diff *= gen_norm3d;
91
+ // L2_sum += diff * diff * step;
92
+ // }
93
94
+ Tscal x = 0;
95
+ while (x < Ker::Rkern) {
96
Tscal diff = Ker::df(x) - shammath::derivative_upwind<Tscal>(x, dx, [](Tscal x) {
97
return Ker::f(x);
98
});
99
diff *= gen_norm3d;
100
L2_sum += diff * diff * step;
101
+ x += step;
102
}
103
104
REQUIRE_FLOAT_EQUAL(L2_sum, 0, tol);
105
106
0 commit comments