struct my_f_params {int a; int b;};
gsl_function F1;
struct my_f_params alpha = {2,2};
F1.function = &f1;
F1.params = & alpha;
struct my_f_params * params = (struct my_f_params *)p;
int n = (params->a);
int m = (params->b);
----------
double params[] = { y, z };
F.params = params;
double y = ((double *)params)[0];
double z = *((double *)p+1);
Interested in particle astrophysics and plasma astrophysics. This blog is my research/private notebook.
Thursday, August 1, 2024
pass parameters in GSL integration
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment