diff --git a/src/simsopt/field/tracing.py b/src/simsopt/field/tracing.py index aece5acae..c46e1498e 100644 --- a/src/simsopt/field/tracing.py +++ b/src/simsopt/field/tracing.py @@ -316,7 +316,7 @@ def trace_particles_boozer(field: BoozerMagneticField, stz_inits: RealArray, res_ty, res_zeta_hit = sopp.particle_guiding_center_boozer_tracing( field, stz_inits[i, :], m, charge, speed_total[i], speed_par[i], tmax, vacuum=(mode == 'gc_vac'), - noK=(mode == 'gc_nok'), zetas=zetas, omegas=omegas, vpars=vpars, stopping_criteria=stopping_criteria, dt_save=dt_save, + noK=(mode == 'gc_nok'), zetas=zetas, omegas=omegas, stopping_criteria=stopping_criteria, dt_save=dt_save, vpars=vpars, **options) if not forget_exact_path: res_tys.append(np.asarray(res_ty)) diff --git a/src/simsoptpp/python_tracing.cpp b/src/simsoptpp/python_tracing.cpp index fc3c44250..fb7c4debf 100644 --- a/src/simsoptpp/python_tracing.cpp +++ b/src/simsoptpp/python_tracing.cpp @@ -46,12 +46,12 @@ void init_tracing(py::module_ &m){ py::arg("omegas")=vector{}, py::arg("stopping_criteria")=vector>{}, py::arg("dt_save")=1e-6, - py::arg("forget_exact_path")=false, - py::arg("axis")=0, - py::arg("predictor_step")=true, + py::arg("vpars")=vector{}, py::arg("zetas_stop")=false, py::arg("vpars_stop")=false, - py::arg("vpars")=vector{} + py::arg("forget_exact_path")=false, + py::arg("axis")=0, + py::arg("predictor_step")=true ); m.def("particle_guiding_center_boozer_perturbed_tracing", &particle_guiding_center_boozer_perturbed_tracing, diff --git a/src/simsoptpp/tracing.cpp b/src/simsoptpp/tracing.cpp index 1ec25d2af..557d3e525 100644 --- a/src/simsoptpp/tracing.cpp +++ b/src/simsoptpp/tracing.cpp @@ -1201,15 +1201,14 @@ particle_guiding_center_boozer_tracing( shared_ptr> field, array stz_init, double m, double q, double vtotal, double vtang, double tmax, double dt, double abstol, double reltol, double roottol, bool vacuum, bool noK, bool solveSympl, vector zetas, vector omegas, - vector> stopping_criteria, double dt_save, bool forget_exact_path, int axis, bool predictor_step, - bool zetas_stop, bool vpars_stop, vector vpars) + vector> stopping_criteria, double dt_save, vector vpars, + bool zetas_stop, bool vpars_stop, bool forget_exact_path, int axis, bool predictor_step) { typename BoozerMagneticField::Tensor2 stz({{stz_init[0], stz_init[1], stz_init[2]}}); field->set_points(stz); double modB = field->modB()(0); double vperp2 = vtotal*vtotal - vtang*vtang; double mu = vperp2/(2*modB); - array y; double G0 = std::abs(field->G()(0)); @@ -1273,6 +1272,9 @@ particle_guiding_center_boozer_perturbed_tracing( double omega, int Phim, int Phin, double phase, bool forget_exact_path, int axis, vector vpars); template -tuple>, vector>> -particle_guiding_center_boozer_tracing( - shared_ptr> field, array stz_init, double m, double q, double vtotal, double vtang, double tmax, double dt, double abstol, double reltol, double roottol, bool vacuum, bool noK, bool solveSympl, vector zetas, vector omegas, vector> stopping_criteria, double dt_save, bool forget_exact_path, int axis, bool predictor_step, bool zetas_stop, bool vpars_stop, vector vpars); \ No newline at end of file +tuple>, vector>> particle_guiding_center_boozer_tracing( + shared_ptr> field, array stz_init, + double m, double q, double vtotal, double vtang, double tmax, double dt, double abstol, double reltol, double roottol, + bool vacuum, bool noK, bool solveSympl, vector zetas, vector omegas, + vector> stopping_criteria, double dt_save, + vector vpars, bool zetas_stop, bool vpars_stop, bool forget_exact_path, int axis, bool predictor_step); \ No newline at end of file diff --git a/src/simsoptpp/tracing.h b/src/simsoptpp/tracing.h index e51ba972e..068ab639b 100644 --- a/src/simsoptpp/tracing.h +++ b/src/simsoptpp/tracing.h @@ -114,12 +114,10 @@ particle_guiding_center_boozer_perturbed_tracing( double alphahat=0, double omega=0, int alpham=0, int alphan=0, double phase=0, bool forget_exact_path=false, int axis=0, vector vpars={}); - template class T> - tuple>, vector>> - particle_guiding_center_boozer_tracing( - shared_ptr> field, array stz_init, +template class T> +tuple>, vector>> +particle_guiding_center_boozer_tracing( + shared_ptr> field, array stz_init, double m, double q, double vtotal, double vtang, double tmax, double dt, double abstol, double reltol, double roottol, - bool vacuum, bool noK, bool solveSympl, vector zetas, vector omegas, vector> stopping_criteria, double dt_save = 1e-6, - bool forget_exact_path=false, int axis=0, bool predictor_step=true, - bool zetas_stop=false, bool vpars_stop=false, vector vpars={}); - + bool vacuum, bool noK, bool solveSympl, vector zetas, vector omegas, + vector> stopping_criteria, double dt_save, vector vpars, bool zetas_stop=false, bool vpars_stop=false, bool forget_exact_path=false, int axis=0, bool predictor_step=true);