Briefer test output
Former-commit-id: 31ebc020e2de9578cef908ff9d3b42cf7fcb6451
This commit is contained in:
parent
a66f04a8c2
commit
baad6b75aa
|
@ -14,6 +14,7 @@
|
||||||
#include <qpms/indexing.h>
|
#include <qpms/indexing.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <gsl/gsl_sf_legendre.h>
|
#include <gsl/gsl_sf_legendre.h>
|
||||||
typedef struct ewaldtest2d_params {
|
typedef struct ewaldtest2d_params {
|
||||||
|
@ -127,17 +128,24 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (size_t i = 0; i < netas; ++i) {
|
|
||||||
for (size_t j = i+1; j < netas; ++j){
|
bool toprint[netas];
|
||||||
for (qpms_l_t n = 0; n <= plist[i].lMax; ++n) {
|
|
||||||
for (qpms_m_t m = -n; m <= n; ++m){
|
for (qpms_l_t n = 0; n <= plist[0].lMax; ++n) {
|
||||||
if ((m+n)%2) continue;
|
for (qpms_m_t m = -n; m <= n; ++m){
|
||||||
qpms_y_t y = qpms_mn2y_sc(m,n);
|
memset(toprint, 0, netas*sizeof(bool));
|
||||||
qpms_y_t y_conj = qpms_mn2y_sc(-m,n);
|
if ((m+n)%2) continue;
|
||||||
if (!isclose_cmplx(r[i]->sigmas_total[y], r[j]->sigmas_total[y], rtol, atol)) {
|
qpms_y_t y = qpms_mn2y_sc(m,n);
|
||||||
++fails;
|
qpms_y_t y_conj = qpms_mn2y_sc(-m,n);
|
||||||
printf("with eta = %.16g:\n", plist[i].eta);
|
for (size_t i = 0; i < netas; ++i) {
|
||||||
printf("%zd %d %d: T:%.16g%+.16gj(%.3g) L:%.16g%+.16gj(%.3g) S:%.16g%+.16gj(%.3g) \n"
|
for (size_t j = i+1; j < netas; ++j){
|
||||||
|
if (!isclose_cmplx(r[i]->sigmas_total[y], r[j]->sigmas_total[y], rtol, atol))
|
||||||
|
toprint[i] = toprint[j] = true;
|
||||||
|
}
|
||||||
|
if (toprint[i]) {
|
||||||
|
++fails;
|
||||||
|
printf("with eta = %.16g:\n", plist[i].eta);
|
||||||
|
printf("%zd %d %d: T:%.16g%+.16gj(%.3g) L:%.16g%+.16gj(%.3g) S:%.16g%+.16gj(%.3g) \n"
|
||||||
//"| predict %.16g%+.16gj \n| actual %.16g%+.16gj\n"
|
//"| predict %.16g%+.16gj \n| actual %.16g%+.16gj\n"
|
||||||
,
|
,
|
||||||
y, n, m, creal(san(r[i]->sigmas_total[y])), san(cimag(r[i]->sigmas_total[y])),
|
y, n, m, creal(san(r[i]->sigmas_total[y])), san(cimag(r[i]->sigmas_total[y])),
|
||||||
|
@ -150,29 +158,16 @@ int main(int argc, char **argv) {
|
||||||
//san(creal(r[i]->regsigmas_416[y])), san(cimag(r[i]->regsigmas_416[y])),
|
//san(creal(r[i]->regsigmas_416[y])), san(cimag(r[i]->regsigmas_416[y])),
|
||||||
//san(creal(r[i]->sigmas_total[y]) + creal(r[i]->sigmas_total[y_conj])),
|
//san(creal(r[i]->sigmas_total[y]) + creal(r[i]->sigmas_total[y_conj])),
|
||||||
//san(cimag(r[i]->sigmas_total[y]) - cimag(r[i]->sigmas_total[y_conj]))
|
//san(cimag(r[i]->sigmas_total[y]) - cimag(r[i]->sigmas_total[y_conj]))
|
||||||
);
|
);
|
||||||
printf("with eta = %.16g:\n", plist[j].eta);
|
//if(!y) printf("0:%.16g%+.16g\n", san(creal(r[i]->sigma0)), san(cimag(r[i]->sigma0)));
|
||||||
printf("%zd %d %d: T:%.16g%+.16gj(%.3g) L:%.16g%+.16gj(%.3g) S:%.16g%+.16gj(%.3g) \n"
|
|
||||||
//"| predict %.16g%+.16gj \n| actual %.16g%+.16gj\n"
|
|
||||||
,
|
|
||||||
y, n, m, creal(san(r[j]->sigmas_total[y])), san(cimag(r[j]->sigmas_total[y])),
|
|
||||||
r[j]->err_sigmas_total[y],
|
|
||||||
san(creal(r[j]->sigmas_long[y])), san(cimag(r[j]->sigmas_long[y])),
|
|
||||||
r[j]->err_sigmas_long[y],
|
|
||||||
san(creal(r[j]->sigmas_short[y])), san(cimag(r[j]->sigmas_short[y])),
|
|
||||||
r[j]->err_sigmas_short[y]
|
|
||||||
// TODO and count big differences as failures.
|
|
||||||
//san(creal(r[j]->regsigmas_416[y])), san(cimag(r[j]->regsigmas_416[y])),
|
|
||||||
//san(creal(r[j]->sigmas_total[y]) + creal(r[j]->sigmas_total[y_conj])),
|
|
||||||
//san(cimag(r[j]->sigmas_total[y]) - cimag(r[j]->sigmas_total[y_conj]))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ewaldtest2d_results_free(r[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (size_t i = 0; i < netas; ++i)
|
||||||
|
ewaldtest2d_results_free(r[i]);
|
||||||
|
|
||||||
return fails;
|
return fails;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue