Update test programs to current API.

Former-commit-id: 199c0a0010eea1becce6297186ea06e93c2de6cd
This commit is contained in:
Marek Nečada 2020-03-21 21:16:24 +02:00
parent b3d15a1bb7
commit 3c7377e5fe
7 changed files with 7 additions and 7 deletions

View File

@ -22,7 +22,7 @@ int test_AB_single_vs_array(const qpms_trans_calculator *c, qpms_bessel_t wavety
cart3_t kd_cart)
{
int fails = 0;
sph_t kd_sph = cart2sph(kd_cart);
csph_t kd_sph = sph2csph(cart2sph(kd_cart));
complex double A[ssq(c->nelem)], B[ssq(c->nelem)];
QPMS_ENSURE_SUCCESS(qpms_trans_calculator_get_AB_arrays(c, A, B, c->nelem, 1, kd_sph, false, wavetype));

View File

@ -26,7 +26,7 @@ int main() {
beyn_result_t *result =
beyn_solve(dim, L, M_function, NULL /*M_inv_Vhat_function*/, NULL /*params*/,
contour, 1e-4, 1e-4);
contour, 1e-4, 1, 1e-4);
printf("Found %zd eigenvalues:\n", result->neig);
for (size_t i = 0; i < result->neig; ++i) {
complex double eig = result->eigval[i];

View File

@ -45,7 +45,7 @@ int main(int argc, char **argv) {
beyn_result_t *result =
beyn_solve(dim, L, M_function, NULL /*M_inv_Vhat_function*/, &p /*params*/,
contour, 1e-4, 1e-4);
contour, 1e-4, 1, 1e-4);
printf("Found %zd eigenvalues:\n", result->neig);
for (size_t i = 0; i < result->neig; ++i) {
complex double eig = result->eigval[i];

View File

@ -81,7 +81,7 @@ int main(int argc, char **argv) {
beyn_result_t *result =
beyn_solve(dim, L, M_function, NULL /*M_inv_Vhat_function*/, &p /*params*/,
contour, 1e-4, 1e-4);
contour, 1e-4, 1, 1e-4);
printf("Found %zd eigenvalues:\n", result->neig);
for (size_t i = 0; i < result->neig; ++i) {
complex double eig = result->eigval[i];

View File

@ -28,7 +28,7 @@ int main() {
beyn_result_gsl_t *result =
beyn_solve_gsl(dim, L, M_function, NULL /*M_inv_Vhat_function*/, NULL /*params*/,
contour, 1e-4, 1e-4);
contour, 1e-4, 1, 1e-4);
printf("Found %zd eigenvalues:\n", result->neig);
for (size_t i = 0; i < result->neig; ++i) {
gsl_complex eig = gsl_vector_complex_get(result->eigval, i);

View File

@ -114,7 +114,7 @@ int test_sphwave_translation(const qpms_trans_calculator *c, qpms_bessel_t wavet
for(qpms_y_t y2 = 0; y2 < nelem; ++y2){
qpms_m_t m2; qpms_l_t l2;
qpms_y2mn_p(y2, &m2, &l2);
if(qpms_trans_calculator_get_AB_p(c, &(A[y2]), &(B[y2]), m2, l2, m1, l1, ss, (w1s.r > ss.r) , wavetype))
if(qpms_trans_calculator_get_AB_p(c, &(A[y2]), &(B[y2]), m2, l2, m1, l1, sph2csph(ss), (w1s.r > ss.r) , wavetype))
abort();
}

View File

@ -106,7 +106,7 @@ int test_sphwave_translation(const qpms_trans_calculator *c, qpms_bessel_t wavet
complex double A_whole[nelem][nelem], B_whole[nelem][nelem];
if (qpms_trans_calculator_get_AB_arrays(c,(complex double *) A_whole, (complex double *) B_whole,
1, nelem, ss, (w1s.r > ss.r), wavetype)) abort();
1, nelem, sph2csph(ss), (w1s.r > ss.r), wavetype)) abort();
for(qpms_y_t y1 = 0; y1 < nelem; ++y1) { //index of the wave originating in o1 that will be reconstructed in o2