FNFT
Loading...
Searching...
No Matches
fnft__kdv_discretization.h
Go to the documentation of this file.
1/*
2 * This file is part of FNFT.
3 *
4 * FNFT is free software; you can redistribute it and/or
5 * modify it under the terms of the version 2 of the GNU General
6 * Public License as published by the Free Software Foundation.
7 *
8 * FNFT is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Contributors:
17 * Sander Wahls (TU Delft) 2017.
18 * Shrinivas Chimmalgi (TU Delft) 2017-2020.
19 * Peter J Prins (TU Delft) 2020-2021.
20 */
21
30#ifndef FNFT__KDV_DISCRETIZATION_H
31#define FNFT__KDV_DISCRETIZATION_H
32
35#include "fnft__misc.h"
36
37
38
39
51 kdv_discretization);
52
68
84
100
101
118 fnft__akns_discretization_t * const akns_discretization);
119
120
141 FNFT_COMPLEX * const vals, fnft_kdv_discretization_t kdv_discretization);
142
163 FNFT_COMPLEX * const vals, fnft_kdv_discretization_t kdv_discretization);
164
183 FNFT_REAL * const phase_factor_rho, fnft_kdv_discretization_t kdv_discretization);
184
205 FNFT_REAL * const phase_factor_a, fnft_kdv_discretization_t kdv_discretization);
206
227 FNFT_REAL * const phase_factor_b, fnft_kdv_discretization_t kdv_discretization);
228
229
264 FNFT_REAL const eps_t, const FNFT_INT kappa,
265 FNFT_UINT * const Dsub_ptr, FNFT_COMPLEX **q_preprocessed_ptr, FNFT_COMPLEX **r_preprocessed_ptr,
266 FNFT_UINT * const first_last_index, fnft_kdv_discretization_t kdv_discretization);
267
268
290 FNFT_COMPLEX **eps_t_weights_ptr,
291 fnft_kdv_discretization_t const kdv_discretization);
292
302 FNFT_COMPLEX const xi,
303 FNFT_UINT const derivative_flag, // 0- > 2x2, 1->4x4
304 FNFT_REAL const eps_t,
305 fnft_kdv_discretization_t const kdv_discretization);
306
316 FNFT_COMPLEX const xi,
317 FNFT_UINT const derivative_flag, // 0- > 2x2, 1->4x4
318 FNFT_REAL const eps_t,
319 fnft_kdv_discretization_t const kdv_discretization);
320
327 fnft_kdv_discretization_t const kdv_discretization);
328
334
335#ifdef FNFT_ENABLE_SHORT_NAMES
336#define kdv_discretization_degree(...) fnft__kdv_discretization_degree(__VA_ARGS__)
337#define kdv_discretization_boundary_coeff(...) fnft__kdv_discretization_boundary_coeff(__VA_ARGS__)
338#define kdv_discretization_to_akns_discretization(...) fnft__kdv_discretization_to_akns_discretization(__VA_ARGS__)
339#define kdv_discretization_upsampling_factor(...) fnft__kdv_discretization_upsampling_factor(__VA_ARGS__)
340#define kdv_discretization_method_order(...) fnft__kdv_discretization_method_order(__VA_ARGS__)
341#define kdv_discretization_lambda_to_z(...) fnft__kdv_discretization_lambda_to_z(__VA_ARGS__)
342#define kdv_discretization_z_to_lambda(...) fnft__kdv_discretization_z_to_lambda(__VA_ARGS__)
343#define kdv_discretization_phase_factor_rho(...) fnft__kdv_discretization_phase_factor_rho(__VA_ARGS__)
344#define kdv_discretization_phase_factor_a(...) fnft__kdv_discretization_phase_factor_a(__VA_ARGS__)
345#define kdv_discretization_phase_factor_b(...) fnft__kdv_discretization_phase_factor_b(__VA_ARGS__)
346#define kdv_discretization_preprocess_signal(...) fnft__kdv_discretization_preprocess_signal(__VA_ARGS__)
347#define kdv_discretization_method_weights(...) fnft__kdv_discretization_method_weights(__VA_ARGS__)
348#define kdv_discretization_change_of_basis_matrix_to_S(...) fnft__kdv_discretization_change_of_basis_matrix_to_S(__VA_ARGS__)
349#define kdv_discretization_change_of_basis_matrix_from_S(...) fnft__kdv_discretization_change_of_basis_matrix_from_S(__VA_ARGS__)
350#define kdv_discretization_vanilla_flag(...) fnft__kdv_discretization_vanilla_flag(__VA_ARGS__)
351#define kdv_slow_discretization(...) fnft__kdv_slow_discretization (__VA_ARGS__))
352#endif
353
354#endif
Properties of the discretizations for the Korteweg-de Vries equation.
FNFT_INT fnft__kdv_discretization_change_of_basis_matrix_to_S(FNFT_COMPLEX *const T, FNFT_COMPLEX const xi, FNFT_UINT const derivative_flag, FNFT_REAL const eps_t, fnft_kdv_discretization_t const kdv_discretization)
This routine returns the change of basis matrix from the basis of the discretization to S.
FNFT_INT fnft__kdv_discretization_change_of_basis_matrix_from_S(FNFT_COMPLEX *const T, FNFT_COMPLEX const xi, FNFT_UINT const derivative_flag, FNFT_REAL const eps_t, fnft_kdv_discretization_t const kdv_discretization)
This routine returns the change of basis matrix from the S basis to the basis of the discretization.
FNFT_INT fnft__kdv_slow_discretization(fnft_kdv_discretization_t *const kdv_discretization_ptr)
This routine returns the slow discretization to use for the calculation of the discrete spectrum....
FNFT_INT fnft__kdv_discretization_vanilla_flag(FNFT_UINT *const vanilla_flag, fnft_kdv_discretization_t const kdv_discretization)
This routine tells for discretizations in AKNS basis whether they use r=-1 (vanilla) or q=-1 (not van...
Miscellaneous functions used in the FNFT library.
Lists discretizations for the Korteweg-de Vries equation.
fnft_kdv_discretization_t
Enum that specifies discretizations and methods used to compute nonlinear Fourier transforms for the ...
Definition fnft_kdv_discretization_t.h:116
fnft__akns_discretization_t
Enum that specifies discretizations used to compute nonlinear Fourier transforms of systems that fit ...
Definition fnft__akns_discretization_t.h:104
FNFT_INT fnft__kdv_discretization_phase_factor_b(const FNFT_REAL eps_t, const FNFT_UINT D, FNFT_REAL const *const T, FNFT_REAL *const phase_factor_b, fnft_kdv_discretization_t kdv_discretization)
This routine returns the phase factor for b coefficient. It is required for applying boundary conditi...
FNFT_INT fnft__kdv_discretization_preprocess_signal(const FNFT_UINT D, FNFT_COMPLEX const *const q, FNFT_REAL const eps_t, const FNFT_INT kappa, FNFT_UINT *const Dsub_ptr, FNFT_COMPLEX **q_preprocessed_ptr, FNFT_COMPLEX **r_preprocessed_ptr, FNFT_UINT *const first_last_index, fnft_kdv_discretization_t kdv_discretization)
This routine preprocesses the signal by resampling and subsampling based on the discretization....
FNFT_INT fnft__kdv_discretization_method_weights(FNFT_COMPLEX **qr_weights_ptr, FNFT_COMPLEX **eps_t_weights_ptr, fnft_kdv_discretization_t const kdv_discretization)
This routine computes various weights required by some methods based on the discretization.
FNFT_UINT fnft__kdv_discretization_method_order(fnft_kdv_discretization_t kdv_discretization)
This routine returns the order of the method based on the discretization.
FNFT_INT fnft__kdv_discretization_to_akns_discretization(fnft_kdv_discretization_t kdv_discretization, fnft__akns_discretization_t *const akns_discretization)
This routine returns akns discretization related to the given kdv discretization.
FNFT_INT fnft__kdv_discretization_phase_factor_a(const FNFT_REAL eps_t, const FNFT_UINT D, FNFT_REAL const *const T, FNFT_REAL *const phase_factor_a, fnft_kdv_discretization_t kdv_discretization)
This routine returns the phase factor for a coefficient. It is required for applying boundary conditi...
FNFT_REAL fnft__kdv_discretization_boundary_coeff(fnft_kdv_discretization_t kdv_discretization)
This routine returns the boundary coefficient based on the discretization.
FNFT_INT fnft__kdv_discretization_z_to_lambda(const FNFT_UINT n, const FNFT_REAL eps_t, FNFT_COMPLEX *const vals, fnft_kdv_discretization_t kdv_discretization)
This routine maps from the discrete-time domain to in the continuous-time domain based on the discr...
FNFT_UINT fnft__kdv_discretization_degree(fnft_kdv_discretization_t kdv_discretization)
This routine returns the max degree of the polynomials in a single scattering matrix or zero if the ...
FNFT_INT fnft__kdv_discretization_lambda_to_z(const FNFT_UINT n, const FNFT_REAL eps_t, FNFT_COMPLEX *const vals, fnft_kdv_discretization_t kdv_discretization)
This routine maps from continuous-time domain to in the discrete-time domain based on the discretiz...
FNFT_UINT fnft__kdv_discretization_upsampling_factor(fnft_kdv_discretization_t kdv_discretization)
This routine returns the scaling for effective number of samples based on the discretization.
FNFT_INT fnft__kdv_discretization_phase_factor_rho(const FNFT_REAL eps_t, const FNFT_REAL T1, FNFT_REAL *const phase_factor_rho, fnft_kdv_discretization_t kdv_discretization)
This routine returns the phase factor for reflection coefficient ( ). It is required for applying bou...
size_t FNFT_UINT
Definition fnft_numtypes.h:62
double complex FNFT_COMPLEX
Definition fnft_numtypes.h:47
int32_t FNFT_INT
Definition fnft_numtypes.h:56
double FNFT_REAL
Definition fnft_numtypes.h:40