FNFT
Loading...
Searching...
No Matches
fnft_kdvv.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-2018, 2023.
18* Shrinivas Chimmalgi (TU Delft) 2019-2020.
19* Peter J Prins (TU Delft) 2020-2021.
20*/
21
29#ifndef FNFT_KDVV_H
30#define FNFT_KDVV_H
31
32#include "fnft__kdv_fscatter.h"
33#include "fnft__kdv_scatter.h"
34#include "fnft__misc.h" // for l2norm
35#include <string.h> // for memcpy
36#include <stdio.h>
37#include "fnft__errwarn.h"
39#include "fnft__poly_chirpz.h"
40
66typedef enum {
67 fnft_kdvv_bsloc_NEWTON,
68 fnft_kdvv_bsloc_GRIDSEARCH_AND_REFINE
70
82typedef enum {
83 fnft_kdvv_dstype_NORMING_CONSTANTS,
84 fnft_kdvv_dstype_RESIDUES,
85 fnft_kdvv_dstype_BOTH
87
104typedef enum {
105 fnft_kdvv_cstype_REFLECTION_COEFFICIENT,
106 fnft_kdvv_cstype_AB,
107 fnft_kdvv_cstype_BOTH
109
167typedef struct {
177
195
326FNFT_INT fnft_kdvv(const FNFT_UINT D, FNFT_COMPLEX const * const q,
327 FNFT_REAL const * const T, const FNFT_UINT M,
328 FNFT_COMPLEX * const contspec, FNFT_REAL const * const XI,
329 FNFT_UINT * const K_ptr, FNFT_COMPLEX * const bound_states,
330 FNFT_COMPLEX * const normconsts_or_residues, //const FNFT_INT kappa,
331 fnft_kdvv_opts_t *opts);
332
333
334#ifdef FNFT_ENABLE_SHORT_NAMES
335#define kdvv_bsloc_NEWTON fnft_kdvv_bsloc_NEWTON
336#define kdvv_bsloc_GRIDSEARCH_AND_REFINE fnft_kdvv_bsloc_GRIDSEARCH_AND_REFINE
337#define kdvv_dstype_NORMING_CONSTANTS fnft_kdvv_dstype_NORMING_CONSTANTS
338#define kdvv_dstype_RESIDUES fnft_kdvv_dstype_RESIDUES
339#define kdvv_dstype_BOTH fnft_kdvv_dstype_BOTH
340#define kdvv_cstype_REFLECTION_COEFFICIENT fnft_kdvv_cstype_REFLECTION_COEFFICIENT
341#define kdvv_cstype_AB fnft_kdvv_cstype_AB
342#define kdvv_cstype_BOTH fnft_kdvv_cstype_BOTH
343#endif
344
345#endif
Computes the polynomial approximation of the combined scattering matrix.
Slow forward scattering.
Miscellaneous functions used in the FNFT library.
Fast evaluation of polynomials using the Chirp Z-transform.
Fast root finding of polynomials.
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_kdvv_bsloc_t
Definition fnft_kdvv.h:66
fnft_kdvv_cstype_t
Definition fnft_kdvv.h:104
fnft_kdvv_dstype_t
Definition fnft_kdvv.h:82
fnft_kdvv_opts_t fnft_kdvv_default_opts()
Creates a new options variable for fnft_kdvv with default settings.
FNFT_INT fnft_kdvv(const FNFT_UINT D, FNFT_COMPLEX const *const q, FNFT_REAL const *const T, const FNFT_UINT M, FNFT_COMPLEX *const contspec, FNFT_REAL const *const XI, FNFT_UINT *const K_ptr, FNFT_COMPLEX *const bound_states, FNFT_COMPLEX *const normconsts_or_residues, fnft_kdvv_opts_t *opts)
Nonlinear Fourier transform for the Korteweg-de Vries equation with vanishing boundary conditions.
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
Stores additional options for the routine fnft_kdvv.
Definition fnft_kdvv.h:167
FNFT_INT normalization_flag
Definition fnft_kdvv.h:172
FNFT_REAL grid_spacing
Definition fnft_kdvv.h:175
fnft_kdvv_bsloc_t bound_state_localization
Definition fnft_kdvv.h:168
FNFT_UINT niter
Definition fnft_kdvv.h:169
fnft_kdvv_cstype_t contspec_type
Definition fnft_kdvv.h:171
fnft_kdvv_dstype_t discspec_type
Definition fnft_kdvv.h:170
fnft_kdv_discretization_t discretization
Definition fnft_kdvv.h:173
FNFT_UINT richardson_extrapolation_flag
Definition fnft_kdvv.h:174