FNFT
Loading...
Searching...
No Matches
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* Peter J Prins (TU Delft) 2020-2021.
20* Sander Wahls (KIT) 2023.
21*/
22
30#ifndef FNFT_NSEV_H
31#define FNFT_NSEV_H
32
33#include "fnft__nse_fscatter.h"
34#include "fnft__nse_scatter.h"
35#include "fnft__misc.h" // for l2norm
36#include <string.h> // for memcpy
37#include <stdio.h>
38#include "fnft__errwarn.h"
40#include "fnft__poly_chirpz.h"
41
55typedef enum {
56 fnft_nsev_bsfilt_NONE,
57 fnft_nsev_bsfilt_BASIC,
58 fnft_nsev_bsfilt_FULL,
59 fnft_nsev_bsfilt_MANUAL
61
95typedef enum {
96 fnft_nsev_bsloc_FAST_EIGENVALUE,
97 fnft_nsev_bsloc_NEWTON,
98 fnft_nsev_bsloc_SUBSAMPLE_AND_REFINE
100
112typedef enum {
113 fnft_nsev_dstype_NORMING_CONSTANTS,
114 fnft_nsev_dstype_RESIDUES,
115 fnft_nsev_dstype_BOTH
117
134typedef enum {
135 fnft_nsev_cstype_REFLECTION_COEFFICIENT,
136 fnft_nsev_cstype_AB,
137 fnft_nsev_cstype_BOTH
139
212typedef struct {
223 FNFT_REAL bounding_box[4];
225
245
260 fnft_nsev_opts_t const * const opts);
261
385FNFT_INT fnft_nsev(const FNFT_UINT D, FNFT_COMPLEX const * const q,
386 FNFT_REAL const * const T, const FNFT_UINT M,
387 FNFT_COMPLEX * const contspec, FNFT_REAL const * const XI,
388 FNFT_UINT * const K_ptr, FNFT_COMPLEX * const bound_states,
389 FNFT_COMPLEX * const normconsts_or_residues, const FNFT_INT kappa,
390 fnft_nsev_opts_t * opts);
391
392
393#ifdef FNFT_ENABLE_SHORT_NAMES
394#define nsev_bsfilt_NONE fnft_nsev_bsfilt_NONE
395#define nsev_bsfilt_BASIC fnft_nsev_bsfilt_BASIC
396#define nsev_bsfilt_FULL fnft_nsev_bsfilt_FULL
397#define nsev_bsfilt_MANUAL fnft_nsev_bsfilt_MANUAL
398#define nsev_bsloc_FAST_EIGENVALUE fnft_nsev_bsloc_FAST_EIGENVALUE
399#define nsev_bsloc_NEWTON fnft_nsev_bsloc_NEWTON
400#define nsev_bsloc_SUBSAMPLE_AND_REFINE fnft_nsev_bsloc_SUBSAMPLE_AND_REFINE
401#define nsev_dstype_NORMING_CONSTANTS fnft_nsev_dstype_NORMING_CONSTANTS
402#define nsev_dstype_RESIDUES fnft_nsev_dstype_RESIDUES
403#define nsev_dstype_BOTH fnft_nsev_dstype_BOTH
404#define nsev_cstype_REFLECTION_COEFFICIENT fnft_nsev_cstype_REFLECTION_COEFFICIENT
405#define nsev_cstype_AB fnft_nsev_cstype_AB
406#define nsev_cstype_BOTH fnft_nsev_cstype_BOTH
407#endif
408
409#endif
Miscellaneous functions used in the FNFT library.
Computes the polynomial approximation of the combined scattering matrix.
Slow forward scattering.
Fast evaluation of polynomials using the Chirp Z-transform.
Fast root finding of polynomials.
fnft_nsev_cstype_t
Definition fnft_nsev.h:134
fnft_nsev_bsloc_t
Definition fnft_nsev.h:95
fnft_nsev_bsfilt_t
Definition fnft_nsev.h:55
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_nsev_dstype_t
Definition fnft_nsev.h:112
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_INT fnft_nsev(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, const FNFT_INT kappa, fnft_nsev_opts_t *opts)
Nonlinear Fourier transform for the nonlinear Schroedinger equation with vanishing boundary condition...
fnft_nsev_opts_t fnft_nsev_default_opts()
Creates a new options variable for fnft_nsev with default settings.
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_nsev.
Definition fnft_nsev.h:212
fnft_nse_discretization_t discretization
Definition fnft_nsev.h:221
FNFT_REAL tol
Definition fnft_nsev.h:216
FNFT_UINT richardson_extrapolation_flag
Definition fnft_nsev.h:222
FNFT_UINT Dsub
Definition fnft_nsev.h:217
FNFT_INT normalization_flag
Definition fnft_nsev.h:220
FNFT_UINT niter
Definition fnft_nsev.h:215
fnft_nsev_bsfilt_t bound_state_filtering
Definition fnft_nsev.h:213
fnft_nsev_dstype_t discspec_type
Definition fnft_nsev.h:218
fnft_nsev_cstype_t contspec_type
Definition fnft_nsev.h:219
fnft_nsev_bsloc_t bound_state_localization
Definition fnft_nsev.h:214