Utility modules
Converters
Description
Module for converting numerical values to strings
Quick access
- Routines
bool2int()
,int_to_string2()
,int_to_string3()
,int_to_string4()
,real_to_string()
,real_to_string3()
Subroutines and functions
- function converters/real_to_string(numb)
- Parameters
numb [real,in]
- Return
string [real]
- Called from
- function converters/real_to_string3(numb)
- Parameters
numb [real,in]
- Return
string [real]
- Called from
- function converters/int_to_string2(numb)
- Parameters
numb [integer,in]
- Return
string [real]
- Called from
- function converters/int_to_string3(numb)
- Parameters
numb [integer,in]
- Return
string [real]
- function converters/int_to_string4(numb)
- Parameters
numb [integer,in]
- Return
string [real]
- Called from
- function converters/bool2int(boo)
- Parameters
boo [logical,in]
- Return
int_out [integer]
Savitzki-Golay filter
Description
Fortran module with Savitzki-Golay filter to remove high-frequency noise from data The module is optimized for a case in which many arrays need to be smoothed with the same filter. It is intended for smoothing noisy virial masses dependencies: lapack
Quick access
- Variables
coeff_array
,coeff_matrix
,deriv
,half_window
,order
,rhs_array
,window_size
- Routines
compute_savgol_coeff()
,fact()
,pad_data()
,savgol_alloc()
,savgol_filter()
,savgol_free()
,set_params()
,set_up_lin_eqs()
Needed modules
utility
: General purpose utility functions
Variables
- filter_module/coeff_array (*) [real,private/allocatable/save]
- filter_module/coeff_matrix (*,*) [real,private/allocatable/save]
- filter_module/deriv [integer,private/save]
- filter_module/half_window [integer,private/save]
- filter_module/order [integer,private/save]
- filter_module/rhs_array (*,*) [real,private/allocatable/save]
- filter_module/window_size [integer,private/save]
Subroutines and functions
- subroutine filter_module/compute_savgol_coeff(window_size_in, order_in, deriv_in)
- Parameters
window_size_in [integer,in]
order_in [integer,in]
deriv_in [integer,in]
- Called from
- Call to
assert()
,set_params()
,savgol_free()
,savgol_alloc()
,set_up_lin_eqs()
,fact()
- subroutine filter_module/savgol_filter(y, ylen, y_out)
- Parameters
y (ylen) [real,in]
y_out (ylen) [real,out]
- Options
ylen [integer,in,optional/default=len(y)]
- Called from
- Call to
- subroutine filter_module/pad_data(y, ylen, half_window_pass, y_padded)
- Parameters
y (ylen) [real,in]
half_window_pass [integer,in]
y_padded (ylen+half_window_pass-(-half_window_pass+1)+1) [real,out]
- Options
ylen [integer,in,optional/default=len(y)]
- Called from
- subroutine filter_module/savgol_alloc()
- Called from
- subroutine filter_module/savgol_free()
- Called from
- subroutine filter_module/set_params(window_size_in, order_in, deriv_in)
- Parameters
window_size_in [integer,in]
order_in [integer,in]
deriv_in [integer,in]
- Called from
- subroutine filter_module/set_up_lin_eqs()
- Called from
- function filter_module/fact(n)
- Parameters
n [integer,in]
- Return
fact [integer]
- Called from
- Call to
Utility
Description
General purpose utility functions
Quick access
- Variables
- Routines
assert()
,i_realloc_1d()
,mem_report()
,print_bar()
,r_realloc_1d()
,r_realloc_2d()
Needed modules
input_files
: List of input filesnumerical_parameters
(stdout()
)ifport
Variables
- utility/current_cpu_time [real]
- utility/getpid [intrinsic]
- utility/iunit_list (16) [integer]
list of file IDs
- utility/start_cpu_time [real]
Subroutines and functions
- subroutine utility/mem_report()
- Called from
- subroutine utility/assert(test_passed, message)
- Parameters
test_passed [logical,in]
message [character,in]
- Called from
metalpoor()
,get_element_info()
,sf_step()
,kroupa_p_func()
,kroupa_m_func()
,massprobabilityimf()
,compute_savgol_coeff()
,savgol_filter()
,fact()
- subroutine utility/r_realloc_1d(a, n_new)
- Parameters
a (*) [real,inout,allocatable]
n_new [integer,in]
- subroutine utility/i_realloc_1d(a, n_new)
- Parameters
a (*) [integer,inout,allocatable]
n_new [integer,in]
- subroutine utility/r_realloc_2d(a, n1_new, n2_new)
- Parameters
a (,) [real,inout,allocatable]
n1_new [integer,in]
n2_new [integer,in]
- subroutine utility/print_bar(prog, msg[, complete])
- Parameters
prog [real]
msg [character,in]
complete [logical]
- Called from
Virial radius
Quick access
- Routines
Needed modules
Subroutines and functions
- function virial_radius/rvir(mhalo, z)
- Parameters
mhalo [real,in]
z [real,in]
- Return
r [real]
- Called from
- function virial_radius/rvir_mpc(mhalo, z)
- Parameters
mhalo [real,in] :: halo mass
z [real,in] :: redshift
- Return
r [real]
- Called from
r_ion_ad()
,sf_step()
,outputs_satellites()
,write_files_reali()
- Call to
Check flags
Description
Module to check whether the flags defined and undefined in asloth.h are an ok combination
Quick access
- Routines
Subroutines and functions
Random number generator
Description
This is an object oriented version of the ran3 algorithm from numerical recipes Before using a rng type object it needs to be initialized by calling rng%init(seed) where seed is an integer seed Afterwards rng%get_ran() will return a random real in the range [0,1)
Quick access
Types
- type random_object/rng
- Type fields
% iff [integer]
% inext [integer]
% inextp [integer]
% ma (55) [integer]
% mj [integer]
Variables
- random_object/rng_seed [integer]
Subroutines and functions
- subroutine random_object/init(this, idum)
initializes the RNG
- Parameters
this [real]
idum [integer,in]
- function random_object/get_ran(this)
Retuns uniformly distributed random numbers in the range [0,1)
- Parameters
this [real]
- Return
get_ran [real]
- Called from
split()
,statistical_feedback()
,dz_external()
,dz_internal()
,poisson()
,get_fracs()
- function random_object/poisson(this, mu)
Returns poisson distributed random numbers. Works only for small numbers (mu < 10)
- Parameters
this [real]
mu [real,in] :: parameter of the poisson distribution
- Return
poisson [integer]
- Called from
- Call to