FNFT
Functions
fnft__akns_discretization.h File Reference

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

#include "fnft__akns_discretization_t.h"
#include "fnft__errwarn.h"
Include dependency graph for fnft__akns_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__akns_discretization_degree (fnft__akns_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. More...
 
FNFT_REAL fnft__akns_discretization_boundary_coeff (fnft__akns_discretization_t discretization)
 This routine returns the boundary coefficient based on the discretization. More...
 
FNFT_INT fnft__akns_lambda_to_z (const FNFT_UINT n, const FNFT_REAL eps_t, FNFT_COMPLEX *const vals, fnft__akns_discretization_t discretization)
 This routine maps lambda from continuous-time domain to z in the discrete-time domain based on the discretization. More...
 
FNFT_INT fnft__akns_z_to_lambda (const FNFT_UINT n, const FNFT_REAL eps_t, FNFT_COMPLEX *const vals, fnft__akns_discretization_t discretization)
 This routine maps z from the discrete-time domain to lambda in the continuous-time domain based on the discretization. More...
 

Detailed Description

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

Function Documentation

◆ fnft__akns_discretization_boundary_coeff()

FNFT_REAL fnft__akns_discretization_boundary_coeff ( fnft__akns_discretization_t  discretization)

This routine returns the boundary coefficient based on the discretization.

The boundary coefficient is the fraction of the step size that a discretized potential extends beyond the last sample. This routine returns this value based on the discretization of type fnft__akns_discretization_t.

Parameters
[in]discretizationThe type of discretization to be used. Should be of type fnft__akns_discretization_t.
Returns
the boundary coefficient, or NAN for discretizations not supported by fnft__akns_fscatter.

◆ fnft__akns_discretization_degree()

FNFT_UINT fnft__akns_discretization_degree ( fnft__akns_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.

It defines the step size of the frequency grid \(z = \text{e}^{2*j*\xi*\epsilon_t/d}\) based on the discretization type.

Parameters
[in]discretizationThe type of discretization to be used. Should be of type fnft_kdv_discretization_t.
Returns
polynomial degree, or 0 for discretizations not supported by fnft__akns_fscatter.

◆ fnft__akns_lambda_to_z()

FNFT_INT fnft__akns_lambda_to_z ( const FNFT_UINT  n,
const FNFT_REAL  eps_t,
FNFT_COMPLEX *const  vals,
fnft__akns_discretization_t  discretization 
)

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

This routine maps continuous-time domain value lambda to discrete-time domain value z = exp(2i*lambda*eps_t/degree1step), where degree1step is based on the discretization of type fnft__akns_discretization_t.

Parameters
[in]nNumber of values to be mapped.
[in]eps_tReal-valued discretization step-size.
[in,out]valsPointer to location of first element of array containing complex-valued continuous-time domain spectral parameter lambda. The values are replaced with discrete-time domain values z.
[in]discretizationDiscretization of type fnft__akns_discretization_t.
Returns
FNFT_SUCCESS or one of the FNFT_EC_... error codes defined in fnft_errwarn.h.

◆ fnft__akns_z_to_lambda()

FNFT_INT fnft__akns_z_to_lambda ( const FNFT_UINT  n,
const FNFT_REAL  eps_t,
FNFT_COMPLEX *const  vals,
fnft__akns_discretization_t  discretization 
)

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

This routine maps discrete-time domain value z to continuous-time domain value lambda = degree1step*log(z)/(2i*eps_t), where degree1step is based on the discretization of type fnft__akns_discretization_t.

Parameters
[in]nNumber of values to be mapped.
[in]eps_tReal-valued discretization step-size.
[in,out]valsPointer to location of first element of array containing complex-valued discrete-time domain spectral parameter z. The values are replaced with continuous-time domain values lambda.
[in]discretizationDiscretization of type fnft__akns_discretization_t.
Returns
FNFT_SUCCESS or one of the FNFT_EC_... error codes defined in fnft_errwarn.h.