FNFT
Loading...
Searching...
No Matches
Functions
fnft__kdv_discretization.h File Reference

Properties of the discretizations for the Korteweg-de Vries equation. More...

#include "fnft_kdv_discretization_t.h"
#include "fnft__akns_discretization.h"
#include "fnft__misc.h"
Include dependency graph for fnft__kdv_discretization.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

FNFT_UINT fnft__kdv_discretization_degree (fnft_kdv_discretization_t kdv_discretization)
 This routine returns the max degree \(d\) of the polynomials in a single scattering matrix or zero if the discretization is unknown.
 
FNFT_REAL fnft__kdv_discretization_boundary_coeff (fnft_kdv_discretization_t kdv_discretization)
 This routine returns the boundary coefficient based on the discretization.
 
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_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_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 \(\lambda\) from continuous-time domain to \(z\) in the discrete-time domain 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 \(z\) from the discrete-time domain to \(\lambda\) in the continuous-time domain 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 ( \(\rho\)). It is required for applying boundary conditions to the transfer_matrix based on the 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 conditions to the transfer_matrix based on the discretization.
 
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 conditions to the transfer_matrix based on the discretization.
 
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. The preprocessing is necessary for higher-order methods.
 
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_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_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 vanilla).
 
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. The returned discritization has the same error order and shares the same preprocessing of the potential.
 

Detailed Description

Properties of the discretizations for the Korteweg-de Vries equation.

Function Documentation

◆ fnft__kdv_discretization_change_of_basis_matrix_from_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.

Parameters
[out]T2x2 or 4x4 matrix. Left multiplication of a vector in the S basis of the discretization by T changes it to the equivalent vector in the basis of the discretization.
[in]xispectral parameter \( \xi \).
[in]derivative_flagWhen 0, T is 2x2. When 1 T is 4x4, to include the derivatives.
[in]eps_tReal-valued discretization step-size.
[in]kdv_discretizationDiscretization of type fnft_kdv_discretization_t.

◆ fnft__kdv_discretization_change_of_basis_matrix_to_S()

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.

Parameters
[out]T2x2 or 4x4 matrix. Left multiplication of a vector in the basis of the discretization by T changes it to the equivalent vector in S basis.
[in]xispectral parameter \( \xi \).
[in]derivative_flagWhen 0, T is 2x2. When 1 T is 4x4, to include the derivatives.
[in]eps_tReal-valued discretization step-size.
[in]kdv_discretizationDiscretization of type fnft_kdv_discretization_t.

◆ fnft__kdv_discretization_vanilla_flag()

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 vanilla).

Parameters
[out]vanilla_flag1 for vanilla, 0 for not vanilla.
[in]kdv_discretizationDiscretization of type fnft_kdv_discretization_t that uses the AKNS basis.

◆ fnft__kdv_slow_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. The returned discritization has the same error order and shares the same preprocessing of the potential.

Parameters
[in,out]kdv_discretization_ptrPointer to a discretization of type fnft_kdv_discretization_t.