11#include "acb_types.h"
22#include "acb_poly.h"
33#include "acb_mat.h"
4- #include "acb_holonomic .h"
4+ #include "acb_ode .h"
55#include "gr.h"
66#include "gr_poly.h"
77
88
99void
10- _acb_holonomic_sum_swap_mat_ordinary (
10+ _acb_ode_sum_swap_mat_ordinary (
1111 acb_mat_t mat ,
12- const acb_holonomic_sum_context_struct * ctx , slong s )
12+ const acb_ode_sum_context_struct * ctx , slong s )
1313{
1414 for (slong j = 0 ; j < ctx -> nsols ; j ++ )
1515 {
@@ -30,11 +30,11 @@ _acb_holonomic_sum_swap_mat_ordinary(
3030void
3131ordinary (void )
3232{
33- acb_holonomic_sum_context_t ctx ;
33+ acb_ode_sum_context_t ctx ;
3434
3535 /* (x^2 + 1)*Dx^3 + 7*x
3636 * = (x^2 + 1)*Tx^3 + (-3*x^2 - 3)*Tx^2 + (2*x^2 + 2)*Tx + 7*x^4 */
37- acb_holonomic_sum_context_init (ctx , 4 , 2 , 3 , 3 );
37+ acb_ode_sum_context_init (ctx , 4 , 2 , 3 , 3 );
3838 acb_poly_set_coeff_si (ctx -> dop + 3 , 2 , 1 );
3939 acb_poly_set_coeff_si (ctx -> dop + 3 , 0 , 1 );
4040 acb_poly_set_coeff_si (ctx -> dop + 2 , 2 , -3 );
@@ -43,10 +43,10 @@ ordinary(void)
4343 acb_poly_set_coeff_si (ctx -> dop + 1 , 0 , 2 );
4444 acb_poly_set_coeff_si (ctx -> dop + 0 , 4 , 7 );
4545
46- /* ctx->flags |= ACB_HOLONOMIC_WANT_SERIES ; */
46+ /* ctx->flags |= acb_ode_WANT_SERIES ; */
4747
48- acb_holonomic_sum_ordinary (ctx );
49- acb_holonomic_sum_canonical_basis (ctx );
48+ acb_ode_sum_ordinary (ctx );
49+ acb_ode_sum_canonical_basis (ctx );
5050
5151 acb_set_d_d (ctx -> pts , 0.25 , 0.25 );
5252 acb_set_si (ctx -> pts + 1 , 0 );
@@ -55,86 +55,86 @@ ordinary(void)
5555 ctx -> prec = 64 ;
5656 ctx -> sums_prec = 64 ;
5757
58- acb_holonomic_sum_divconquer (ctx , 20 );
58+ acb_ode_sum_divconquer (ctx , 20 );
5959
6060 acb_mat_t mat ;
6161 acb_mat_init (mat , ctx -> nder , ctx -> nsols );
6262
6363 for (slong i = 0 ; i < ctx -> npts ; i ++ )
6464 {
65- _acb_holonomic_sum_swap_mat_ordinary (mat , ctx , i );
65+ _acb_ode_sum_swap_mat_ordinary (mat , ctx , i );
6666 acb_mat_printd (mat , 8 );
6767 /* flint_printf("%{acb_mat}\n\n", mat); */
6868 }
6969
70- acb_holonomic_sum_context_clear (ctx );
70+ acb_ode_sum_context_clear (ctx );
7171 acb_mat_clear (mat );
7272}
7373
7474
7575void
7676series (void )
7777{
78- acb_holonomic_sum_context_t ctx ;
78+ acb_ode_sum_context_t ctx ;
7979
80- acb_holonomic_sum_context_init (ctx , 2 , 0 , 1 , 1 );
80+ acb_ode_sum_context_init (ctx , 2 , 0 , 1 , 1 );
8181 acb_poly_set_coeff_si (ctx -> dop + 1 , 0 , 1 );
8282 acb_poly_set_coeff_si (ctx -> dop + 0 , 1 , -1 );
8383
84- acb_holonomic_sum_ordinary (ctx );
85- acb_holonomic_sum_canonical_basis (ctx );
84+ acb_ode_sum_ordinary (ctx );
85+ acb_ode_sum_canonical_basis (ctx );
8686 ctx -> prec = 64 ;
87- ctx -> flags |= ACB_HOLONOMIC_WANT_SERIES ;
87+ ctx -> flags |= acb_ode_WANT_SERIES ;
8888
8989 slong len = 5 ;
90- acb_holonomic_sum_divconquer (ctx , len );
90+ acb_ode_sum_divconquer (ctx , len );
9191 /* Clear the high part reserved for the residual. (In this special case, the
9292 * high part is zero because block_length = 1.) */
9393 acb_poly_truncate (ctx -> sol [0 ].series , len );
9494
9595 flint_printf ("%{acb_poly}\n" , ctx -> sol [0 ].series );
9696
97- acb_holonomic_sum_context_clear (ctx );
97+ acb_ode_sum_context_clear (ctx );
9898}
9999
100100
101101void
102102bessel_j0 (void )
103103{
104- acb_holonomic_sum_context_t ctx ;
104+ acb_ode_sum_context_t ctx ;
105105
106106 slong dop_order = 2 ;
107- acb_holonomic_sum_context_init (ctx , dop_order + 1 , 1 , dop_order , dop_order );
107+ acb_ode_sum_context_init (ctx , dop_order + 1 , 1 , dop_order , dop_order );
108108 acb_poly_set_coeff_si (ctx -> dop + 2 , 0 , 1 );
109109 acb_poly_set_coeff_si (ctx -> dop + 0 , 2 , 1 );
110110
111111 ctx -> sing_shifts [0 ].n = 0 ;
112112 ctx -> sing_shifts [0 ].mult = 2 ;
113113
114- acb_holonomic_sum_canonical_basis (ctx );
114+ acb_ode_sum_canonical_basis (ctx );
115115
116116 acb_set_d (ctx -> pts , 0.25 );
117117
118118 ctx -> prec = 64 ;
119119 ctx -> sums_prec = 64 ;
120120
121- acb_holonomic_sum_divconquer (ctx , 10 );
121+ acb_ode_sum_divconquer (ctx , 10 );
122122
123123 for (slong m = 0 ; m < ctx -> nsols ; m ++ )
124124 {
125- acb_holonomic_sol_struct * sol = ctx -> sol + m ;
125+ acb_ode_sol_struct * sol = ctx -> sol + m ;
126126 /* series in x */
127127 flint_printf ("f%wd =" , m );
128128 for (slong k = 0 ; k < sol -> nlogs ; k ++ )
129129 {
130130 flint_printf (" + (%{acb_poly})*log(%{acb} + x)^%wd/%wd" ,
131- acb_holonomic_sol_sum_ptr (sol , 0 , k ),
131+ acb_ode_sol_sum_ptr (sol , 0 , k ),
132132 ctx -> pts , k , k );
133133 }
134134 flint_printf ("\n" );
135135 }
136136
137- acb_holonomic_sum_context_clear (ctx );
137+ acb_ode_sum_context_clear (ctx );
138138}
139139
140140
@@ -149,7 +149,7 @@ whittaker_m(void) /* non-integer exponent, no logs */
149149 acb_init (half );
150150 acb_poly_init (val );
151151
152- acb_holonomic_sum_context_t ctx ;
152+ acb_ode_sum_context_t ctx ;
153153
154154 acb_set_si (kappa , 2 );
155155 acb_set_si (mu2 , 3 );
@@ -159,7 +159,7 @@ whittaker_m(void) /* non-integer exponent, no logs */
159159 slong dop_order = 2 ;
160160 slong len = dop_order ;
161161
162- acb_holonomic_sum_context_init (ctx , dop_order + 1 , 1 , 1 , len );
162+ acb_ode_sum_context_init (ctx , dop_order + 1 , 1 , 1 , len );
163163
164164 acb_poly_set_coeff_si (ctx -> dop + 2 , 0 , 4 );
165165 acb_poly_set_coeff_si (ctx -> dop + 1 , 0 , -4 );
@@ -174,26 +174,26 @@ whittaker_m(void) /* non-integer exponent, no logs */
174174 ctx -> sing_shifts [0 ].n = 0 ;
175175 ctx -> sing_shifts [0 ].mult = 1 ;
176176
177- acb_holonomic_sum_canonical_basis (ctx );
177+ acb_ode_sum_canonical_basis (ctx );
178178
179179 acb_set_d (ctx -> pts , 1.4242 );
180180
181181 ctx -> prec = prec ;
182182 ctx -> sums_prec = prec ;
183183
184- acb_holonomic_sum_divconquer (ctx , prec );
184+ acb_ode_sum_divconquer (ctx , prec );
185185
186- acb_poly_struct * f = acb_holonomic_sol_sum_ptr (ctx -> sol , 0 , 0 );
186+ acb_poly_struct * f = acb_ode_sol_sum_ptr (ctx -> sol , 0 , 0 );
187187
188188 flint_printf ("(%{acb} + x)^(%{acb}) * (%{acb_poly})\n" ,
189189 ctx -> pts , ctx -> expo , f );
190190
191- _acb_holonomic_sol_value (val , ctx -> expo , f , ctx -> sol [0 ].nlogs , ctx -> pts ,
192- ctx -> nder , 1 , ctx -> prec );
191+ _acb_ode_sol_value (val , ctx -> expo , f , ctx -> sol [0 ].nlogs , ctx -> pts ,
192+ ctx -> nder , 1 , ctx -> prec );
193193
194194 flint_printf ("M(%{acb} + x) = %{acb_poly} + O(x^%wd)\n" , ctx -> pts , val , len );
195195
196- acb_holonomic_sum_context_clear (ctx );
196+ acb_ode_sum_context_clear (ctx );
197197 acb_clear (kappa );
198198 acb_clear (mu2 );
199199 acb_clear (half );
@@ -203,7 +203,7 @@ whittaker_m(void) /* non-integer exponent, no logs */
203203
204204void
205205fundamental_matrix (const char * dop_str ,
206- const acb_holonomic_exponents_struct * expos ,
206+ const acb_ode_exponents_struct * expos ,
207207 double pt_d )
208208{
209209 gr_ctx_t CC , Pol , Dop ;
@@ -234,7 +234,7 @@ fundamental_matrix(const char * dop_str,
234234 acb_init (pt );
235235 acb_set_d (pt , pt_d );
236236
237- acb_holonomic_fundamental_matrix (mat , dop , Dop , expos , pt , 1 , 0 , 8 , prec );
237+ acb_ode_fundamental_matrix (mat , dop , Dop , expos , pt , 1 , 0 , 8 , prec );
238238
239239 flint_printf ("%{acb_mat}\n" , mat );
240240
@@ -250,11 +250,11 @@ fundamental_matrix(const char * dop_str,
250250void
251251apery (void )
252252{
253- acb_holonomic_shift_struct shift [1 ] = {{ .n = 0 , .mult = 3 }};
254- acb_holonomic_group_struct grp [1 ] = {{ .nshifts = 1 , .shifts = shift }};
253+ acb_ode_shift_struct shift [1 ] = {{ .n = 0 , .mult = 3 }};
254+ acb_ode_group_struct grp [1 ] = {{ .nshifts = 1 , .shifts = shift }};
255255 acb_init (grp -> expo );
256256 acb_zero (grp -> expo );
257- acb_holonomic_exponents_struct expos [1 ] = {{ .len = 1 , .grps = grp }};
257+ acb_ode_exponents_struct expos [1 ] = {{ .len = 1 , .grps = grp }};
258258
259259 fundamental_matrix (
260260 "(z^2 - 34*z + 1)*Tz^3 + (3*z^2 - 51*z)*Tz^2 + (3*z^2 - 27*z)*Tz + z^2 - 5*z" ,
@@ -271,15 +271,15 @@ multiple_shifts(void)
271271 /* const char * dop = "Tz^4 - 4*Tz^3 + 3*Tz^2 - z"; */
272272 const char * dop = "Tz^6 - 6*Tz^5 + 12*Tz^4 - 10*Tz^3 + 3*Tz^2 + z^2" ;
273273
274- acb_holonomic_shift_struct shift [3 ] = {
274+ acb_ode_shift_struct shift [3 ] = {
275275 { .n = 0 , .mult = 2 },
276276 { .n = 1 , .mult = 3 },
277277 { .n = 3 , .mult = 1 },
278278 };
279- acb_holonomic_group_struct grp [1 ] = {{ .nshifts = 3 , .shifts = shift }};
279+ acb_ode_group_struct grp [1 ] = {{ .nshifts = 3 , .shifts = shift }};
280280 acb_init (grp -> expo );
281281 acb_zero (grp -> expo );
282- acb_holonomic_exponents_struct expos [1 ] = {{ .len = 1 , .grps = grp }};
282+ acb_ode_exponents_struct expos [1 ] = {{ .len = 1 , .grps = grp }};
283283
284284 fundamental_matrix (dop , expos , 2. );
285285
0 commit comments