EIRAM
atomic and molecular data in form of polynomial fits
|
Data Types | |
type | eiram_data |
Data for one reaction. More... | |
Functions/Subroutines | |
subroutine, public | eiram_load (filePath, fileName, err) |
Initialization of the module from input files (data sets) More... | |
subroutine, public | eiram_deallocate (err) |
Deallocate dynamic arrays used by this module. More... | |
integer function, public | eiram_get_id (fileName, reactionType, reactionIndex, err) |
Return the ID-index of the given reaction in the arrays of the module. More... | |
subroutine, public | eiram_get_order (N, M, Id, err) |
Return order of the polynomial for both variables. More... | |
subroutine, public | eiram_create_image (data, err) |
Create a copy (image) of the reactions array stored in the module. More... | |
real(eiram_dp) function, public | eiram_calc1_fast (Id, lnX) |
Calculate single polynomial fit: scalar version W/O CHECKS. More... | |
subroutine, public | eiram_calc1 (Y, Id, lnX, err) |
Calculate single polynomial fit. More... | |
subroutine, public | eiram_calc12 (B, Id, lnX, err) |
Reduce double polynomial fit to single polynomials for given values of the second variable. More... | |
subroutine, public | eiram_calc2 (Y, Id, LnX1, LnX2, err) |
Calculate double polynomial fit. More... | |
Variables | |
integer, parameter, public | eiram_dp = SELECTED_REAL_KIND(13) |
Kind parameter for real numbers. More... | |
integer, public | eiram_unit = 6 |
Unit to which messages are written. More... | |
integer, parameter | units_length =32 |
Length of the string with units. More... | |
integer, parameter | quantity_length =64 |
Length of the string with description of a quantity. More... | |
integer, parameter | reaction_length =128 |
Length of the string with the reaction equation. More... | |
integer, parameter | description_length =256 |
Length of the string with description of the process. More... | |
integer, parameter, public | eiram_file_name_length = 32 |
Length of the string with a name of an input file. More... | |
integer, parameter, public | eiram_type_length = 8 |
Length of the string with reactiontype. More... | |
integer, parameter, public | eiram_index_length = 16 |
Length of the string with reaction index. More... | |
integer, parameter | max_line_length = 256 |
Maximum length of a line read from an file. More... | |
logical, parameter | debug = .false. |
external, public | eiram_fit |
integer, public | eiram_nreact =0 |
current number of loaded reactions More... | |
type(eiram_data), dimension(:), allocatable | reactions |
Array of reactions. More... | |
subroutine, public eiram::eiram_load | ( | character(*), intent(in) | filePath, |
character(*), intent(in) | fileName, | ||
integer, intent(out) | err | ||
) |
Initialization of the module from input files (data sets)
This subroutine reads data from the files HYDHEL, AMJUEL etc. The subroutine can be called more than once - in this case the data loaded on the previous calls are appended
Error code 310 is returned if requested input file is not found
[in] | filepath | Full path to the input file (w/o its name) |
[in] | filename | Name of the input file |
[out] | err | Error code |
number of read data sets
upper bound for number of data sets
Definition at line 206 of file eiram.f90.
References debug, eiram_nreact, eiram_unit, max_line_length, and reactions.
Referenced by eiram_load_wrapper(), eiram_test::eiram_test_calc12(), eiram_test::eiram_test_calculation(), eiram_test::eiram_test_image(), eiram_test::eiram_test_load(), eiram_test::eiram_test_unknown_reaction(), eiram_test::eiram_test_wrong_file(), eiram_test::eiram_test_wrong_ids(), eiram_test::eiram_test_wrong_size(), eiram_test::eiram_test_wrong_type(), initallfiles(), and mexfunction().
subroutine, public eiram::eiram_deallocate | ( | integer, intent(out) | err | ) |
Deallocate dynamic arrays used by this module.
[out] | err | Error code |
Definition at line 585 of file eiram.f90.
References debug, eiram_nreact, eiram_unit, and reactions.
Referenced by eiram_cgi(), eiram_deallocate_wrapper(), eiram_test::eiram_test_calc12(), eiram_test::eiram_test_calculation(), eiram_test::eiram_test_image(), eiram_test::eiram_test_load(), eiram_test::eiram_test_unknown_reaction(), eiram_test::eiram_test_used_uninitialized(), eiram_test::eiram_test_wrong_file(), eiram_test::eiram_test_wrong_ids(), eiram_test::eiram_test_wrong_size(), eiram_test::eiram_test_wrong_type(), mexfunction(), and sendavailablereactions().
integer function, public eiram::eiram_get_id | ( | character(*), intent(in) | fileName, |
character(*), intent(in) | reactionType, | ||
character(*), intent(in) | reactionIndex, | ||
integer, intent(out) | err | ||
) |
Return the ID-index of the given reaction in the arrays of the module.
This Id must be used then in eiram_calc
[in] | filename | Name of the input file (dat set): HYDHEL, AMJUEl etc. |
[in] | reactiontype | Type of the reaction: H.1, H.2 etc. |
[in] | reactionindex | Index of the reaction: 2.1.5 etc. |
[out] | err | Error code |
Definition at line 857 of file eiram.f90.
References eiram_unit, and reactions.
Referenced by eiram_get_id_wrapper(), eiram_matlab_calc1(), eiram_matlab_calc2(), eiram_test::eiram_test_calc12(), eiram_test::eiram_test_calculation(), eiram_test::eiram_test_unknown_reaction(), eiram_test::eiram_test_used_uninitialized(), eiram_test::eiram_test_wrong_size(), and eiram_test::eiram_test_wrong_type().
subroutine, public eiram::eiram_get_order | ( | integer, intent(out) | N, |
integer, intent(out) | M, | ||
integer, intent(in) | Id, | ||
integer, intent(out) | err | ||
) |
Return order of the polynomial for both variables.
[out] | n | Order of polynomial for X1 |
[out] | m | Order of polynomial for X2 |
[in] | id | Index of the reaction (returned by eiram_getId) |
[out] | err | Error code |
Definition at line 895 of file eiram.f90.
References eiram_unit, and reactions.
Referenced by eiram_get_order_wrapper(), eiram_test::eiram_test_calc12(), and eiram_test::eiram_test_used_uninitialized().
subroutine, public eiram::eiram_create_image | ( | type(eiram_data), dimension(:), allocatable | data, |
integer, intent(out) | err | ||
) |
Create a copy (image) of the reactions array stored in the module.
WARNING: array data which is already allocated will be overwritten. In case of error (err /= 0) not allocated array is returned
data | Resulting image of the module | |
[out] | err | Error code |
Definition at line 931 of file eiram.f90.
References eiram_unit, and reactions.
Referenced by eiram_test::eiram_test_image(), eiram_test::eiram_test_used_uninitialized(), and sendavailablereactions().
real(eiram_dp) function, public eiram::eiram_calc1_fast | ( | integer, intent(in) | Id, |
real(eiram_dp), intent(in) | lnX | ||
) |
Calculate single polynomial fit: scalar version W/O CHECKS.
This function is intended for calculation of cross-sections during a Monte-Carlo particle tracing
[in] | id | ID of the reaction returned by eiram_getId |
[in] | lnx | Natural logarithm of the argument |
Definition at line 1042 of file eiram.f90.
References eiram_fit, and reactions.
Referenced by eiram_calc1_fast_wrapper().
subroutine, public eiram::eiram_calc1 | ( | real(eiram_dp), dimension(:), intent(out) | Y, |
integer, intent(in) | Id, | ||
real(eiram_dp), dimension(:), intent(in) | lnX, | ||
integer, intent(out) | err | ||
) |
Calculate single polynomial fit.
Opposite to eiram_calc1_fast this subroutine performs checks and returns an array. It is indended for plotting and data analysis rather than for execution during a Monte-Carlo particle tracing
[out] | y | Array of the results: Y(k) for each LnX(k) |
[in] | id | ID of the reaction returned by eiram_getId |
[in] | lnx | Natural logarithm of the argument |
[out] | err | Error code |
Definition at line 1060 of file eiram.f90.
References eiram_fit, eiram_unit, and reactions.
Referenced by eiram_calc1_wrapper(), eiram_matlab_calc1(), eiram_test::eiram_test_calculation(), eiram_test::eiram_test_used_uninitialized(), eiram_test::eiram_test_wrong_ids(), eiram_test::eiram_test_wrong_size(), and eiram_test::eiram_test_wrong_type().
subroutine, public eiram::eiram_calc12 | ( | real(eiram_dp), dimension(:,:), intent(out) | B, |
integer, intent(in) | Id, | ||
real(eiram_dp), dimension(:), intent(in) | lnX, | ||
integer, intent(out) | err | ||
) |
Reduce double polynomial fit to single polynomials for given values of the second variable.
Then:
2nd dimension of B must be equal to the length of lnX, 1st dimension of B must be equal to the order of polynomial N plus 1. N is returned by eiram_get_order
This subroutine can be used e.g. in Monte-Carlo sampling for H.3 reactions. The background temperature is fixed and does not change. Coefficients B are calculated in advance for the temperatures in each cell. During the sampling the collision rate is calculated using the equation for above: with = energy of the test particle. eiram_fit can be used for that purpose
[out] | b | Coefficients of the reduced fit |
1st index is =0..N, 2nd index is k: lnX(k)
[in] | id | ID of the reaction returned by eiram_getId |
[in] | lnx | Natural logarithm of the 2nd argument X2 |
[out] | err | Error code |
Definition at line 1142 of file eiram.f90.
References eiram_fit, eiram_unit, and reactions.
Referenced by eiram_calc12_wrapper(), eiram_test::eiram_test_calc12(), eiram_test::eiram_test_used_uninitialized(), eiram_test::eiram_test_wrong_ids(), eiram_test::eiram_test_wrong_size(), and eiram_test::eiram_test_wrong_type().
subroutine, public eiram::eiram_calc2 | ( | real(eiram_dp), dimension(:), intent(out) | Y, |
integer, intent(in) | Id, | ||
real(eiram_dp), dimension(:), intent(in) | LnX1, | ||
real(eiram_dp), dimension(:), intent(in) | LnX2, | ||
integer, intent(out) | err | ||
) |
Calculate double polynomial fit.
Lengths of Y and LnX2 must be equal. Length of LnX1 must be either equal to the length of Y, or equal to 1. In this latter case all Y are calculated for the same value of LnX1
[out] | y | Array of the results: Y(k) for each pair (LnX1(k),LnX2(k)) |
[in] | id | ID of the reaction returned by eiram_getId |
[in] | lnx1 | Natural logarithm of the 1st argument |
[in] | lnx2 | Natural logarithm of the 2nd argument |
[out] | err | Error code |
Definition at line 1219 of file eiram.f90.
References eiram_fit, eiram_unit, and reactions.
Referenced by eiram_calc2_wrapper(), eiram_matlab_calc2(), eiram_test::eiram_test_calc12(), eiram_test::eiram_test_calculation(), eiram_test::eiram_test_used_uninitialized(), eiram_test::eiram_test_wrong_ids(), eiram_test::eiram_test_wrong_size(), and eiram_test::eiram_test_wrong_type().
integer, parameter, public eiram::eiram_dp = SELECTED_REAL_KIND(13) |
integer, public eiram::eiram_unit = 6 |
Unit to which messages are written.
Definition at line 112 of file eiram.f90.
Referenced by eiram_calc1(), eiram_calc12(), eiram_calc2(), eiram_cgi(), eiram_create_image(), eiram_deallocate(), eiram_get_id(), eiram_get_order(), eiram_load(), mexfunction(), and test().
integer, parameter eiram::units_length =32 |
integer, parameter eiram::quantity_length =64 |
integer, parameter eiram::reaction_length =128 |
integer, parameter eiram::description_length =256 |
integer, parameter, public eiram::eiram_file_name_length = 32 |
Length of the string with a name of an input file.
Definition at line 123 of file eiram.f90.
Referenced by mexfunction().
integer, parameter, public eiram::eiram_type_length = 8 |
Length of the string with reactiontype.
Definition at line 125 of file eiram.f90.
Referenced by mexfunction().
integer, parameter, public eiram::eiram_index_length = 16 |
Length of the string with reaction index.
Definition at line 127 of file eiram.f90.
Referenced by mexfunction().
integer, parameter eiram::max_line_length = 256 |
Maximum length of a line read from an file.
Definition at line 129 of file eiram.f90.
Referenced by eiram_load().
logical, parameter eiram::debug = .false. |
Definition at line 131 of file eiram.f90.
Referenced by eiram_deallocate(), and eiram_load().
real(eiram_dp), external, public eiram::eiram_fit |
Definition at line 133 of file eiram.f90.
Referenced by eiram_calc1(), eiram_calc12(), eiram_calc1_fast(), eiram_calc2(), and eiram_test::eiram_test_calc12().
integer, public eiram::eiram_nreact =0 |
current number of loaded reactions
Definition at line 187 of file eiram.f90.
Referenced by eiram_deallocate(), eiram_load(), and eiram_test::eiram_test_load().
type(eiram_data), dimension(:), allocatable eiram::reactions |
Array of reactions.
Definition at line 190 of file eiram.f90.
Referenced by eiram_calc1(), eiram_calc12(), eiram_calc1_fast(), eiram_calc2(), eiram_create_image(), eiram_deallocate(), eiram_get_id(), eiram_get_order(), and eiram_load().