EIRAM
atomic and molecular data in form of polynomial fits
Functions/Subroutines | Variables
eiram_test Module Reference

Functions/Subroutines

logical function, public eiram_test_wrong_file ()
 Test for correct error codes if the input file does not exist or is malformed. More...
 
logical function, public eiram_test_used_uninitialized ()
 Test for correct error codes if eiram is used without initialization. More...
 
logical function, public eiram_test_load ()
 Technical test which shows that expected number of reactions is loaded from each input file. More...
 
logical function, public eiram_test_wrong_ids ()
 Test for correct error codes if reaction ID is invalid. More...
 
logical function, public eiram_test_unknown_reaction ()
 Test for correct error code when querying id for an unknown reaction. More...
 
logical function, public eiram_test_wrong_type ()
 Test for correct error codes if _calc1 is called for double polynomial or _calc2, _calc12 is called for single polynomial. More...
 
logical function, public eiram_test_wrong_size ()
 Test for correct error codes in case of mismatch of the array lengths. More...
 
logical function, public eiram_test_calculation ()
 Regression tests: compare calculated values with references. More...
 
logical function, public eiram_test_calc12 ()
 Regression test for subroutines _calc12 and _get_order compare _calc12 with subsequent call of _fit with _calc2. More...
 
logical function, public eiram_test_image ()
 Technical test of eiram_create_image. More...
 

Variables

real(eiram_dp), parameter rel_tolerance = 1e-7
 Maximum relative error, parameter which is used to compare two values. More...
 
character(*), parameter data_file_path = "../data/"
 
integer, parameter n_reactions = 5
 
integer, parameter n_energy = 5
 
character(9), dimension(n_reactions), parameter files = (/ "HYDHELvk " , "AMJUELvk " , "HYDHELvk " , "AMJUELvk ", "METHANEvk" /)
 
character(6), dimension(n_reactions), parameter types = (/ "H.1" , "H.2" , "H.3" , "H.4", "H.2" /)
 
character(8), dimension(n_reactions), parameter indices = (/ "3.1.8 ", "2.4B0 ", "3.1.8 " , "2.1.5 ", "2.23 "/)
 
real(eiram_dp), dimension(n_energy), parameter energy = (/ 5e-1, 1e0, 1e1, 1e2, 1e3 /)
 
real(eiram_dp), dimension(n_reactions), parameter x1 = (/ -1e0, -1e0, 1e1, 1e6, -1e0 /)
 
real(eiram_dp), dimension(n_energy, n_reactions), parameter reference_values = reshape( (/ 6.313479104896471d-15, 6.034774383818398d-15, 4.631473573509119d-15, 3.143444136405398d-15, 1.744077658482620d-15, 1.229920711197272d-16, 1.857264485174120d-12, 2.944795004910767d-08, 1.073462933550498d-07, 7.992508213267738d-08, 2.064031139307574d-08, 2.084428058191167d-08, 2.582052648196180d-08, 4.420072796238867d-08, 8.043311877821200d-08, 1.865302180435326d-19, 4.904897322289924d-14, 9.954471496437615d-09, 4.738209685016329d-08, 2.907993073331902d-08, 1.320141447945264d-18, 9.051595057476462d-14, 2.966866133652682d-08, 1.909445571151299d-07, 1.391314913417069d-07 /), (/N_ENERGY,N_REACTIONS/))
 Reference values for regression tests in eiram_test_calculation. More...
 

Function/Subroutine Documentation

logical function, public eiram_test::eiram_test_wrong_file ( )

Test for correct error codes if the input file does not exist or is malformed.

Definition at line 76 of file eiram_test.f90.

References data_file_path, eiram::eiram_deallocate(), and eiram::eiram_load().

Referenced by test().

Here is the call graph for this function:

Here is the caller graph for this function:

logical function, public eiram_test::eiram_test_used_uninitialized ( )

Test for correct error codes if eiram is used without initialization.

Definition at line 93 of file eiram_test.f90.

References eiram::eiram_calc1(), eiram::eiram_calc12(), eiram::eiram_calc2(), eiram::eiram_create_image(), eiram::eiram_deallocate(), eiram::eiram_get_id(), and eiram::eiram_get_order().

Referenced by test().

Here is the call graph for this function:

Here is the caller graph for this function:

logical function, public eiram_test::eiram_test_load ( )

Technical test which shows that expected number of reactions is loaded from each input file.

Definition at line 120 of file eiram_test.f90.

References data_file_path, eiram::eiram_deallocate(), eiram::eiram_load(), and eiram::eiram_nreact.

Referenced by test().

Here is the call graph for this function:

Here is the caller graph for this function:

logical function, public eiram_test::eiram_test_wrong_ids ( )

Test for correct error codes if reaction ID is invalid.

Definition at line 214 of file eiram_test.f90.

References data_file_path, eiram::eiram_calc1(), eiram::eiram_calc12(), eiram::eiram_calc2(), eiram::eiram_deallocate(), and eiram::eiram_load().

Referenced by test().

Here is the call graph for this function:

Here is the caller graph for this function:

logical function, public eiram_test::eiram_test_unknown_reaction ( )

Test for correct error code when querying id for an unknown reaction.

Definition at line 242 of file eiram_test.f90.

References data_file_path, eiram::eiram_deallocate(), eiram::eiram_get_id(), and eiram::eiram_load().

Referenced by test().

Here is the call graph for this function:

Here is the caller graph for this function:

logical function, public eiram_test::eiram_test_wrong_type ( )

Test for correct error codes if _calc1 is called for double polynomial or _calc2, _calc12 is called for single polynomial.

Definition at line 268 of file eiram_test.f90.

References data_file_path, eiram::eiram_calc1(), eiram::eiram_calc12(), eiram::eiram_calc2(), eiram::eiram_deallocate(), eiram::eiram_get_id(), and eiram::eiram_load().

Referenced by test().

Here is the call graph for this function:

Here is the caller graph for this function:

logical function, public eiram_test::eiram_test_wrong_size ( )

Test for correct error codes in case of mismatch of the array lengths.

Definition at line 294 of file eiram_test.f90.

References data_file_path, eiram::eiram_calc1(), eiram::eiram_calc12(), eiram::eiram_calc2(), eiram::eiram_deallocate(), eiram::eiram_get_id(), and eiram::eiram_load().

Here is the call graph for this function:

logical function, public eiram_test::eiram_test_calculation ( )

Regression tests: compare calculated values with references.

Definition at line 325 of file eiram_test.f90.

References data_file_path, eiram::eiram_calc1(), eiram::eiram_calc2(), eiram::eiram_deallocate(), eiram::eiram_get_id(), eiram::eiram_load(), energy, files, indices, n_reactions, reference_values, types, and x1.

Referenced by test().

Here is the call graph for this function:

Here is the caller graph for this function:

logical function, public eiram_test::eiram_test_calc12 ( )

Regression test for subroutines _calc12 and _get_order compare _calc12 with subsequent call of _fit with _calc2.

Definition at line 371 of file eiram_test.f90.

References data_file_path, eiram::eiram_calc12(), eiram::eiram_calc2(), eiram::eiram_deallocate(), eiram::eiram_fit, eiram::eiram_get_id(), eiram::eiram_get_order(), and eiram::eiram_load().

Referenced by test().

Here is the call graph for this function:

Here is the caller graph for this function:

logical function, public eiram_test::eiram_test_image ( )

Technical test of eiram_create_image.

Definition at line 415 of file eiram_test.f90.

References data_file_path, eiram::eiram_create_image(), eiram::eiram_deallocate(), eiram::eiram_load(), and rel_tolerance.

Referenced by test().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

real(eiram_dp), parameter eiram_test::rel_tolerance = 1e-7

Maximum relative error, parameter which is used to compare two values.

Definition at line 44 of file eiram_test.f90.

Referenced by eiram_test_image().

character(*), parameter eiram_test::data_file_path = "../data/"
integer, parameter eiram_test::n_reactions = 5

Definition at line 46 of file eiram_test.f90.

Referenced by DEFUN_DLD(), and eiram_test_calculation().

integer, parameter eiram_test::n_energy = 5

Definition at line 47 of file eiram_test.f90.

character(9), dimension(n_reactions), parameter eiram_test::files = (/ "HYDHELvk " , "AMJUELvk " , "HYDHELvk " , "AMJUELvk ", "METHANEvk" /)

Definition at line 48 of file eiram_test.f90.

Referenced by eiram_test_calculation().

character(6), dimension(n_reactions), parameter eiram_test::types = (/ "H.1" , "H.2" , "H.3" , "H.4", "H.2" /)

Definition at line 49 of file eiram_test.f90.

Referenced by eiram_test_calculation().

character(8), dimension(n_reactions), parameter eiram_test::indices = (/ "3.1.8 ", "2.4B0 ", "3.1.8 " , "2.1.5 ", "2.23 "/)

Definition at line 50 of file eiram_test.f90.

Referenced by eiram_test_calculation().

real(eiram_dp), dimension(n_energy), parameter eiram_test::energy = (/ 5e-1, 1e0, 1e1, 1e2, 1e3 /)

Definition at line 51 of file eiram_test.f90.

Referenced by eiram_test_calculation().

real(eiram_dp), dimension(n_reactions), parameter eiram_test::x1 = (/ -1e0, -1e0, 1e1, 1e6, -1e0 /)

Definition at line 52 of file eiram_test.f90.

Referenced by eiram_test_calculation().

real(eiram_dp), dimension(n_energy,n_reactions), parameter eiram_test::reference_values = reshape( (/ 6.313479104896471d-15, 6.034774383818398d-15, 4.631473573509119d-15, 3.143444136405398d-15, 1.744077658482620d-15, 1.229920711197272d-16, 1.857264485174120d-12, 2.944795004910767d-08, 1.073462933550498d-07, 7.992508213267738d-08, 2.064031139307574d-08, 2.084428058191167d-08, 2.582052648196180d-08, 4.420072796238867d-08, 8.043311877821200d-08, 1.865302180435326d-19, 4.904897322289924d-14, 9.954471496437615d-09, 4.738209685016329d-08, 2.907993073331902d-08, 1.320141447945264d-18, 9.051595057476462d-14, 2.966866133652682d-08, 1.909445571151299d-07, 1.391314913417069d-07 /), (/N_ENERGY,N_REACTIONS/))

Reference values for regression tests in eiram_test_calculation.

Definition at line 54 of file eiram_test.f90.

Referenced by eiram_test_calculation().