This MODULE contains useful miscellaneous PROCEDURES and variables
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
double precision, | public, | parameter | :: | MSun_geo | = | G_Msun/c_light2/(ten*ten*ten*ten*ten) |
Msun_geo = 1.47662503825040 km see https://einsteintoolkit.org/thornguide/EinsteinBase/HydroBase/documentation.html |
double precision, | public, | parameter | :: | MeV2amuc2 | = | one/931.49432 |
Conversion factor from to |
integer, | public | :: | cnt | = | 0 |
Counter |
|
character(len=max_length), | public | :: | common_eos_path |
String storing the path to the directory where the \(\mathrm{EOS}\) files are stored. Local and global paths can be used |
|||
character(len=max_length), | public | :: | common_path |
String storing the path to the directory where the \(\mathrm{ID}\) files are stored. Local and global paths can be used |
|||
logical, | public | :: | compute_constraints | ||||
logical, | public | :: | compute_parts_constraints | ||||
integer, | public | :: | constraints_step |
Export the constraints every constraints_step-th step |
|||
character(len=1), | public, | parameter | :: | creturn | = | ACHAR(13) |
Carriage return |
character(len=8), | public | :: | date |
Date when the run starts |
|||
double precision, | public | :: | denominator_ratio_dx |
Denominator of the rational ratio between the large grid spacing and the medium one,equal to the ratio between the medium grid spacing nd the small one. Not used in this PROGRAM, but needed since the PROGRAM reads the same parameter file as the convergence_test PROGRAM |
|||
double precision, | public, | parameter | :: | density_si2cu | = | (MSun_geo*km2m)**3/(MSun*g2kg) |
Conversion factor for the baryon mass density, from SI units to code units, but NOT measured in units of
|
character(len=19), | public | :: | end_time |
Time when the run ends |
|||
integer, | public, | parameter | :: | eos$poly | = | 1 | |
integer, | public, | parameter | :: | eos$pwpoly | = | 2 | |
integer, | public, | parameter | :: | eos$tabu$compose | = | 3 | |
character(len=max_length), | public, | DIMENSION(50) | :: | eos_filenames | = | "use_id" |
Array of strings storing the names of the files containing the \(\mathrm{EOS}\) |
character(len=:), | public, | ALLOCATABLE | :: | err_msg |
String storing error messages |
||
logical, | public | :: | estimate_length_scale | ||||
logical, | public | :: | export_bin | ||||
logical, | public | :: | export_constraints | ||||
logical, | public | :: | export_constraints_details | ||||
logical, | public | :: | export_constraints_x | ||||
logical, | public | :: | export_constraints_xy | ||||
logical, | public | :: | export_form | ||||
logical, | public | :: | export_form_x | ||||
logical, | public | :: | export_form_xy | ||||
logical, | public | :: | file_exists |
|
|||
character(len=max_length), | public, | DIMENSION(max_length) | :: | filenames | = | "0" |
Array of strings storing the names of the \(\mathrm{ID}\) files |
double precision, | public, | parameter | :: | five | = | 5.D0 | |
integer, | public, | parameter | :: | flag$sph | = | -37457 | |
integer, | public, | parameter | :: | flag$tpo | = | -6543 | |
double precision, | public, | parameter | :: | four | = | 4.D0 | |
double precision, | public, | parameter | :: | g2kg | = | one/(ten*ten*ten) | |
character(len=500), | public | :: | hostname |
String storing the name of the host machine |
|||
integer, | public | :: | ios |
Variable to store the state of I/O |
|||
integer, | public | :: | itr |
Iterator for loops |
|||
integer, | public | :: | itr3 |
Iterator for loops |
|||
integer, | public | :: | itr4 |
Iterator for loops |
|||
double precision, | public, | parameter | :: | km2Msun_geo | = | one/MSun_geo | |
double precision, | public, | parameter | :: | km2m | = | ten*ten*ten | |
integer, | public, | parameter | :: | max_length | = | 100 |
Maximum length for strings |
integer, | public, | parameter | :: | max_n_id | = | 50 | |
integer, | public, | parameter | :: | max_n_parts | = | 250 |
Maximum number of particle distributions |
integer, | public | :: | n_id |
Number of physical systems to set up |
|||
double precision, | public | :: | numerator_ratio_dx |
Numerator of the rational ratio between the large grid spacing and the medium one,equal to the ratio between the medium grid spacing nd the small one. Not used in this PROGRAM, but needed since the PROGRAM reads the same parameter file as the convergence_test PROGRAM |
|||
double precision, | public, | parameter | :: | one | = | 1.D0 | |
logical, | public | :: | one_lapse | ||||
integer, | public | :: | perc |
Percentage of execution time (integer) |
|||
double precision, | public | :: | perc2 |
Percentage of execution time (double) |
|||
integer, | public, | DIMENSION(max_n_id, max_n_parts) | :: | placer | = | test_int |
Matrix storing the information on how to place particles for each bns object. Row i contains information about the i^th bns object. |
integer, | public | :: | ref_lev |
Number of refinement levels |
|||
character(len=19), | public | :: | run_id |
Identification string for the run |
|||
logical, | public | :: | run_spacetime | ||||
logical, | public | :: | run_sph | ||||
double precision, | public, | parameter | :: | seven | = | 7.D0 | |
logical, | public | :: | show_progress |
|
|||
character(len=max_length), | public | :: | spacetime_path |
String storing the local path to the directory where the spacetime output is to be saved |
|||
character(len=max_length), | public | :: | sph_path |
String storing the local path to the directory where the SPH output is to be saved |
|||
double precision, | public, | parameter | :: | ten | = | 10.D0 | |
integer, | public, | parameter | :: | test_int | = | -112 | |
double precision, | public, | parameter | :: | three | = | 3.D0 | |
character(len=10), | public | :: | time |
Time when the run starts |
|||
double precision, | public, | parameter | :: | two | = | 2.D0 | |
logical, | public | :: | use_eos_from_id | ||||
integer, | public, | DIMENSION(8) | :: | values |
An integer array of 8 elements described below:
|
||
character(len=10), | public | :: | version |
String storing the version of \(\texttt{SPHINCS_ID}\) |
|||
double precision, | public, | parameter | :: | zero | = | 0.D0 | |
logical, | public | :: | zero_shift | ||||
character(len=5), | public | :: | zone |
Place where the run runs |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | is_known | = | .FALSE. | ||
double precision, | public, | DIMENSION(:,:,:), ALLOCATABLE | :: | points |
Array containing the coordinates of the matter objects' surfaces The first index runs over the stars; the second and third run over the surface points (number of points for and ); the fourth index runs over the Cartesian coordinates of the points |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
double precision, | public, | DIMENSION(:,:), ALLOCATABLE | :: | table_eos |
Array containing the tabulated \(\mathrm{EOS}\). Its size is determined when reading the tabulated \(\mathrm{EOS}\) from file The first index runs over the field, the second over its values. |
Test if a double precision is a finite number
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | x |
Compute the constant to convert the polytropic constant from the units used in \(\texttt{LORENE}\) for the single polytropic \(\mathrm{EOS}\), to the units used in \(\texttt{SPHINCS}\)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | gam |
Polytropic exponent |
Compute the constant to convert the polytropic constant from the units used in \(\texttt{LORENE}\) for the piecewise polytropic \(\mathrm{EOS}\), to the units used in \(\texttt{SPHINCS}\)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | gamma0 |
Polytropic exponent |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | eos_long |
Compute the Cartesian coordinates of a points , starting from the spherical, or optionally elliptical, polar coordinates of the point relative to a point
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | r |
coordinate of the point , relative to |
||
double precision, | intent(in) | :: | theta |
coordinate (colatitude) of the point , relative to |
||
double precision, | intent(in) | :: | phi |
coordinate (azimuth) of the point , relative to |
||
double precision, | intent(in) | :: | xo |
coordinate of the point |
||
double precision, | intent(in) | :: | yo |
coordinate of the point |
||
double precision, | intent(in) | :: | zo |
coordinate of the point |
||
double precision, | intent(out) | :: | x |
coordinate of the point |
||
double precision, | intent(out) | :: | y |
coordinate of the point |
||
double precision, | intent(out) | :: | z |
coordinate of the point |
||
double precision, | intent(in), | optional | :: | a_y |
Ratio between the y and x semiaxes of the ellipse |
|
double precision, | intent(in), | optional | :: | a_z |
Ratio between the z and x semiaxes of the ellipse |
Computes the spacetime metric from lapse, shift and spatial metric
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | lapse |
Lapse function |
||
double precision, | intent(in), | DIMENSION(3) | :: | shift |
Contravariant shift vector |
|
double precision, | intent(in), | DIMENSION(6) | :: | g3 |
Covariant spatial metric |
|
double precision, | intent(inout), | DIMENSION(10) | :: | g4 |
Covariant spacetime metric |
Computes the lapse,shift and spatial metric from the covariant spacetime metric
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in), | DIMENSION(n_sym4x4) | :: | g4 |
Covariant spacetime metric |
|
double precision, | intent(out) | :: | lapse |
Lapse function |
||
double precision, | intent(out), | DIMENSION(3) | :: | shift |
Contravariant shift vector |
|
double precision, | intent(out), | DIMENSION(n_sym3x3) | :: | g3 |
Covariant spatial metric |
Compute the determinant of a symmetric matrix field, given as a 6-vector, at a given grid point
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | A(jxx:jzz) |
The symmetric matrix, given as a 6-vector. |
||
double precision, | intent(out) | :: | det |
Determinant of the symmetric matrix |
Compute the determinant of a symmetric matrix field, given as a 10-vector
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | A(:) |
The symmetric matrix, given as a 10-vector. The first 3 components run over the numbers of grid points along each axis. The fourth index runs over the number of independent components of the symmetric matrix. |
||
double precision, | intent(out) | :: | det |
Determinant of the symmetric matrix |
Invert a symemtric matrix stored as a -vector
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | A(:) |
The symmetric matrix, given as a -vector. |
||
double precision, | intent(out) | :: | iA(n_sym3x3) |
Inverse of the symmetric matrix, given as input. |
Invert a symemtric matrix stored as a -vector
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | A(:) |
The symmetric matrix, given as a 10-vector. The first 3 components run over the numbers of grid points along each axis. The fourth index runs over the number of independent components of the symmetric matrix. |
||
double precision, | intent(out) | :: | iA(n_sym4x4) |
Inverse of the symmetric matrix, given as input. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | mat(3,3) | |||
double precision, | intent(out) | :: | vec(n_sym3x3) |
Test if a double precision is a finite number
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | array_size | |||
double precision, | intent(in), | DIMENSION(:) | :: | array | ||
character(len=*), | intent(in) | :: | name |
Test if a double precision is a finite number
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | size_1 | |||
integer, | intent(in) | :: | size_2 | |||
integer, | intent(in) | :: | size_3 | |||
double precision, | intent(in), | DIMENSION(:,:,:) | :: | array | ||
character(len=*), | intent(in) | :: | name |
Compute the spacetime squared norm of a vector, using the metric given as an array of 10 components
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | g4(itt:izz) |
The spacetime metric, given as a 10-vector. |
||
double precision, | intent(in) | :: | v(it:iz) |
The -vector whose norm has to be computed. |
||
double precision, | intent(out) | :: | norm |
Spacetime norm of the vector v. |
Compute the spatial squared norm of a vector, using the spatial metric given as an array of 6 components
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | g3(jxx:jzz) |
The spacetime metric, given as a 6-vector. |
||
double precision, | intent(in) | :: | v(jx:jz) |
The -vector whose norm has to be computed. |
||
double precision, | intent(out) | :: | norm |
Spatial norm of the vector v. |
Compute the spherical polar coordinates of a point relative to a point , starting from the Cartesian coordinates of the points and
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | x |
coordinate of the point |
||
double precision, | intent(in) | :: | y |
coordinate of the point |
||
double precision, | intent(in) | :: | z |
coordinate of the point |
||
double precision, | intent(in) | :: | xo |
coordinate of the point |
||
double precision, | intent(in) | :: | yo |
coordinate of the point |
||
double precision, | intent(in) | :: | zo |
coordinate of the point |
||
double precision, | intent(out) | :: | r |
coordinate of the point , relative to |
||
double precision, | intent(out) | :: | theta |
coordinate (colatitude) of the point , relative to |
||
double precision, | intent(out) | :: | phi |
coordinate (azimuth) of the point , relative to |
Test if a status variable is 0 or not
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | io_stat |
Status variable |
||
character(len=100), | intent(in) | :: | io_msg |
Status message |
||
character(len=*), | intent(in), | optional | :: | opt_msg |
Optional status message |
Write the components of symmetric matrix given as a -vector, into a matrix
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | vec(n_sym3x3) | |||
double precision, | intent(out) | :: | mat(3,3) |