You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* - Prins and Wahls, <a href="https://doi.org/10.1109/ICASSP.2018.8461708">"Higher order exponential splittings for the fast non-linear Fourier transform of the KdV equation,"</a>in Proc.ICASSP 2018, Calgary, AB, 2018, pp. 4524-4528.
190
190
* - Mertsching, <a href="https://doi.org/10.1002/prop.2190350704">" Quasiperiodie Solutions of the Nonlinear Schrödinger Equation,"</a> Fortschr. Phys. 35:519-536, 1987.
191
191
*
192
-
* * The routine supports the following discretizations of type \link fnft_nse_discretization_t \endlink:
192
+
* The routine supports the following discretizations of type \link fnft_nse_discretization_t \endlink:
Copy file name to clipboardExpand all lines: src/fnft_nsep.c
+14-6Lines changed: 14 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,11 @@ INT fnft_nsep(const UINT D, COMPLEX const * const q,
92
92
COMPLEX*q_preprocessed=NULL;
93
93
94
94
// Check inputs
95
-
if (D<2||D%2==1)
95
+
// D (and Dsub in line 493) only need to be even to ensure that deg in line 279 and 537 are also even for all discretizations.
96
+
// deg is required to be even so that its use in lines 321, 355 and 587 make sense.
97
+
// Due to the periodic boundary conditions, Dsub has to be an even factor of D. For some choices like D=514, this means Dsub can only be 514 as D=514=2*257.
98
+
// This makes the idea of subsampling unintuitive. Hence at this stage D is restricted to powers of two for which subsampling still makes sense.
99
+
if (D<2|| (D& (D-1)) !=0 )
96
100
returnE_INVALID_ARGUMENT(D);
97
101
if (q==NULL)
98
102
returnE_INVALID_ARGUMENT(q);
@@ -483,19 +487,23 @@ static inline INT subsample_and_refine(const UINT D,
483
487
first_last_index, opts_ptr->discretization);
484
488
CHECK_RETCODE(ret_code, release_mem);
485
489
486
-
487
490
// Create a subsampled/resampled version of q for computing initial guesses.
488
491
Dsub=opts_ptr->Dsub;
489
492
if (Dsub==0) // users wants Dsub to be chosen automatically
490
-
Dsub=ROUND(SQRT(D*LOG2(D) *LOG2(D)));
491
-
nskip_per_step=ROUND((REAL)D / Dsub);
492
-
Dsub=ROUND((REAL)D / nskip_per_step); // actual Dsub
0 commit comments