utility Module

This MODULE contains useful miscellaneous PROCEDURES and variables



Uses

    • matrix
    • constants
  • module~~utility~~UsesGraph module~utility utility constants constants module~utility->constants matrix matrix module~utility->matrix

Used by

  • module~~utility~~UsedByGraph module~utility utility module~apm apm module~apm->module~utility module~sph_particles sph_particles module~apm->module~sph_particles module~bns_base bns_base module~bns_base->module~utility module~id_base id_base module~bns_base->module~id_base module~bns_fuka bns_fuka module~bns_fuka->module~utility module~bns_fuka->module~bns_base module~bns_fuka->module~id_base module~bns_lorene bns_lorene module~bns_lorene->module~utility module~bns_lorene->module~bns_base module~bns_lorene->module~id_base module~bssn_formulation bssn_formulation module~bssn_formulation->module~utility module~bssn_formulation->module~id_base module~bssn_formulation->module~sph_particles module~standard_tpo_formulation standard_tpo_formulation module~bssn_formulation->module~standard_tpo_formulation module~cauchy_convergence_test cauchy_convergence_test module~cauchy_convergence_test->module~utility module~cauchy_convergence_test->module~standard_tpo_formulation module~constraints constraints module~constraints->module~utility module~constraints->module~bssn_formulation module~constructors constructors module~constructors->module~utility module~lorentz_group lorentz_group module~constructors->module~lorentz_group module~diffstar_base diffstar_base module~diffstar_base->module~utility module~diffstar_base->module~id_base module~diffstar_lorene diffstar_lorene module~diffstar_lorene->module~utility module~diffstar_lorene->module~diffstar_base module~diffstar_lorene->module~id_base module~ejecta_generic ejecta_generic module~ejecta_generic->module~utility module~ejecta_generic->module~id_base module~geometry geometry module~geometry->module~utility module~geometry->module~bns_base module~id_base->module~utility module~interpolate interpolate module~interpolate->module~utility module~interpolate->module~bns_fuka module~interpolate~2 interpolate module~interpolate~2->module~utility module~interpolate~2->module~ejecta_generic module~io io module~io->module~utility module~io->module~sph_particles module~lorentz_group->module~utility module~perform_test perform_test module~perform_test->module~utility module~perform_test->module~cauchy_convergence_test module~read read module~read->module~utility module~read->module~bns_lorene module~read~2 read module~read~2->module~utility module~read~2->module~bns_fuka module~read~3 read module~read~3->module~utility module~read~3->module~diffstar_lorene module~sph_particles->module~utility module~sph_particles->module~id_base module~sph_variables sph_variables module~sph_variables->module~utility module~sph_variables->module~sph_particles module~standard_tpo_formulation->module~utility module~standard_tpo_formulation->module~id_base module~standard_tpo_formulation->module~sph_particles module~tabulated_eos tabulated_eos module~tabulated_eos->module~utility none~check_eos check_eos none~check_eos->module~utility none~place_and_print_ghost_particles place_and_print_ghost_particles none~place_and_print_ghost_particles->module~utility proc~analyze_constraint analyze_constraint proc~analyze_constraint->module~utility proc~assign_surfaces_mass assign_surfaces_mass proc~assign_surfaces_mass->module~utility proc~compute_adm_momentum_fluid_m2p compute_adm_momentum_fluid_m2p proc~compute_adm_momentum_fluid_m2p->module~utility proc~compute_and_print_bssn_constraints_grid compute_and_print_bssn_constraints_grid proc~compute_and_print_bssn_constraints_grid->module~utility proc~compute_and_print_bssn_variables compute_and_print_bssn_variables proc~compute_and_print_bssn_variables->module~utility proc~compute_and_print_quality_indicators compute_and_print_quality_indicators proc~compute_and_print_quality_indicators->module~utility proc~compute_and_print_sph_variables compute_and_print_sph_variables proc~compute_and_print_sph_variables->module~utility proc~compute_boost_matrices compute_boost_matrices proc~compute_boost_matrices->module~utility proc~compute_colatitudes_uniformly_in compute_colatitudes_uniformly_in proc~compute_colatitudes_uniformly_in->module~utility proc~compute_ricci compute_ricci proc~compute_ricci->module~utility proc~construct_bnsfuka construct_bnsfuka proc~construct_bnsfuka->module~utility proc~construct_bnslorene construct_bnslorene proc~construct_bnslorene->module~utility proc~construct_bssn construct_bssn proc~construct_bssn->module~utility proc~construct_diffstarlorene construct_diffstarlorene proc~construct_diffstarlorene->module~utility proc~construct_ejecta construct_ejecta proc~construct_ejecta->module~utility proc~construct_particles_bin construct_particles_bin proc~construct_particles_bin->module~utility proc~construct_particles_std construct_particles_std proc~construct_particles_std->module~utility proc~correct_adm_linear_momentum correct_adm_linear_momentum proc~correct_adm_linear_momentum->module~utility proc~correct_center_of_mass correct_center_of_mass proc~correct_center_of_mass->module~utility proc~estimate_lengthscale_field estimate_lengthscale_field proc~estimate_lengthscale_field->module~utility proc~find_particles_above_xy_plane find_particles_above_xy_plane proc~find_particles_above_xy_plane->module~utility proc~find_print_surfaces find_print_surfaces proc~find_print_surfaces->module~utility proc~find_surface find_surface proc~find_surface->module~utility proc~get_adm_mass~2 get_adm_mass proc~get_adm_mass~2->module~utility proc~get_adm_mass~3 get_adm_mass proc~get_adm_mass~3->module~utility proc~get_eos_parameters get_eos_parameters proc~get_eos_parameters->module~utility proc~get_eos_parameters~2 get_eos_parameters proc~get_eos_parameters~2->module~utility proc~get_eos_parameters~3 get_eos_parameters proc~get_eos_parameters~3->module~utility proc~get_total_spatial_extent get_total_spatial_extent proc~get_total_spatial_extent->module~utility proc~initialize_id_bnsfuka initialize_id_bnsfuka proc~initialize_id_bnsfuka->module~utility proc~integrate_baryon_mass_density integrate_baryon_mass_density proc~integrate_baryon_mass_density->module~utility proc~interpolate_fuka_id_particles interpolate_fuka_id_particles proc~interpolate_fuka_id_particles->module~utility proc~interpolate_fuka_mass_density interpolate_fuka_mass_density proc~interpolate_fuka_mass_density->module~utility proc~interpolate_fuka_pressure interpolate_fuka_pressure proc~interpolate_fuka_pressure->module~utility proc~interpolate_fuka_spatial_metric interpolate_fuka_spatial_metric proc~interpolate_fuka_spatial_metric->module~utility proc~interpolate_id_particles interpolate_id_particles proc~interpolate_id_particles->module~utility proc~interpolate_mass_density interpolate_mass_density proc~interpolate_mass_density->module~utility proc~number_surfaces number_surfaces proc~number_surfaces->module~utility proc~particle_volume particle_volume proc~particle_volume->module~utility proc~perform_apm perform_apm proc~perform_apm->module~utility proc~place_particles_ellipsoidal_surfaces place_particles_ellipsoidal_surfaces proc~place_particles_ellipsoidal_surfaces->module~utility proc~place_particles_lattice place_particles_lattice proc~place_particles_lattice->module~utility proc~place_surfaces place_surfaces proc~place_surfaces->module~utility proc~print_bns_properties print_bns_properties proc~print_bns_properties->module~utility proc~print_diffstar_properties print_diffstar_properties proc~print_diffstar_properties->module~utility proc~print_summary_bnsbase print_summary_bnsbase proc~print_summary_bnsbase->module~utility proc~print_summary_drs print_summary_drs proc~print_summary_drs->module~utility proc~print_summary~2 print_summary proc~print_summary~2->module~utility proc~read_bns_properties read_bns_properties proc~read_bns_properties->module~utility proc~read_bns_properties->module~tabulated_eos proc~read_bns_properties~2 read_bns_properties proc~read_bns_properties~2->module~utility proc~read_bnslorene_mass_density read_bnslorene_mass_density proc~read_bnslorene_mass_density->module~utility proc~read_bnslorene_pressure read_bnslorene_pressure proc~read_bnslorene_pressure->module~utility proc~read_boost_superimpose_tov_adm_id read_boost_superimpose_tov_adm_id proc~read_boost_superimpose_tov_adm_id->module~utility proc~read_compose_composition read_compose_composition proc~read_compose_composition->module~utility proc~read_diffstar_properties read_diffstar_properties proc~read_diffstar_properties->module~utility proc~read_diffstar_properties->module~tabulated_eos proc~read_drslorene_mass_density read_drslorene_mass_density proc~read_drslorene_mass_density->module~utility proc~read_drslorene_pressure read_drslorene_pressure proc~read_drslorene_pressure->module~utility proc~read_fuka_id_particles read_fuka_id_particles proc~read_fuka_id_particles->module~utility proc~read_fuka_id_spacetime read_fuka_id_spacetime proc~read_fuka_id_spacetime->module~utility proc~read_id_k~2 read_id_k proc~read_id_k~2->module~utility proc~read_id_mass_b read_id_mass_b proc~read_id_mass_b->module~utility proc~read_id_mass_b~2 read_id_mass_b proc~read_id_mass_b~2->module~utility proc~read_id_particles read_id_particles proc~read_id_particles->module~utility proc~read_id_particles~2 read_id_particles proc~read_id_particles~2->module~utility proc~read_particles_formatted_file read_particles_formatted_file proc~read_particles_formatted_file->module~utility proc~read_tov_sph_id read_tov_sph_id proc~read_tov_sph_id->module~utility proc~run_kadath_reader run_kadath_reader proc~run_kadath_reader->module~utility proc~set_up_lattices_around_stars set_up_lattices_around_stars proc~set_up_lattices_around_stars->module~utility proc~setup_standard_tpo_variables setup_standard_tpo_variables proc~setup_standard_tpo_variables->module~utility proc~standard_tpo_to_bssn standard_tpo_to_bssn proc~standard_tpo_to_bssn->module~utility proc~test_recovery test_recovery proc~test_recovery->module~utility proc~test_recovery_m2p test_recovery_m2p proc~test_recovery_m2p->module~utility program~construct_newtonian_binary construct_newtonian_binary program~construct_newtonian_binary->module~utility program~construct_newtonian_binary->module~lorentz_group program~convergence_test convergence_test program~convergence_test->module~utility program~convergence_test->module~bssn_formulation program~convergence_test->module~cauchy_convergence_test program~convergence_test->module~id_base program~convergence_test->module~sph_particles program~convergence_test->module~standard_tpo_formulation module~sphincs_id_fuka sphincs_id_fuka program~convergence_test->module~sphincs_id_fuka module~sphincs_id_full sphincs_id_full program~convergence_test->module~sphincs_id_full module~sphincs_id_interpolate sphincs_id_interpolate program~convergence_test->module~sphincs_id_interpolate module~sphincs_id_lorene sphincs_id_lorene program~convergence_test->module~sphincs_id_lorene program~sphincs_id sphincs_id program~sphincs_id->module~utility program~sphincs_id->module~bssn_formulation program~sphincs_id->module~id_base program~sphincs_id->module~sph_particles program~sphincs_id->module~sphincs_id_fuka program~sphincs_id->module~sphincs_id_full program~sphincs_id->module~sphincs_id_interpolate program~sphincs_id->module~sphincs_id_lorene program~write_par_eos write_par_eos program~write_par_eos->module~utility module~access access module~access->module~sph_particles module~access~2 access module~access~2->module~id_base module~access~3 access module~access~3->module~bns_base module~access~4 access module~access~4->module~bns_lorene module~access~5 access module~access~5->module~bns_fuka module~access~6 access module~access~6->module~diffstar_base module~access~7 access module~access~7->module~diffstar_lorene module~access~8 access module~access~8->module~ejecta_generic module~access~9 access module~access~9->module~standard_tpo_formulation module~actions actions module~actions->module~lorentz_group module~analysis analysis module~analysis->module~standard_tpo_formulation module~bssn_variables bssn_variables module~bssn_variables->module~bssn_formulation module~compose compose module~compose->module~sph_particles module~constructor constructor module~constructor->module~bssn_formulation module~constructor_bin constructor_bin module~constructor_bin->module~sph_particles module~constructor_std constructor_std module~constructor_std->module~sph_particles module~constructor~2 constructor module~constructor~2->module~bns_lorene module~constructor~3 constructor module~constructor~3->module~bns_fuka module~constructor~4 constructor module~constructor~4->module~diffstar_lorene module~constructor~5 constructor module~constructor~5->module~ejecta_generic module~ellipsoidal_surfaces ellipsoidal_surfaces module~ellipsoidal_surfaces->module~sph_particles module~finalize_id finalize_id module~finalize_id->module~bns_lorene module~handle_positions handle_positions module~handle_positions->module~sph_particles module~initialization initialization module~initialization->module~id_base module~io~2 io module~io~2->module~standard_tpo_formulation module~io~3 io module~io~3->module~bssn_formulation module~io~4 io module~io~4->module~bns_base module~io~5 io module~io~5->module~bns_lorene module~io~6 io module~io~6->module~bns_fuka module~io~7 io module~io~7->module~diffstar_base module~io~8 io module~io~8->module~diffstar_lorene module~io~9 io module~io~9->module~ejecta_generic module~landau_lifshitz landau_lifshitz module~landau_lifshitz->module~bssn_formulation module~lattices lattices module~lattices->module~sph_particles module~length_scale length_scale module~length_scale->module~id_base module~mass_profile mass_profile module~mass_profile->module~id_base module~memory memory module~memory->module~sph_particles module~memory~2 memory module~memory~2->module~bssn_formulation module~memory~3 memory module~memory~3->module~bns_lorene module~memory~4 memory module~memory~4->module~bns_fuka module~memory~5 memory module~memory~5->module~diffstar_lorene module~memory~6 memory module~memory~6->module~ejecta_generic module~properties properties module~properties->module~bns_lorene module~properties~2 properties module~properties~2->module~bns_fuka module~properties~3 properties module~properties~3->module~diffstar_lorene module~quality_indicators quality_indicators module~quality_indicators->module~sph_particles module~recovery recovery module~recovery->module~sph_particles module~recovery_m2p recovery_m2p module~recovery_m2p->module~standard_tpo_formulation module~redistribute_nu redistribute_nu module~redistribute_nu->module~sph_particles module~ricci ricci module~ricci->module~bssn_formulation module~shared_grid shared_grid module~shared_grid->module~cauchy_convergence_test module~sph_adm_variables sph_adm_variables module~sph_adm_variables->module~standard_tpo_formulation module~sphincs_id_fuka->module~bns_fuka module~sphincs_id_fuka->module~ejecta_generic module~sphincs_id_fuka->module~id_base module~sphincs_id_full->module~bns_fuka module~sphincs_id_full->module~bns_lorene module~sphincs_id_full->module~diffstar_lorene module~sphincs_id_full->module~ejecta_generic module~sphincs_id_full->module~id_base module~sphincs_id_interpolate->module~ejecta_generic module~sphincs_id_interpolate->module~id_base module~sphincs_id_lorene->module~bns_lorene module~sphincs_id_lorene->module~diffstar_lorene module~sphincs_id_lorene->module~ejecta_generic module~sphincs_id_lorene->module~id_base module~standard_tpo_variables standard_tpo_variables module~standard_tpo_variables->module~standard_tpo_formulation

Contents


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

dens_si2cu

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

.TRUE. if a given file exists; .FALSE. otherwise

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

.TRUE. if loop progress is to be printed to standard output; .FALSE. otherwise

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:

  1. The year as a 4-digit integer
  2. The month as an integer from 1 to 12
  3. The day of the moneth as an integer from 1 to 31
  4. The time difference, in minutes, with respect to UTC (Coordinated Universal Time)
  5. The hour of the day as an integer from 1 to 23
  6. The minutes of the hour as an integer from 1 to 59
  7. The second of the minute as an integer from 0 to 60
  8. The millisecond of the second as an integer from 0 to 999
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


Derived Types

type, public ::  surface

Components

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, public ::  tabu_eos

Components

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.


Functions

public pure function is_finite_number(x) result(res)

Test if a double precision is a finite number

Read more…

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: x

Return Value logical

public pure function k_lorene2cu(gam)

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}\)

Read more…

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: gam

Polytropic exponent

Return Value double precision

public pure function k_lorene2cu_pwp(gamma0)

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}\)

Read more…

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: gamma0

Polytropic exponent

Return Value double precision

public function shorten_eos_name(eos_long) result(eos_str)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: eos_long

Return Value character(len=4)


Subroutines

public pure subroutine cartesian_from_spherical(r, theta, phi, xo, yo, zo, x, y, z, a_y, a_z)

Compute the Cartesian coordinates of a points , starting from the spherical, or optionally elliptical, polar coordinates of the point relative to a point

Read more…

Arguments

Type IntentOptional 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

public pure subroutine compute_g4(lapse, shift, g3, g4)

Computes the spacetime metric from lapse, shift and spatial metric

Read more…

Arguments

Type IntentOptional 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

public subroutine compute_tpo_metric(g4, lapse, shift, g3)

Computes the lapse,shift and spatial metric from the covariant spacetime metric

Read more…

Arguments

Type IntentOptional 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

public subroutine determinant_sym3x3(A, det)

Compute the determinant of a symmetric matrix field, given as a 6-vector, at a given grid point

Read more…

Arguments

Type IntentOptional 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

public subroutine determinant_sym4x4(A, det)

Compute the determinant of a symmetric matrix field, given as a 10-vector

Read more…

Arguments

Type IntentOptional 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

public subroutine invert_sym3x3(A, iA)

Invert a symemtric matrix stored as a -vector

Read more…

Arguments

Type IntentOptional 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.

public subroutine invert_sym4x4(A, iA)

Invert a symemtric matrix stored as a -vector

Read more…

Arguments

Type IntentOptional 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.

public pure subroutine mat2vec_sym3x3(mat, vec)

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: mat(3,3)
double precision, intent(out) :: vec(n_sym3x3)

public subroutine read_sphincs_id_parameters()

Read the parameters to steer SPHINCS_ID

Read more…

Arguments

None

public subroutine scan_1d_array_for_nans(array_size, array, name)

Test if a double precision is a finite number

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: array_size
double precision, intent(in), DIMENSION(:) :: array
character(len=*), intent(in) :: name

public subroutine scan_3d_array_for_nans(size_1, size_2, size_3, array, name)

Test if a double precision is a finite number

Read more…

Arguments

Type IntentOptional 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

public subroutine spacetime_vector_norm_sym4x4(g4, v, norm)

Compute the spacetime squared norm of a vector, using the metric given as an array of 10 components

Read more…

Arguments

Type IntentOptional 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.

public subroutine spatial_vector_norm_sym3x3(g3, v, norm)

Compute the spatial squared norm of a vector, using the spatial metric given as an array of 6 components

Read more…

Arguments

Type IntentOptional 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.

public pure subroutine spherical_from_cartesian(x, y, z, xo, yo, zo, r, theta, phi)

Compute the spherical polar coordinates of a point relative to a point , starting from the Cartesian coordinates of the points and

Read more…

Arguments

Type IntentOptional 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

public subroutine test_status(io_stat, io_msg, opt_msg)

Test if a status variable is 0 or not

Read more…

Arguments

Type IntentOptional 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

public pure subroutine vec2mat_sym3x3(vec, mat)

Write the components of symmetric matrix given as a -vector, into a matrix

Read more…

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: vec(n_sym3x3)
double precision, intent(out) :: mat(3,3)