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

Properties of the discretization for the Manakov equation. More...

#include "fnft_manakov_discretization_t.h"
#include "fnft__errwarn.h"
#include "fnft__misc.h"
Include dependency graph for fnft__manakov_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__manakov_discretization_degree (fnft_manakov_discretization_t discretization)
 This routine returns the max degree d of the polynomials in a single scattering matrix or zero if the discretization is unknown.
 
FNFT_UINT fnft__manakov_discretization_upsampling_factor (fnft_manakov_discretization_t discretization)
 This routine returns the scaling for effective number of samples based on the discretization. Returns 0 for unknown discretization.
 
FNFT_UINT fnft__manakov_discretization_method_order (fnft_manakov_discretization_t discretization)
 Returns the order of the chosen discretization method. 0 for unknown discretizations.
 
FNFT_INT fnft__manakov_discretization_lambda_to_z (const FNFT_UINT n, const FNFT_REAL eps_t, FNFT_COMPLEX *const vals, fnft_manakov_discretization_t discretization)
 This routine maps lambda from continuous-time domain to z in the discrete-time domain based on the discretization.
 
FNFT_INT fnft__manakov_discretization_z_to_lambda (const FNFT_UINT n, const FNFT_REAL eps_t, FNFT_COMPLEX *const vals, fnft_manakov_discretization_t discretization)
 This routine maps z in the discrete-time domain to lambda in continuous-time domain based on the discretization.
 
FNFT_INT fnft__manakov_discretization_phase_factor_rho (const FNFT_REAL eps_t, const FNFT_REAL T1, FNFT_REAL *const phase_factor_rho, fnft_manakov_discretization_t discretization)
 This routine returns the phase factor for reflection coefficient (rho). It is required for applying boundary conditions to the transfer matrix values based on the discretization.
 
FNFT_INT fnft__manakov_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_manakov_discretization_t discretization)
 This routine returns the phase factor for the NFT coefficient a. It is required for applying boundary conditions to the transfer matrix values based on the discretization.
 
FNFT_INT fnft__manakov_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_manakov_discretization_t discretization)
 This routine returns the phase factor for the NFT coefficient b1, b2. It is required for applying boundary conditions to the transfer matrix values based on the discretization.
 
FNFT_INT fnft__manakov_discretization_preprocess_signal (const FNFT_UINT D, FNFT_COMPLEX const *const q1, FNFT_COMPLEX const *const q2, FNFT_REAL const eps_t, FNFT_UINT *const Dsub_ptr, FNFT_COMPLEX **q1_preprocessed_ptr, FNFT_COMPLEX **q2_preprocessed_ptr, FNFT_UINT *const first_last_index, manakov_discretization_t discretization)
 This routine computes the downsampled and interpolated version of the samples if required.
 
FNFT_REAL fnft__manakov_discretization_boundary_coeff (fnft_manakov_discretization_t discretization)
 This routine returns the boundary coefficient based on the discretization.
 

Detailed Description

Properties of the discretization for the Manakov equation.

Function Documentation

◆ fnft__manakov_discretization_boundary_coeff()

FNFT_REAL fnft__manakov_discretization_boundary_coeff ( fnft_manakov_discretization_t  discretization)

This routine returns the boundary coefficient based on the discretization.

Parameters
[in]discretizationdiscretization Should be of type fnft_manakov_discretization_t
Returns
the boundary coefficient

◆ fnft__manakov_discretization_degree()

FNFT_UINT fnft__manakov_discretization_degree ( fnft_manakov_discretization_t  discretization)

This routine returns the max degree d of the polynomials in a single scattering matrix or zero if the discretization is unknown.

Parameters
[in]discretizationdiscretization Should be of type fnft_manakov_discretization_t
Returns
polynomial degree, or 0 for unknown discretizations

◆ fnft__manakov_discretization_lambda_to_z()

FNFT_INT fnft__manakov_discretization_lambda_to_z ( const FNFT_UINT  n,
const FNFT_REAL  eps_t,
FNFT_COMPLEX *const  vals,
fnft_manakov_discretization_t  discretization 
)

This routine maps lambda from continuous-time domain to z in the discrete-time domain based on the discretization.

Parameters
[in]nLength of array vals (number of \(\lambda\) 's)
[in]eps_ttimestep size
[in,out]valsPointer to first element of array of size n. Upon entry, this array contains the continuous-time values \(\lambda\). Upon exit, the array contains the corresponding discrete-time values \(z\).
[in]discretizationdiscretization Should be of type fnft_manakov_discretization_t
Returns
FNFT_SUCCESS or one of the FNFT_EC_... error codes defined in fnft_errwarn.h.

◆ fnft__manakov_discretization_method_order()

FNFT_UINT fnft__manakov_discretization_method_order ( fnft_manakov_discretization_t  discretization)

Returns the order of the chosen discretization method. 0 for unknown discretizations.

Parameters
[in]discretizationdiscretization Should be of type fnft_manakov_discretization_t
Returns
order of the chosen discretization method

◆ fnft__manakov_discretization_phase_factor_a()

FNFT_INT fnft__manakov_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_manakov_discretization_t  discretization 
)

This routine returns the phase factor for the NFT coefficient a. It is required for applying boundary conditions to the transfer matrix values based on the discretization.

Parameters
[in]eps_ttimestep size
[in]Deffective number of samples
[in]Treal array containing the time t of the first and last sample T=[T[0] T[1]]
[in,out]phase_factor_apointer to real-valued variable where the computed phase factor is will be stored
[in]discretizationdiscretization Should be of type fnft_manakov_discretization_t
Returns
FNFT_SUCCESS or the FNFT__E_INVALID_ARGUMENT(discretization) code

◆ fnft__manakov_discretization_phase_factor_b()

FNFT_INT fnft__manakov_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_manakov_discretization_t  discretization 
)

This routine returns the phase factor for the NFT coefficient b1, b2. It is required for applying boundary conditions to the transfer matrix values based on the discretization.

Parameters
[in]eps_ttimestep size
[in]Deffective number of samples
[in]Treal array containing the time t of the first and last sample T=[T[0] T[1]]
[in,out]phase_factor_bpointer to real-valued variable where the computed phase factor is will be stored
[in]discretizationdiscretization Should be of type fnft_manakov_discretization_t
Returns
FNFT_SUCCESS or the FNFT__E_INVALID_ARGUMENT(discretization) code

◆ fnft__manakov_discretization_phase_factor_rho()

FNFT_INT fnft__manakov_discretization_phase_factor_rho ( const FNFT_REAL  eps_t,
const FNFT_REAL  T1,
FNFT_REAL *const  phase_factor_rho,
fnft_manakov_discretization_t  discretization 
)

This routine returns the phase factor for reflection coefficient (rho). It is required for applying boundary conditions to the transfer matrix values based on the discretization.

Parameters
[in]eps_ttimestep size
[in]T1time at the last timestep
[in,out]phase_factor_rhopointer to real-valued variable where the computed phase factor is will be stored
[in]discretizationdiscretization Should be of type fnft_manakov_discretization_t
Returns
FNFT_SUCCESS or the FNFT__E_INVALID_ARGUMENT(discretization) code

◆ fnft__manakov_discretization_preprocess_signal()

FNFT_INT fnft__manakov_discretization_preprocess_signal ( const FNFT_UINT  D,
FNFT_COMPLEX const *const  q1,
FNFT_COMPLEX const *const  q2,
FNFT_REAL const  eps_t,
FNFT_UINT *const  Dsub_ptr,
FNFT_COMPLEX **  q1_preprocessed_ptr,
FNFT_COMPLEX **  q2_preprocessed_ptr,
FNFT_UINT *const  first_last_index,
manakov_discretization_t  discretization 
)

This routine computes the downsampled and interpolated version of the samples if required.

For richardson extrapolation downsampling is needed. This simply means only using a certain number from the original samples. Not all choices for the number od samples are valid as at this stage the samples should still be equidistant and no interpolation is carried out. If the chosen number of samples for downsampling is not valid, the routine chooses a number as close as possible to the desired amount of samples. Certain discretization types from fnft_manakov_discretization_t require non-equidistant samples. In that case, band-limited Fourier interpolation is used after the optional downsampling to get the required samples. Both the downsampling and interpolation step are combined in this function, resulting in a preprocessed array of samples to be used by the other functions in fnft_manakovv

Parameters
[in]Dthe original number of samples
[in]q1Pointer to complex array of size D containg the samples of the first element of the potential q1
[in]q2Pointer to complex array of size D containg the samples of the second element of the potential q2
[in]eps_ttimestep size
[in,out]Dsub_ptrPointer to the desired number of samples after subsampling. Upon exit, this contains the actual number of samples after subsampling which ensures that the samples stay equidistant
[out]q1_preprocessed_ptrPointer to a complex array of size Dsub*upsampling_factor containing the optionally downsampled and interpolated (if the discretization required interpolation) samples of q1
[out]q2_preprocessed_ptrPointer to a complex array of size Dsub*upsampling_factor containing the optionally downsampled and interpolated (if the discretization required interpolation) samples of q2
[out]first_last_indexPointer to an integer array containing the index of the first and last index from the original samples used in the preprocessed arrays
[in]discretizationdiscretization Should be of type fnft_manakov_discretization_t
Returns
FNFT_SUCCESS or one of the FNFT_EC_... error codes defined in fnft_errwarn.h.

◆ fnft__manakov_discretization_upsampling_factor()

FNFT_UINT fnft__manakov_discretization_upsampling_factor ( fnft_manakov_discretization_t  discretization)

This routine returns the scaling for effective number of samples based on the discretization. Returns 0 for unknown discretization.

Parameters
[in]discretizationdiscretization Should be of type fnft_manakov_discretization_t
Returns
upsampling factor. Factor with which to multiply the number of samples to get the effective number of samples for the method

◆ fnft__manakov_discretization_z_to_lambda()

FNFT_INT fnft__manakov_discretization_z_to_lambda ( const FNFT_UINT  n,
const FNFT_REAL  eps_t,
FNFT_COMPLEX *const  vals,
fnft_manakov_discretization_t  discretization 
)

This routine maps z in the discrete-time domain to lambda in continuous-time domain based on the discretization.

Parameters
[in]nLength of array vals (number of z)
[in]eps_ttimestep size
[in,out]valsPointer to first element of array of size n. Upon entry, this array contains the discrete-time values z. Upon exit, the array contains the corresponding continuous-time values \(\lambda\).
[in]discretizationdiscretization Should be of type fnft_manakov_discretization_t
Returns
FNFT_SUCCESS or one of the FNFT_EC_... error codes defined in fnft_errwarn.h.