alps_analyt Module

This module contains functions and subroutines for the hybrid analytical continuation.


Used by

  • module~~alps_analyt~~UsedByGraph module~alps_analyt alps_analyt proc~landau_integrate landau_integrate proc~landau_integrate->module~alps_analyt proc~landau_integrate_rel landau_integrate_rel proc~landau_integrate_rel->module~alps_analyt program~alps alps program~alps->module~alps_analyt

Functions

public function eval_fit(is, iperp, ppar_valC)

This function evaluates the fit to f0 at and the complex parallel momentum ppar_valC. It requires the fit parameters that will be determined by the subroutine determine_param_fit.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: is

Index of species for which eval_fit is executed.

integer, intent(in) :: iperp

Index of perpendicular momentum at which eval_fit is executed.

double complex, intent(in) :: ppar_valC

Complex parallel momentum at which eval_fit is executed.

Return Value doublecomplex

private function fit_function(is, n_params, params, pperp_val, ppar_val)

This function evaluates the fit to f0 at real pperp_val and complex ppar_val, provided that the one-dimensional fit-parameter array params is fed into the function. This is only used during the fitting. For the evaluation in ALPS, use eval_fit.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: is

Index of species for which eval_fit is executed.

integer, intent(in) :: n_params

Total number of fit parameters for a given species.

double precision, intent(in) :: params(n_params)

Array of fit parameters.

double precision, intent(in) :: pperp_val

Perpendicular momentum.

double complex, intent(in) :: ppar_val

Complex parallel momentum.

Return Value doublecomplex

public function fit_function_poly(is, iperp, ppar_val, n_poly, fit_coeffs)

This function evaluates the orthogonal polynomical fit to f0 at real pperp_val and complex ppar_val, with the one-dimensional polynomical coefficient array fit_coeffs is fed into the function. For the evaluation in ALPS, use eval_fit. kgk: should this be .gt. or .ge. ?

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: is

Index of species for which eval_fit is executed.

integer, intent(in) :: iperp

Index of perpendicular momentum at which fit_function_poly is executed.

double complex :: ppar_val

Complex parallel momentum.

integer :: n_poly

Maximum Polynomial Order

double precision, intent(in) :: fit_coeffs(0:n_poly)

Array of polynomial coefficients

Return Value doublecomplex

private function factorial(n)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n

Return Value integer


Subroutines

public subroutine determine_param_fit()

This is the fitting routine for the hybrid analytic continuation. It determines the full field param_fit.

Arguments

None

private subroutine determine_GLLS(is)

This subroutine evaluates the General Linear Least Squares fit to the distribution function for component 'is' using the selected polynomial basis functions.

Arguments

Type IntentOptional Attributes Name
integer :: is

Index of species.

public subroutine least_squares_fit(AA, BB, coeffs, npoly)

Solves General Linear Least Squares Normal Equation

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: AA(0:npar,0:npoly)

Polynomial Basis

double precision, intent(in) :: BB(0:npar)

f0(is,iperp,:)

double precision, intent(out) :: coeffs(0:npoly)

fit coefficients

integer :: npoly

Order for polyhedral representation

private subroutine set_polynomial_basis(is)

This subroutine evaluates the General Linear Least Squares fit to the distribution function for component 'is' using the selected polynomial basis functions.

Arguments

Type IntentOptional Attributes Name
integer :: is

Index of species.

private subroutine output_fit(qualitytotal)

This subroutine outputs the fit parameters for iperp=0 to stdout to monitor the fit.

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: qualitytotal

Quality of the total fit result.

private subroutine determine_JT(is, n_params, nJT, JT, params, iperp, upper_limit, ipparbar_lower)

This subroutine calculates the transposed Jacobian matrix of the fit function with respect to the fit parameter array.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: is

Index of species for which determine_JT is executed.

integer, intent(in) :: n_params

Total number of fit parameters for a given species.

integer, intent(in) :: nJT

First dimension of matrix JT.

double precision, intent(out) :: JT(nJT,0:upper_limit)

Transposed Jacobian matrix of the fit function.

double precision, intent(in) :: params(n_params)

Array of fit parameters.

integer, intent(in) :: iperp

Index of perpendicular momentum at which JT is evaluated.

integer, intent(in) :: upper_limit

Upper limit of iperp space (relativistic and non-relativistic).

integer, intent(in) :: ipparbar_lower

Lower index of parallel momentum (relativistic).

private subroutine LM_nonlinear_fit(is, g, n_params, nJT, params, param_mask, iperp, npar, ipparbar_lower, quality)

This subroutine processes the nonlinear Levenberg-Marquart algorithm and returns the one-dimensional array params at a given iperp. The variable quality is the sum of the squares of all residuals.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: is

Index of species for which LM_nonlinear_fit is executed.

double precision, intent(in) :: g(0:npar)

Array of function to be fitted.

integer, intent(in) :: n_params

Total number of fit parameters for a given species.

integer, intent(in) :: nJT

First dimension of matrix JT (see determine_JT).

double precision, intent(inout) :: params(n_params)

Array of fit parameters.

logical, intent(in) :: param_mask(n_params)

Bit mask for required fit parameters.

integer, intent(in) :: iperp

Index of perpendicular momentum.

integer, intent(in) :: npar

Number of steps in parallel momentum

integer, intent(in) :: ipparbar_lower

Lower index of parallel momentum (relativistic).

double precision, intent(out) :: quality

Quality of the individual fit result.