FNFT
fnft_nsev.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.
18 * Shrinivas Chimmalgi (TU Delft) 2019-2020.
19 */
20 
28 #ifndef FNFT_NSEV_H
29 #define FNFT_NSEV_H
30 
31 #include "fnft__nse_fscatter.h"
32 #include "fnft__nse_scatter.h"
33 #include "fnft__misc.h" // for l2norm
34 #include <string.h> // for memcpy
35 #include <stdio.h>
36 #include "fnft__errwarn.h"
38 #include "fnft__poly_chirpz.h"
39 
51 typedef enum {
52  fnft_nsev_bsfilt_NONE,
53  fnft_nsev_bsfilt_BASIC,
54  fnft_nsev_bsfilt_FULL
56 
91 typedef enum {
92  fnft_nsev_bsloc_FAST_EIGENVALUE,
93  fnft_nsev_bsloc_NEWTON,
94  fnft_nsev_bsloc_SUBSAMPLE_AND_REFINE
96 
108 typedef enum {
109  fnft_nsev_dstype_NORMING_CONSTANTS,
110  fnft_nsev_dstype_RESIDUES,
111  fnft_nsev_dstype_BOTH
113 
130 typedef enum {
131  fnft_nsev_cstype_REFLECTION_COEFFICIENT,
132  fnft_nsev_cstype_AB,
133  fnft_nsev_cstype_BOTH
135 
198 typedef struct {
209 
227 
242  fnft_nsev_opts_t const * const opts);
243 
372  FNFT_REAL const * const T, const FNFT_UINT M,
373  FNFT_COMPLEX * const contspec, FNFT_REAL const * const XI,
374  FNFT_UINT * const K_ptr, FNFT_COMPLEX * const bound_states,
375  FNFT_COMPLEX * const normconsts_or_residues, const FNFT_INT kappa,
376  fnft_nsev_opts_t *opts);
377 
378 
379 #ifdef FNFT_ENABLE_SHORT_NAMES
380 #define nsev_bsfilt_NONE fnft_nsev_bsfilt_NONE
381 #define nsev_bsfilt_BASIC fnft_nsev_bsfilt_BASIC
382 #define nsev_bsfilt_FULL fnft_nsev_bsfilt_FULL
383 #define nsev_bsloc_FAST_EIGENVALUE fnft_nsev_bsloc_FAST_EIGENVALUE
384 #define nsev_bsloc_NEWTON fnft_nsev_bsloc_NEWTON
385 #define nsev_bsloc_SUBSAMPLE_AND_REFINE fnft_nsev_bsloc_SUBSAMPLE_AND_REFINE
386 #define nsev_dstype_NORMING_CONSTANTS fnft_nsev_dstype_NORMING_CONSTANTS
387 #define nsev_dstype_RESIDUES fnft_nsev_dstype_RESIDUES
388 #define nsev_dstype_BOTH fnft_nsev_dstype_BOTH
389 #define nsev_cstype_REFLECTION_COEFFICIENT fnft_nsev_cstype_REFLECTION_COEFFICIENT
390 #define nsev_cstype_AB fnft_nsev_cstype_AB
391 #define nsev_cstype_BOTH fnft_nsev_cstype_BOTH
392 #endif
393 
394 #endif
FNFT_INT
int32_t FNFT_INT
Definition: fnft_numtypes.h:56
FNFT_UINT
size_t FNFT_UINT
Definition: fnft_numtypes.h:62
fnft_nsev_opts_t::bound_state_localization
fnft_nsev_bsloc_t bound_state_localization
Definition: fnft_nsev.h:200
fnft__nse_fscatter.h
Computes the polynomial approximation of the combined scattering matrix.
fnft_nsev_opts_t::discretization
fnft_nse_discretization_t discretization
Definition: fnft_nsev.h:206
fnft_nsev_opts_t::Dsub
FNFT_UINT Dsub
Definition: fnft_nsev.h:202
fnft_nsev_cstype_t
fnft_nsev_cstype_t
Definition: fnft_nsev.h:130
fnft_nse_discretization_t
fnft_nse_discretization_t
Enum that specifies discretizations and methods used to compute nonlinear Fourier transforms for the ...
Definition: fnft_nse_discretization_t.h:104
fnft__errwarn.h
fnft_nsev_dstype_t
fnft_nsev_dstype_t
Definition: fnft_nsev.h:108
fnft_nsev_opts_t::richardson_extrapolation_flag
FNFT_UINT richardson_extrapolation_flag
Definition: fnft_nsev.h:207
fnft_nsev_opts_t::bound_state_filtering
fnft_nsev_bsfilt_t bound_state_filtering
Definition: fnft_nsev.h:199
fnft__poly_chirpz.h
Fast evaluation of polynomials using the Chirp Z-transform.
fnft_nsev_bsfilt_t
fnft_nsev_bsfilt_t
Definition: fnft_nsev.h:51
fnft_nsev_opts_t::niter
FNFT_UINT niter
Definition: fnft_nsev.h:201
fnft_nsev_opts_t::discspec_type
fnft_nsev_dstype_t discspec_type
Definition: fnft_nsev.h:203
fnft__misc.h
Miscellaneous functions used in the FNFT library.
fnft_nsev_default_opts
fnft_nsev_opts_t fnft_nsev_default_opts()
Creates a new options variable for fnft_nsev with default settings.
fnft_nsev_bsloc_t
fnft_nsev_bsloc_t
Definition: fnft_nsev.h:91
fnft_nsev
FNFT_INT fnft_nsev(const FNFT_UINT D, FNFT_COMPLEX *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, const FNFT_INT kappa, fnft_nsev_opts_t *opts)
Nonlinear Fourier transform for the nonlinear Schroedinger equation with vanishing boundary condition...
fnft__poly_roots_fasteigen.h
Fast root finding of polynomials.
FNFT_COMPLEX
double complex FNFT_COMPLEX
Definition: fnft_numtypes.h:47
fnft_nsev_opts_t::contspec_type
fnft_nsev_cstype_t contspec_type
Definition: fnft_nsev.h:204
fnft_nsev_opts_t::normalization_flag
FNFT_INT normalization_flag
Definition: fnft_nsev.h:205
fnft_nsev_opts_t
Stores additional options for the routine fnft_nsev.
Definition: fnft_nsev.h:198
FNFT_REAL
double FNFT_REAL
Definition: fnft_numtypes.h:40
fnft_nsev_max_K
FNFT_UINT fnft_nsev_max_K(const FNFT_UINT D, fnft_nsev_opts_t const *const opts)
Returns the maximum number of bound states that can be detected by fnft_nsev.
fnft__nse_scatter.h
Slow forward scattering.