id_base Module

This MODULE contains the definition of TYPE idbase, which is an ABSTRACT TYPE representing any possible type of initial data (\(\mathrm{ID}\)) to be set up for \(\texttt{SPHINCS_BSSN}\). That is, a binary neutron star system, a rotating star, a binary black hole system, etc.

PROCEDURES and variables shared by all these types of \(\mathrm{ID}\) should belong to TYPE idbase, as they are inherited by its EXTENDED TYPES that represent more specific types of \(\mathrm{ID}\).

FT 24.09.2021



Uses

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

Used by

  • module~~id_base~~UsedByGraph module~id_base id_base module~access~2 access module~access~2->module~id_base module~bns_base bns_base module~bns_base->module~id_base module~bns_fuka bns_fuka module~bns_fuka->module~id_base module~bns_fuka->module~bns_base module~bns_lorene bns_lorene module~bns_lorene->module~id_base module~bns_lorene->module~bns_base module~bssn_formulation bssn_formulation module~bssn_formulation->module~id_base module~sph_particles sph_particles module~bssn_formulation->module~sph_particles module~standard_tpo_formulation standard_tpo_formulation module~bssn_formulation->module~standard_tpo_formulation module~diffstar_base diffstar_base module~diffstar_base->module~id_base module~diffstar_lorene diffstar_lorene module~diffstar_lorene->module~id_base module~diffstar_lorene->module~diffstar_base module~ejecta_generic ejecta_generic module~ejecta_generic->module~id_base module~initialization initialization module~initialization->module~id_base module~length_scale length_scale module~length_scale->module~id_base module~mass_profile mass_profile module~mass_profile->module~id_base module~sph_particles->module~id_base module~sphincs_id_fuka sphincs_id_fuka module~sphincs_id_fuka->module~id_base module~sphincs_id_fuka->module~bns_fuka module~sphincs_id_fuka->module~ejecta_generic module~sphincs_id_full sphincs_id_full module~sphincs_id_full->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_interpolate sphincs_id_interpolate module~sphincs_id_interpolate->module~id_base module~sphincs_id_interpolate->module~ejecta_generic module~sphincs_id_lorene sphincs_id_lorene module~sphincs_id_lorene->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~standard_tpo_formulation->module~id_base module~standard_tpo_formulation->module~sph_particles program~convergence_test convergence_test program~convergence_test->module~id_base program~convergence_test->module~bssn_formulation program~convergence_test->module~sph_particles program~convergence_test->module~sphincs_id_fuka program~convergence_test->module~sphincs_id_full program~convergence_test->module~sphincs_id_interpolate program~convergence_test->module~sphincs_id_lorene program~convergence_test->module~standard_tpo_formulation module~cauchy_convergence_test cauchy_convergence_test program~convergence_test->module~cauchy_convergence_test program~sphincs_id sphincs_id program~sphincs_id->module~id_base program~sphincs_id->module~bssn_formulation 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 module~access access module~access->module~sph_particles 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~analysis analysis module~analysis->module~standard_tpo_formulation module~apm apm module~apm->module~sph_particles module~bssn_variables bssn_variables module~bssn_variables->module~bssn_formulation module~cauchy_convergence_test->module~standard_tpo_formulation module~compose compose module~compose->module~sph_particles module~constraints constraints module~constraints->module~bssn_formulation 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~geometry geometry module~geometry->module~bns_base module~handle_positions handle_positions module~handle_positions->module~sph_particles module~interpolate interpolate module~interpolate->module~bns_fuka module~interpolate~2 interpolate module~interpolate~2->module~ejecta_generic module~io io module~io->module~sph_particles 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~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~read read module~read->module~bns_lorene module~read~2 read module~read~2->module~bns_fuka module~read~3 read module~read~3->module~diffstar_lorene 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~sph_adm_variables sph_adm_variables module~sph_adm_variables->module~standard_tpo_formulation module~sph_variables sph_variables module~sph_variables->module~sph_particles module~standard_tpo_variables standard_tpo_variables module~standard_tpo_variables->module~standard_tpo_formulation module~perform_test perform_test module~perform_test->module~cauchy_convergence_test module~shared_grid shared_grid module~shared_grid->module~cauchy_convergence_test

Contents


Interfaces

interface

  • public module subroutine check_i_matter(this, i_matter)

    Checks that the given index i_matter is between 1 and n_matter, included. If not, it stops the execution of the program.

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this
    integer, intent(in) :: i_matter

    Value to be checked

interface

  • public module function estimate_lengthscale_field(this, get_field, n_mat) result(scales)

    Estimate typical length scales, one per each matter object, by computing , where is a field given as input, and represent a derivative of it. Presently, the derivatives are computed separately along each spatial dimension, as 1D derivatives.

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(inout) :: this
    function get_field(x, y, z) result(val)

    Returns the value of a field at the desired point

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

    coordinate of the desired point

    double precision, intent(in) :: y

    coordinate of the desired point

    double precision, intent(in) :: z

    coordinate of the desired point

    Return Value double precision

    Value of the field at

    integer, intent(in) :: n_mat

    Return Value double precision, DIMENSION(n_mat)

    Array of the minimum over the lattices that surround each matter object

interface

  • public pure module function get_cold_system(this)

    Returns cold_system, the LOGICAL variable at specifies if the system is cold (no thermal component)

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this

    Return Value logical

    cold_system

interface

  • public pure module function get_estimate_length_scale(this)

    Returns estimate_length_scale, the LOGICAL variable that specifies if a typical length scale, equal to the ratio of a field over its gradient, should be computed

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this

    Return Value logical

    estimate_length_scale

interface

  • public pure module function get_n_matter(this)

    Returns n_matter, the number of matter objects in the physical system

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this

    Return Value integer

    n_matter, the number of matter objects in the

interface

  • public pure module function get_one_lapse(this)

    Returns n_matter, the number of matter objects in the physical system

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this

    Return Value logical

    n_matter, the number of matter objects in the

interface

  • public module function get_total_spatial_extent(this) result(box)

    INTERFACE to the SUBROUTINE that detects the spatial extent of the physical system considered, and returns a 6-dimensional array containing the coordinates of a box centered at the center of the object and containing the system.

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this

    Object of class idbase which this PROCEDURE is a member of

    Return Value double precision, DIMENSION(6)

    6-dimensional array containing the coordinates of a box containing the physical system.

interface

  • public pure module function get_zero_shift(this)

    Returns n_matter, the number of matter objects in the physical system

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this

    Return Value logical

    n_matter, the number of matter objects in the

interface

  • public module subroutine initialize(derived_type, filename, eos_filenames)

    Initialize the DERIVED TYPE that extends idbase

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(out) :: derived_type

    Object of DERIVED TYPE that extends [[idbase], to be constructed

    character(len=*), intent(in), optional :: filename

    Name of the file containing the \(\mathrm{ID}\)

    character(len=*), intent(in), optional, DIMENSION(:) :: eos_filenames

    Array of strings containing the names of the files containing the \(\mathrm{EOS}\) to be used for each matter object. If not PRESENT, information from the file filename is used

interface

  • public module subroutine integrate_baryon_mass_density(this, center, radius, central_density, dr, dth, dphi, mass, mass_profile, mass_profile_idx, radii, surf)

    INTERFACE to the SUBROUTINE integrating the baryon mass density to compute the radial mass profile of a single star.

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(inout) :: this

    Object of class idbase which this PROCEDURE is a member of

    double precision, intent(in), DIMENSION(3) :: center

    Center of the star

    double precision, intent(in) :: radius

    Central density of the star

    double precision, intent(in) :: central_density

    Integration steps

    double precision, intent(in) :: dr

    Radius of the star

    double precision, intent(in) :: dth

    Radius of the star

    double precision, intent(in) :: dphi

    Radius of the star

    double precision, intent(inout) :: mass

    Integrated mass of the star

    double precision, intent(out), DIMENSION(3,0:NINT(radius/dr)) :: mass_profile

    Array storing the radial mass profile of the star

    integer, intent(out), DIMENSION(0:NINT(radius/dr)) :: mass_profile_idx

    Array to store the indices for array mass_profile, sorted so that mass_profile[mass_profile_idx] is in increasing order

    double precision, intent(in), optional, DIMENSION(2) :: radii
    type(surface), intent(in), optional :: surf

    Surface of the matter object

interface

  • public module subroutine sanity_check(derived_type)

    Check that the DERIVED TYPE that extends idbase is constructed consistently

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: derived_type

    Object of DERIVED TYPE that extends idbase

interface

  • public module subroutine set_cold_system(this, value)

    Sets cold_system, the LOGICAL variable at specifies if the system is cold (no thermal component)

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(inout) :: this
    logical, intent(in) :: value

    Value to set cold_system to

interface

  • public module subroutine set_estimate_length_scale(this, value)

    Sets estimate_length_scale, the LOGICAL variable that specifies if a typical length scale, equal to the ratio of a field over its gradient, should be computed

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(inout) :: this
    logical, intent(in) :: value

    Value to set cold_system to

interface

  • public pure module subroutine set_n_matter(this, value)

    Sets n_matter, the number of matter objects in the physical system, to the given value

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(inout) :: this
    integer, intent(in) :: value

    Value to set n_matter to

interface

  • public pure module subroutine set_one_lapse(this, logic)

    Sets n_matter, the number of matter objects in the physical system, to the given value

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(inout) :: this
    logical, intent(in) :: logic

    Value to set n_matter to

interface

  • public pure module subroutine set_zero_shift(this, logic)

    Sets n_matter, the number of matter objects in the physical system, to the given value

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(inout) :: this
    logical, intent(in) :: logic

    Value to set n_matter to


Abstract Interfaces

abstract interface

  • public subroutine derived_type_constructor_int(derived_type, filename, eos_filenames)

    Construct the DERIVED TYPE that extends idbase

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(out) :: derived_type

    Object of DERIVED TYPE that extends [[idbase], to be constructed

    character(len=*), intent(in), optional :: filename

    Name of the file containing the \(\mathrm{ID}\)

    character(len=*), intent(in), optional, DIMENSION(:) :: eos_filenames

    Array of strings containing the names of the files containing the \(\mathrm{EOS}\) to be used for each matter object. If not PRESENT, information from the file filename is used

abstract interface

  • public subroutine finalize_sph_id_int(npart, pos, nlrf, u, pr, vel_u, theta, nstar, nu)

    Post-process the \(\mathrm{SPH}\) \(\mathrm{ID}\); for example, correct for the residual ADM linear momentum.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: npart

    Particle number

    double precision, intent(inout), DIMENSION(3,npart) :: pos

    Particle positions

    double precision, intent(inout), DIMENSION(npart) :: nlrf

    Baryon density in the local rest frame on the particles

    double precision, intent(inout), DIMENSION(npart) :: u

    Specific internal energy on the particles

    double precision, intent(inout), DIMENSION(npart) :: pr

    Pressure on the particles

    double precision, intent(inout), DIMENSION(3,npart) :: vel_u

    Spatial velocity in the computing frame on the particles

    double precision, intent(inout), DIMENSION(npart) :: theta

    Generalized Lorentz factor on the particles

    double precision, intent(inout), DIMENSION(npart) :: nstar

    Proper baryon density in the local rest frame on the particles

    double precision, intent(inout), DIMENSION(npart) :: nu

    Baryon number per particle

abstract interface

  • public subroutine initialize_id_int(this, flag, switch)

    Initialize the \(\mathrm{ID}\); for example, set up the lattices around the stars for the \(\mathrm{BNS}\) produced with \(\texttt{FUKA}\).

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(inout) :: this
    integer, intent(in) :: flag

    Identifies what kind of initialization has to be done

    logical, intent(in), optional :: switch

    If .TRUE., switch to a different initialization

abstract interface

  • public subroutine print_summary_int(this, filename)

    Prints a summary of the physical properties the system to the standard output and, optionally, to a formatted file whose name is given as the optional argument filename

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this
    character(len=*), intent(inout), optional :: filename

    Name of the formatted file to print the summary to

abstract interface

  • public function read_double_at_pos(this, x, y, z) result(res)

    INTERFACE for a PROCEDURE that returns a DOUBLE PRECISION at a given position

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this

    Object of class idbase which this PROCEDURE is a member of

    double precision, intent(in), VALUE :: x

    coordinate of the desired point

    double precision, intent(in), VALUE :: y

    coordinate of the desired point

    double precision, intent(in), VALUE :: z

    coordinate of the desired point

    Return Value double precision

    Real number at

abstract interface

  • public subroutine read_id_full_int(this, n, x, y, z, lapse, shift_x, shift_y, shift_z, g_xx, g_xy, g_xz, g_yy, g_yz, g_zz, k_xx, k_xy, k_xz, k_yy, k_yz, k_zz, baryon_density, energy_density, specific_energy, pressure, u_euler_x, u_euler_y, u_euler_z)

    INTERFACE or the SUBROUTINE reading the full \(\mathrm{ID}\)

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(inout) :: this

    idbase object which this PROCEDURE is a member of

    integer, intent(in) :: n
    double precision, intent(in), DIMENSION(:) :: x
    double precision, intent(in), DIMENSION(:) :: y
    double precision, intent(in), DIMENSION(:) :: z
    double precision, intent(inout), DIMENSION(:) :: lapse
    double precision, intent(inout), DIMENSION(:) :: shift_x
    double precision, intent(inout), DIMENSION(:) :: shift_y
    double precision, intent(inout), DIMENSION(:) :: shift_z
    double precision, intent(inout), DIMENSION(:) :: g_xx
    double precision, intent(inout), DIMENSION(:) :: g_xy
    double precision, intent(inout), DIMENSION(:) :: g_xz
    double precision, intent(inout), DIMENSION(:) :: g_yy
    double precision, intent(inout), DIMENSION(:) :: g_yz
    double precision, intent(inout), DIMENSION(:) :: g_zz
    double precision, intent(inout), DIMENSION(:) :: k_xx
    double precision, intent(inout), DIMENSION(:) :: k_xy
    double precision, intent(inout), DIMENSION(:) :: k_xz
    double precision, intent(inout), DIMENSION(:) :: k_yy
    double precision, intent(inout), DIMENSION(:) :: k_yz
    double precision, intent(inout), DIMENSION(:) :: k_zz
    double precision, intent(inout), DIMENSION(:) :: baryon_density
    double precision, intent(inout), DIMENSION(:) :: energy_density
    double precision, intent(inout), DIMENSION(:) :: specific_energy
    double precision, intent(inout), DIMENSION(:) :: pressure
    double precision, intent(inout), DIMENSION(:) :: u_euler_x
    double precision, intent(inout), DIMENSION(:) :: u_euler_y
    double precision, intent(inout), DIMENSION(:) :: u_euler_z

abstract interface

  • public subroutine read_id_hydro_int(this, nx, ny, nz, pos, baryon_density, energy_density, specific_energy, pressure, u_euler)

    INTERFACE or the SUBROUTINE reading the the hydro \(\mathrm{ID}\) needed to compute the constraints on the refined mesh

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(inout) :: this

    idbase object which this PROCEDURE is a member of

    integer, intent(in) :: nx
    integer, intent(in) :: ny
    integer, intent(in) :: nz
    double precision, intent(in), DIMENSION(:,:,:,:) :: pos
    double precision, intent(inout), DIMENSION(:,:,:) :: baryon_density
    double precision, intent(inout), DIMENSION(:,:,:) :: energy_density
    double precision, intent(inout), DIMENSION(:,:,:) :: specific_energy
    double precision, intent(inout), DIMENSION(:,:,:) :: pressure
    double precision, intent(inout), DIMENSION(:,:,:,:) :: u_euler

abstract interface

  • public subroutine read_id_k_int(this, n, x, y, z, k_xx, k_xy, k_xz, k_yy, k_yz, k_zz)

    INTERFACE or the SUBROUTINE reading the components of the extrinsic curvature

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(inout) :: this

    idbase object which this PROCEDURE is a member of

    integer, intent(in) :: n
    double precision, intent(in), DIMENSION(:) :: x
    double precision, intent(in), DIMENSION(:) :: y
    double precision, intent(in), DIMENSION(:) :: z
    double precision, intent(inout), DIMENSION(:) :: k_xx
    double precision, intent(inout), DIMENSION(:) :: k_xy
    double precision, intent(inout), DIMENSION(:) :: k_xz
    double precision, intent(inout), DIMENSION(:) :: k_yy
    double precision, intent(inout), DIMENSION(:) :: k_yz
    double precision, intent(inout), DIMENSION(:) :: k_zz

abstract interface

  • public subroutine read_id_mass_b_int(this, x, y, z, g, baryon_density, gamma_euler)

    INTERFACE or the SUBROUTINE reading the hydro \(\mathrm{ID}\) needed to compute the baryon mass

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(inout) :: this

    Object of class idbase which this PROCEDURE is a member of

    double precision, intent(in) :: x
    double precision, intent(in) :: y
    double precision, intent(in) :: z
    double precision, intent(out), DIMENSION(6) :: g
    double precision, intent(out) :: baryon_density
    double precision, intent(out) :: gamma_euler

abstract interface

  • public subroutine read_id_particles_int(this, n, x, y, z, lapse, shift_x, shift_y, shift_z, g_xx, g_xy, g_xz, g_yy, g_yz, g_zz, baryon_density, energy_density, specific_energy, pressure, u_euler_x, u_euler_y, u_euler_z)

    INTERFACE or the SUBROUTINE reading the hydro \(\mathrm{ID}\) needed to compute the SPH \(\mathrm{ID}\)

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(inout) :: this

    idbase object which this PROCEDURE is a member of

    integer, intent(in) :: n
    double precision, intent(in), DIMENSION(:) :: x
    double precision, intent(in), DIMENSION(:) :: y
    double precision, intent(in), DIMENSION(:) :: z
    double precision, intent(inout), DIMENSION(:) :: lapse
    double precision, intent(inout), DIMENSION(:) :: shift_x
    double precision, intent(inout), DIMENSION(:) :: shift_y
    double precision, intent(inout), DIMENSION(:) :: shift_z
    double precision, intent(inout), DIMENSION(:) :: g_xx
    double precision, intent(inout), DIMENSION(:) :: g_xy
    double precision, intent(inout), DIMENSION(:) :: g_xz
    double precision, intent(inout), DIMENSION(:) :: g_yy
    double precision, intent(inout), DIMENSION(:) :: g_yz
    double precision, intent(inout), DIMENSION(:) :: g_zz
    double precision, intent(inout), DIMENSION(:) :: baryon_density
    double precision, intent(inout), DIMENSION(:) :: energy_density
    double precision, intent(inout), DIMENSION(:) :: specific_energy
    double precision, intent(inout), DIMENSION(:) :: pressure
    double precision, intent(inout), DIMENSION(:) :: u_euler_x
    double precision, intent(inout), DIMENSION(:) :: u_euler_y
    double precision, intent(inout), DIMENSION(:) :: u_euler_z

abstract interface

  • public subroutine read_id_spacetime_int(this, nx, ny, nz, pos, lapse, shift, g, ek)

    INTERFACE or the SUBROUTINE reading the spacetime \(\mathrm{ID}\)

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(inout) :: this

    idbase object which this PROCEDURE is a member of

    integer, intent(in) :: nx
    integer, intent(in) :: ny
    integer, intent(in) :: nz
    double precision, intent(in), DIMENSION(:,:,:,:) :: pos
    double precision, intent(inout), DIMENSION(:,:,:) :: lapse
    double precision, intent(inout), DIMENSION(:,:,:,:) :: shift
    double precision, intent(inout), DIMENSION(:,:,:,:) :: g
    double precision, intent(inout), DIMENSION(:,:,:,:) :: ek

abstract interface

  • public function read_integer_at_pos(this, x, y, z) result(res)

    INTERFACE for a PROCEDURE that returns an INTEGER at a given position

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this

    Object of class idbase which this PROCEDURE is a member of

    double precision, intent(in), VALUE :: x

    coordinate of the desired point

    double precision, intent(in), VALUE :: y

    coordinate of the desired point

    double precision, intent(in), VALUE :: z

    coordinate of the desired point

    Return Value integer

    Integer at

abstract interface

  • public function read_logical_at_pos(this, x, y, z) result(res)

    INTERFACE for a PROCEDURE that returns a LOGICAL at a given position

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this

    Object of class idbase which this PROCEDURE is a member of

    double precision, intent(in), VALUE :: x

    coordinate of the desired point

    double precision, intent(in), VALUE :: y

    coordinate of the desired point

    double precision, intent(in), VALUE :: z

    coordinate of the desired point

    Return Value logical

    Logical at

abstract interface

  • public function return_double(this) result(res)

    INTERFACE for a PROCEDURE that returns a DOUBLE PRECISION

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this

    Return Value double precision

    Real number

abstract interface

  • public function return_double_at_object(this, i_matter) result(res)

    INTERFACE for a PROCEDURE that returns a DOUBLE PRECISION

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this
    integer, intent(in) :: i_matter

    Index of the matter object whose parameter is to return

    Return Value double precision

    Real number. Parameter of the i_matter-th matter object

abstract interface

  • public subroutine return_eos_parameters_int(this, i_matter, eos_params)

    INTERFACE for a PROCEDURE that returns an array containing the parametersf the \(\mathrm{EOS}\) for the matter objects

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this
    integer, intent(in) :: i_matter

    Index of the matter object whose parameter is to return

    double precision, intent(out), DIMENSION(:), ALLOCATABLE :: eos_params

    Array containing the parameters of the \(\mathrm{EOS}\) for the i_matter-th matter object

abstract interface

  • public function return_integer_parameter(this, i_matter) result(res)

    INTERFACE for a PROCEDURE that returns an INTEGER

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this
    integer, intent(in) :: i_matter

    Index of the matter object whose parameter is to return

    Return Value integer

    Real number. Parameter of the i_matter-th matter object

abstract interface

  • public function return_position(this, i_matter) result(res)

    INTERFACE for a PROCEDURE that returns a DOUBLE PRECISION

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this
    integer, intent(in) :: i_matter

    Index of the matter object whose parameter is to return

    Return Value double precision, DIMENSION(3)

    Centers of the matter objects. The first index runs over the matter objects, the second index over .

abstract interface

  • public function return_spatial_extent_int(this, i_matter) result(box)

    INTERFACE to the SUBROUTINE that detects the spatial extent of the matter objects, and returns a 6-dimensional array containing the coordinates of a box centered at the center of the object and containing the system.

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this

    Object of class idbase which this PROCEDURE is a member of

    integer, intent(in) :: i_matter

    Index of the matter object whose string is to return

    Return Value double precision, DIMENSION(6)

    6-dimensional array containing the coordinates of a box containing the physical system.

abstract interface

  • public function return_string_parameter(this, i_matter) result(string)

    INTERFACE for a PROCEDURE that returns a CHARACTER(LEN=:)

    Arguments

    Type IntentOptional Attributes Name
    class(idbase), intent(in) :: this

    idbase object which this PROCEDURE is a member of

    integer, intent(in) :: i_matter

    Index of the matter object whose string is to return

    Return Value character(len=:), ALLOCATABLE


Derived Types

type, public ::  idbase

Represents a generic \(\mathrm{ID}\) for \(\texttt{SPHINCS_BSSN}\) (binary neutron star, rotating star, etc.)

Components

Type Visibility Attributes Name Initial
logical, private :: cold_system

.TRUE. if the system is at zero temperature (no thermal component); .FALSE. otherwise

type(timer), public :: construction_timer

Timer that times the construction of the appropriate object

logical, private :: estimate_length_scale

.TRUE. if a typical length scale equal to the ratio of a field over its gradient should be computed (usually, the field is the pressure); .FALSE. otherwise

procedure, public, POINTER, NOPASS :: finalize_sph_id_ptr

Pointer to a procedure that finalize the \(\mathrm{SPH}\) \(\mathrm{ID}\); for example, correct for the residual ADM linear momentum.

integer, private :: n_matter = 0

Number of matter objects belonging the physical system. For example, n_matter= 2 for a binary system of stars, and n_matter= 1 for a single star or for a binary system of a black hole and a star.

logical, private :: one_lapse

Logical variable that determines if the lapse function , i.e., if the geodesic gauge is to be used

type(surface), public, DIMENSION(:), ALLOCATABLE :: surfaces

Array containing, for each matter object, a set of coordinates of some points modelling the surfaces.

Read more…
type(tabu_eos), public, DIMENSION(:), ALLOCATABLE :: tab_eos

Array containing a tabulated \(\mathrm{EOS}\) for each matter object, when used.

Read more…
logical, private :: zero_shift

Logical variable that determines if the shift

Type-Bound Procedures

procedure , public , NON_OVERRIDABLE :: check_i_matter Interface

Checks that the given index is between 1 and n_matter, included. If not, it stops the execution of the program.

procedure (derived_type_constructor_int) , public :: derived_type_constructor

Constructs a TYPE that extends idbase

procedure , public :: estimate_lengthscale_field Interface

Estimate typical length scales, one per each matter object, by computing , where is a field given as input, and represent a derivative of it. Presently, the derivatives are computed separately along each spatial dimension, as 1D derivatives.

procedure , public , NON_OVERRIDABLE :: get_cold_system Interface

Returns cold_system, the LOGICAL variable that specifies if the system is cold (no thermal component)

procedure , public , NON_OVERRIDABLE :: get_estimate_length_scale Interface

Returns estimate_length_scale, the LOGICAL variable that specifies if a typical length scale, equal to the ratio of a field over its gradient, should be computed

procedure , public , NON_OVERRIDABLE :: get_n_matter Interface

Returns n_matter, the number of matter objects in the physical system

procedure , public , NON_OVERRIDABLE :: get_one_lapse Interface

Returns one_lapse, the LOGICAL variable that determines if the lapse function , i.e., if the geodesic gauge is to be used

procedure , public , NON_OVERRIDABLE :: get_total_spatial_extent Interface

Returns the spatial extent of the physical system considered, as the array of 6 numbers

procedure , public , NON_OVERRIDABLE :: get_zero_shift Interface

Returns zero_shift, the LOGICAL variable that determines if the shift

procedure , public , NON_OVERRIDABLE :: initialize Interface

This PROCEDURE calls the constructor of the idbase-extended type and the SUBROUTINE sanity_check afterwards. It is recommended to use this SUBROUTINE to construct objects of idbase-extended type since the sanity check is performed automatically.

procedure (initialize_id_int) , public :: initialize_id

Initialize the \(\mathrm{ID}\); for example, set up the lattices around the stars for the \(\mathrm{BNS}\) produced with \(\texttt{FUKA}\).

procedure , public :: integrate_baryon_mass_density Interface

Integrates the baryon mass density over a matter object, using spherical coordinates, and computes its radial profile inside the star

procedure (print_summary_int) , public :: print_summary

Prints a summary of the physical properties the system to the standard output and, optionally, to a formatted file whose name is given as optional argument

procedure (read_id_full_int) , public :: read_id_full

Reads the full \(\mathrm{ID}\)

procedure (read_id_hydro_int) , public :: read_id_hydro

Reads the hydro \(\mathrm{ID}\) needed to compute the constraints on the refined mesh

procedure (read_id_k_int) , public :: read_id_k

Reads the components of the extrinsic curvature

procedure (read_id_mass_b_int) , public :: read_id_mass_b

Reads the hydro \(\mathrm{ID}\) needed to compute the baryon mass

procedure (read_id_particles_int) , public :: read_id_particles

Reads the hydro \(\mathrm{ID}\) needed to compute the SPH \(\mathrm{ID}\)

procedure (read_id_spacetime_int) , public :: read_id_spacetime

Reads the spacetime \(\mathrm{ID}\) needed to compute the BSSN variables and constraints

procedure (read_double_at_pos) , public :: read_mass_density

Returns the baryon mass density from the \(\mathrm{ID}\) at the given point

procedure (read_double_at_pos) , public :: read_pressure

Returns the pressure from te \(\mathrm{ID}\) at the given point

procedure (return_double) , public :: return_adm_mass

Returns the ADM mass of the system

procedure (return_position) , public :: return_barycenter

Returns the barycenters (centers of mass) of the matter objects.

procedure (return_position) , public :: return_center

Returns the centers of the matter objects.

procedure (return_string_parameter) , public :: return_eos_name

Returns the name of the \(\mathrm{EOS}\) of the matter objects.

procedure (return_eos_parameters_int) , public :: return_eos_parameters

Returns the identification number of the \(\mathrm{EOS}\) of the matter objects.

Read more…
procedure (return_double_at_object) , public :: return_mass

Returns the masses of the matter objects.

procedure (return_spatial_extent_int) , public :: return_spatial_extent

Returns the spatial extent of the matter objects, returning the array of 6 numbers

procedure , public , NON_OVERRIDABLE :: sanity_check Interface

Checks that n_matter and the sizes returned by return_spatial_extent and get_total_spatial_extent are acceptable. It is called by initialize, after the constructor of the derived type.

procedure , public , NON_OVERRIDABLE :: set_cold_system Interface

Sets cold_system, the LOGICAL variable that specifies if the system is cold (no thermal component)

procedure , public , NON_OVERRIDABLE :: set_estimate_length_scale Interface

Sets estimate_length_scale, the LOGICAL variable that specifies if a typical length scale, equal to the ratio of a field over its gradient, should be computed

procedure , public , NON_OVERRIDABLE :: set_n_matter Interface

Sets n_matter, the number of matter objects in the physical system, to a value

procedure , public , NON_OVERRIDABLE :: set_one_lapse Interface

Sets one_lapse, the LOGICAL variable that determines if the lapse , i.e., if the geodesic gauge is to be used

procedure , public , NON_OVERRIDABLE :: set_zero_shift Interface

Sets zero_shift, the LOGICAL variable that determines if the shift

procedure (read_logical_at_pos) , public :: test_position

Returns .TRUE. if the position has physically acceptable properties, .FALSE. otherwise