# Procedures

ProcedureLocationProcedure TypeDescription
alps_erroralps_ioSubroutine

Error catching subroutine.

alps_error_initalps_ioSubroutine

Open a file for the error log.

besselIalps_nhdsFunction

Calculates the modified Bessel function of argument x and order n.

BESSIalps_nhdsFunction

Function to calculate the first kind modified Bessel function of integer order N for any real X.

BESSI0generate_distribution.f90Function

This function calculates the modified Bessel function of the first kind of order zero for any positive real argument x.

BESSI0alps_nhdsFunction

Auxiliary Bessel functions for N=0, N=1

BESSI1generate_distribution.f90Function

This function calculates the modified Bessel function of the first kind of order one for any positive real argument x.

BESSI1alps_nhdsFunction

Modified Bessel function of order 1.

BESSJalps_fns_relFunction

This function calculates the first kind Bessel function of integer order N, for any REAL X. We use here the classical recursion formula, when X > N. For X < N, Miller's algorithm is used to avoid overflows. Reference: C.W.Clenshaw, Chebyshev Series for Mathematical Functions, Mathematical Tables, Vol. 5, 1962.

BESSJ0alps_fns_relFunction

This function calculates the first kind Bessel function of order 0, for any REAL X. The polynomial approximation by series of Chebyshev polynomials is used for 0<X<8 and 0<8/X<1. References: M.Abramowitz, I.A.Stegun, Handbook of Mathematical Functions, 1965. C.W.Clenshaw, Chebyshev Series for Mathematical Functions, Mathematical Tables, Vol. 5, 1962.

BESSJ1alps_fns_relFunction

This subroutine calculates the First Kind Bessel Function of order 1, for any real number X. The polynomial approximation by series of Chebyshev polynomials is used for 0<X<8 and 0<8/X<1. References: M.Abramowitz, I.A.Stegun, Handbook of Mathematical Functions, 1965. C.W.Clenshaw, Chebyshev Series for Mathematical Functions, Mathematical Tables, Vol. 5, 1962.

BESSKgenerate_distribution.f90Function

This function calculates the modified Bessel function of the third kind of integer order N, for any REAL X. The classical recursion formula is used. Reference: C.W.Clenshaw, Chebyshev Series for Mathematical Functions, Mathematical Tables, Vol. 5, 1962.

BESSK0generate_distribution.f90Function

This function calculates the modified Bessel function of the third kind of order zero for any positive real argument x.

BESSK1generate_distribution.f90Function

This function calculates the modified Bessel function of the third kind of order zero for any positive real argument x.

calc_chialps_nhdsSubroutine

Subroutine that calculates the susceptibility of species j based on NHDS.

calc_eigenalps_fnsSubroutine

This subroutine calculates the relative electric and magnetic field amplitudes, the relative fluctuations in the density and velocity of all species, and the heating rates of the given solution. It is based on the calc_eigen routine by Greg Howes and Kris Klein.

calc_ypsilonalps_nhdsSubroutine

Calculates the Y-tensor according to Stix for a bi-Maxwelling, using the NHDS calculation.

CBESSJalps_fns_relSubroutine

This subroutine calculates the complex Bessel function. It is based on the CBESSJ function release 1.1 by J-P Moreau, Paris (www.jpmoreau.fr).

derivative_f0alps_fnsSubroutine

This subroutine calculates the perpendicular and parallel derivatives of the background velocity distribution function f0.

derivative_f0_relalps_fns_relSubroutine

This subroutine calculates the derivatives of the background velocity distribution function f0 for the relativistic calculation.

determine_bessel_arrayalps_fnsSubroutine

This subroutine determines the array of Bessel functions that is used in the T-tensor of Eq. (2.10) of the code paper.

determine_JTalps_analytSubroutine

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

determine_nmaxalps_fnsSubroutine

This subroutine determines the maximum required order of the Bessel functions in Eq. (2.9) of the code paper.

determine_param_fitalps_analytSubroutine

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

determine_resonancesalps_fnsSubroutine

This subroutine determines whether any kinetic resonances are located in the integration domain.

determine_sproc_relalps_fns_relSubroutine

This subroutine determines sproc_rel for the given process.

dispalps_fnsFunction

This function returns the determinant of the dispersion tensor for a given frequency om.

dispfunctalps_nhdsFunction

Calculates the dispersion function based on the complex error function.

display_creditsalps_ioSubroutine

Writes the opening credits.

distribution_analytalps_distribution_analytFunction

This function returns the pre-defined function as f0.

eval_fitalps_analytFunction

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.

Factalps_fns_relFunction

This function returns the factorial k! of its argument k.

find_minimaalps_fnsSubroutine

This subroutine identifies the minima of the coarse map grid. It is called by map_search. The code is based on a routine by Greg Howes, 2006.

fit_functionalps_analytFunction

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.

Reads in fit parameters for component is.

full_integratealps_fnsFunction

This function returns the full integral expression according to Eq. (2.9) in the code paper.

funct_galps_fnsFunction

This function returns the function $g$ from Eq. (3.2) of the code paper.

funct_g_relalps_fns_relFunction

This function returns the function $g$ from Eq. (3.2) of the code paper for a relativistic calculation.

Gammaalps_fns_relFunction

This function returns the Gamma-function.

get_indexed_double_namelist_unitalps_ioSubroutine

A version of get_indexed_namelist_unit, extended to allow for double indexing in order to read in multiple fits for a single species.

get_indexed_namelist_unitalps_ioSubroutine

Determines unused I/O unit.

get_indexed_namelist_unitgenerate_distributionSubroutine

Determines unused I/O unit.

get_runnamealps_ioSubroutine

Get runname for output files from input argument.

get_runnameinterpolateSubroutine

Get runname for output files from input argument.

get_runnamegenerate_distributionSubroutine

Get runname for output files from input argument.

get_unused_unitalps_ioSubroutine

Determine unused number for I/O index.

get_unused_unitinterpolateSubroutine

This subroutine returns an available unit number. It is taken from the AstroGK code.

get_unused_unitgenerate_distributionSubroutine

Determine unused number for I/O index.

init_paramalps_ioSubroutine

Read in system parameters from *.in file. Only processor 0 calls this routine:

input_unitalps_ioFunction

Assigns input unit for namelist opening.

input_unitinterpolateFunction

This function returns a unit number for a namelist. It is taken from the AstroGK code.

input_unitgenerate_distributionFunction

Assigns input unit for namelist opening.

input_unit_existalps_ioFunction

Determine if a particular namelist already opened.

input_unit_existinterpolateFunction

This function checks whether a unit number exists. It is taken from the AstroGK code.

input_unit_existgenerate_distributionFunction

Determine if a particular namelist already opened.

int_eealps_fnsFunction

This function returns the ee term in Eq. (2.9).

int_ee_relalps_fns_relFunction

This function returns the ee term in Eq. (2.9) for the relativistic calculation.

int_Talps_fnsFunction

This function returns the T-tensor according to Eq. (2.10) of the code paper.

int_T_relalps_fns_relFunction

This function returns the T-tensor according to Eq. (2.10) of the code paper for the relativistic calculation.

int_T_resalps_fnsFunction

This function returns the T-tensor according to Eq. (2.10) of the code paper for the case in which it is evaluated at the complex resonance momentum.

int_T_res_relalps_fns_relFunction

This function returns the T-tensor according to Eq. (2.10) of the code paper for the case in which it is evaluated at the complex resonance momentum for the relativistic calculation.

integratealps_fnsFunction

This function performs the integral in Eq. (2.9) of the code paper, but without accounting for the Landau contour integral. It is called by full_integrate.

integrate_resalps_fnsFunction

This function performs the integration near resonances as described in Section 3.1 of the code paper. It is only called if resonances are present in or near the integration domain.

integrate_res_relalps_fns_relFunction

This function performs the integration near resonances as described in Section 3.1 of the code paper for a relativistic calculation. It is only called if resonances are present in or near the integration domain.

integrate_resU_relalps_fns_relFunction

This function evaluates the integral with the integrand proportional to $U$ in Eq. (2.9) of the code paper for a relativistic calculation.

isnancheckalps_ioFunction

Checks if double precision number input is NaN.

landau_integratealps_fnsFunction

This function evaluates the Landau contour according to Eqs. (3.8) and (3.9) of the code paper.

landau_integrate_relalps_fns_relFunction

This function evaluates the Landau contour according to Eqs. (3.8) and (3.9) of the code paper for a relativistic calculation.

LM_nonlinear_fitalps_analytSubroutine

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.

Reads in complex frequency map parameters.

map_searchalps_fnsSubroutine

This subroutine calculates the map of the determinant of the dispersion tensor in complex frequency space.

normalizeinterpolation.f90Subroutine

This subroutine normalises the fine interpolation grid.

om_double_scanalps_fnsSubroutine

This subroutine scans along a prescribed plane in wavevector space to map out $\omega$ in this space. It is required that n_scan=2.

om_scanalps_fnsSubroutine

This subroutine scans solutions along a single prescribed path in wavevector space.

output_fitalps_analytSubroutine

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

output_timealps_ioSubroutine

Outputs the date and time in a given format using intrinsic FORTRAN function.

pass_distributionalps_comSubroutine

Passes distribution functions and associated parameters.

pass_instructionsalps_comSubroutine

Passes information between processes.

polyharmonic_splineinterpolation.f90Subroutine

This soubroutine interpolates the grid with a polyharmonic thin-plate spline. This subroutine needs the LUPACK and BLAS libraries to evoke the dgesv subroutine. The method uses the Thin Plate Spline. We use these resources: http://cseweb.ucsd.edu/~sjb/eccv_tps.pdf http://www.univie.ac.at/nuhag-php/bibtex/open_files/po94_M%20J%20D%20Powell%2003%2093.pdf http://vision.ucsd.edu/sites/default/files/fulltext(4).pdf

polyharmonic_splinealps_fns_relSubroutine

This soubroutine interpolates the grid with a polyharmonic thin-plate spline. This subroutine needs the LUPACK and BLAS libraries to evoke the dgesv subroutine. The method uses the Thin Plate Spline. We use these resources: http://cseweb.ucsd.edu/~sjb/eccv_tps.pdf http://www.univie.ac.at/nuhag-php/bibtex/open_files/po94_M%20J%20D%20Powell%2003%2093.pdf http://vision.ucsd.edu/sites/default/files/fulltext(4).pdf

principal_integral_relalps_fns_relFunction

This function performs the integration near resonances as described in Section 3.1 of the code paper for a relativistic calculation. It is only called if resonances are present in or near the integration domain.

Subroutine for reading in background distribution function

This subroutine reads in system parameters input file (namelist) as argument after executable: ./interpolate input.in

This subroutine reads in the parameters for the generation of distribution functions for ALPS.

refine_guessalps_fnsSubroutine

This subroutine refines the guess at the starting point of the search for solutions to the dispersion relation when scanning. It is also used by map_search to identify the roots on the map.

resUalps_fnsFunction

This function evaluates the term proportional to $U$ in Eq. (2.9) of the code paper.

resU_relalps_fns_relFunction

This function evaluates the term proportional to $U$ in Eq. (2.9) of the code paper for the relativistic calculation.

The most important subroutine. Reads in wavevector scan parameters. Defines scanner, which controls the behavior of the wavevector scan.

secantalps_fnsSubroutine

This subroutine applies the secant method to find the roots of the dispersion tensor.

Reads in initial guesses for dispersion solutions.

Subroutine for reading in species parameters