aboutsummaryrefslogtreecommitdiff
path: root/init.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-10-01 12:10:55 +0200
committerAnton Khirnov <anton@khirnov.net>2015-10-01 12:10:55 +0200
commitf0460fe03fff8c5c567756149e39ff25a7663b1c (patch)
treef5bc3a4d5925867482919ce8961fbcf0cdec9c10 /init.c
parent41f29cbf3076db51b96f240d27d432ef31b8aa71 (diff)
Prepare for radial basis.
Diffstat (limited to 'init.c')
-rw-r--r--init.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/init.c b/init.c
index 759088f..6ea45de 100644
--- a/init.c
+++ b/init.c
@@ -45,20 +45,13 @@ static int brill_init_check_options(BDContext *bd)
return -EINVAL;
}
- if (!bd->nb_coeffs_z)
- bd->nb_coeffs_z = bd->nb_coeffs_rho;
+ s->basis[0] = &bdi_sb_even_basis;
+ s->basis[1] = &bdi_sb_even_basis;
- s->basis = &bdi_sb_even_basis;
-
- s->nb_coeffs = bd->nb_coeffs_rho * bd->nb_coeffs_z;
-
- s->nb_colloc_points_rho = bd->nb_coeffs_rho + bd->overdet_rho;
- s->nb_colloc_points_z = bd->nb_coeffs_z + bd->overdet_z;
-
- s->nb_colloc_points = s->nb_colloc_points_rho * s->nb_colloc_points_z;
-
- s->colloc_grid_order_rho = s->nb_colloc_points_rho;
- s->colloc_grid_order_z = s->nb_colloc_points_z;
+ s->nb_colloc_points[0] = bd->nb_coeffs[0];
+ s->nb_colloc_points[1] = bd->nb_coeffs[1];
+ s->nb_coeffs[0] = bd->nb_coeffs[0];
+ s->nb_coeffs[1] = bd->nb_coeffs[1];
return 0;
}
@@ -82,7 +75,7 @@ int bd_solve(BDContext *bd)
return ret;
bd->psi_minus1_coeffs = s->coeffs;
- bd->stride = bd->nb_coeffs_rho;
+ bd->stride = s->nb_coeffs[0];
return 0;
}
@@ -98,11 +91,11 @@ BDContext *bd_context_alloc(void)
bd->amplitude = 1.0;
bd->eppley_n = 5;
- bd->nb_coeffs_rho = 80;
- bd->nb_coeffs_z = 0;
+ bd->nb_coeffs[0] = 80;
+ bd->nb_coeffs[1] = 80;
- bd->basis_scale_factor_rho = 3.0;
- bd->basis_scale_factor_z = 3.0;
+ bd->basis_scale_factor[0] = 3.0;
+ bd->basis_scale_factor[1] = 3.0;
bd->log_callback = bdi_log_default_callback;