diffstarbase Derived Type

type, public, ABSTRACT, extends(idbase) :: diffstarbase

ABSTRACT TYPE for \(\mathrm{DRS}\) \(\mathrm{ID}\) (produced with \(\texttt{LORENE}\), or with \(\texttt{FUKA}\), etc.; or produced with the same tool, but read in different ways, for example by linking to the \(\texttt{LORENE}\) library, or reading the \(\mathrm{ID}\) from a lattice, etc.)


Inherits

type~~diffstarbase~~InheritsGraph type~diffstarbase diffstarbase type~idbase idbase type~diffstarbase->type~idbase timer timer type~idbase->timer construction_timer type~surface surface type~idbase->type~surface surfaces type~tabu_eos tabu_eos type~idbase->type~tabu_eos tab_eos

Inherited by

type~~diffstarbase~~InheritedByGraph type~diffstarbase diffstarbase type~diffstarlorene diffstarlorene type~diffstarlorene->type~diffstarbase

Contents

Source Code


Components

Type Visibility Attributes Name Initial
double precision, public :: adm_mass

ADM mass of the \(\mathrm{DRS}\)

double precision, public :: angular_momentum = 0.0D0

Angular momentum of the \(\mathrm{DRS}\)

double precision, public :: area_radius

Areal (or circumferential) radius of \(\mathrm{DRS}\) [Msun_geo] Note that these is the areal radius of the star in the binary system, which is different than that of an isolated star. The latter is used in the mass-radius diagrams, together with the gravitatonal mass

double precision, public, DIMENSION(3) :: barycenter

Array containing the barycenters of the stars

double precision, public, DIMENSION(:), ALLOCATABLE :: baryon_density

1-D array storing the baryon mass density in the fluid frame [kg m^{-3}]

double precision, public, DIMENSION(3) :: center

Array containing the centers of the stars

type(timer), public :: construction_timer

Timer that times the construction of the appropriate object

double precision, public, DIMENSION(:), ALLOCATABLE :: energy_density

1-D array storing the energy density [kg c^2 m^{-3}]

double precision, public :: energy_density_center

Central energy density

double precision, public :: ent_center

Central enthalpy

character(len=:), public, ALLOCATABLE :: eos

Name of the equation of state (EoS) of star 1

character(len=max_length), public, DIMENSION(1) :: eos_filename

Array of string containing the names of the files containing the \(\mathrm{EOS}\) to be used for each matter object.

integer, public :: eos_id

\(\texttt{SPHINCS_ID}\) identifier for the \(\mathrm{EOS}\) of star 1

character(len=:), public, ALLOCATABLE :: eos_table

String containing the path to the files containing the table of the \(\mathrm{EOS}\)

double precision, public :: f_isco

Orbital frequency of the Innermost Stable Circular Orbit (ISCO)

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.

double precision, public, DIMENSION(:), ALLOCATABLE :: g_xx

1-D array storing the xx component of the spatial metric [pure number]

double precision, public, DIMENSION(:), ALLOCATABLE :: g_xy

1-D array storing the xy component of the spatial metric [pure number]

double precision, public, DIMENSION(:), ALLOCATABLE :: g_xz

1-D array storing the xz component of the spatial metric [pure number]

double precision, public, DIMENSION(:), ALLOCATABLE :: g_yy

1-D array storing the yy component of the spatial metric [pure number]

double precision, public, DIMENSION(:), ALLOCATABLE :: g_yz

1-D array storing the yz component of the spatial metric [pure number]

double precision, public, DIMENSION(:), ALLOCATABLE :: g_zz

1-D array storing the zz component of the spatial metric [pure number]

double precision, public :: gamma

Single polytrope: polytropic index

double precision, public :: gamma0

Piecewise polytrope: polytropic index

double precision, public :: gamma1

Piecewise polytrope: polytropic index

double precision, public :: gamma2

Piecewise polytrope: polytropic index

double precision, public :: gamma3

Piecewise polytrope: polytropic index

double precision, public :: grv2

Error on the virial identity .

See Section 3.5 in Gourgoulhon et al, Astron.Astrophys.349:851,1999.

double precision, public :: grv3

Error on the virial identity .

See Section 3.5 in Gourgoulhon et al, Astron.Astrophys.349:851,1999 .

The error is computed as the integral defined by Eq. (43) of Gourgoulhon and Bonazzola, Class. Quantum Grav. 11, 443 (1994) divided by the integral of the matter terms.

double precision, public, DIMENSION(:), ALLOCATABLE :: k_xx

1-D array storing the xx component of the extrinsic curvature [c/MSun_geo]

double precision, public, DIMENSION(:), ALLOCATABLE :: k_xy

1-D array storing the xy component of the extrinsic curvature [c/MSun_geo]

double precision, public, DIMENSION(:), ALLOCATABLE :: k_xz

1-D array storing the xz component of the extrinsic curvature [c/MSun_geo]

double precision, public, DIMENSION(:), ALLOCATABLE :: k_yy

1-D array storing the yy component of the extrinsic curvature [c/MSun_geo]

double precision, public, DIMENSION(:), ALLOCATABLE :: k_yz

1-D array storing the yz component of the extrinsic curvature [c/MSun_geo]

double precision, public, DIMENSION(:), ALLOCATABLE :: k_zz

1-D array storing the zz component of the extrinsic curvature [c/MSun_geo]

double precision, public :: kappa

Single polytrope: polytropic constant [pure number]

double precision, public :: kappa0

Piecewise polytrope: polytropic constant [pure number]

double precision, public :: kappa1

Piecewise polytrope: polytropic constant [pure number]

double precision, public :: kappa2

Piecewise polytrope: polytropic constant [pure number]

double precision, public :: kappa3

Piecewise polytrope: polytropic constant [pure number]

double precision, public, DIMENSION(:), ALLOCATABLE :: lapse

1-D array storing the lapse function

double precision, public :: logP1

Piecewise polytrope: Base 10 exponent of the pressure at the first fiducial density (between and )

double precision, public :: logRho0

Piecewise polytrope: Base 10 exponent of the first fiducial density (between and )

double precision, public :: logRho1

Piecewise polytrope: Base 10 exponent of the second fiducial density (between and )

double precision, public :: logRho2

Piecewise polytrope: Base 10 exponent of the third fiducial density (between and )

double precision, public :: mass

Baryonic mass of \(\mathrm{DRS}\)

double precision, public :: mass_grav

Gravitational mass of \(\mathrm{DRS}\)

double precision, public :: nbar_center

Central baryon number density

integer, public :: npeos

Piecewise polytrope: Number of polytropic pieces

double precision, public :: omega_c

Central angular velocity

double precision, public, DIMENSION(:), ALLOCATABLE :: pressure

1-D array storing the pressure

double precision, public :: pressure_center

Central pressure

double precision, public :: r_circ

Circumferential radius

double precision, public :: r_eq

Equatorial radius at

double precision, public :: r_eq_3pi2

Equatorial radius at

double precision, public :: r_eq_pi

Equatorial radius at

double precision, public :: r_eq_pi2

Equatorial radius at

double precision, public :: r_isco

Radius of the Innermost Stable Circular Orbit (ISCO)

double precision, public :: r_mean

Mean radius

double precision, public :: r_pole

Polar radius

double precision, public :: r_ratio

Ratio r_pole/r_eq

double precision, public, DIMENSION(6) :: radii
double precision, public :: redshift_eqb

Backward redshift factor at equator

double precision, public :: redshift_eqf

Forward redshift factor at equator

double precision, public :: redshift_pole

Redshift factor at North pole

double precision, public :: rho_center

Central baryon mass density

double precision, public, DIMENSION(:), ALLOCATABLE :: shift_x

1-D array storing the x component of the shift vector [c]

double precision, public, DIMENSION(:), ALLOCATABLE :: shift_y

1-D array storing the y component of the shift vector [c]

double precision, public, DIMENSION(:), ALLOCATABLE :: shift_z

1-D array storing the z component of the shift vector [c]

double precision, public :: specific_angular_momentum_isco

Specific angular momentum of a test particle at the Innermost Stable Circular Orbit (ISCO)

double precision, public, DIMENSION(:), ALLOCATABLE :: specific_energy

1-D array storing the specific internal energy [c^2]

double precision, public :: specific_energy_center

Central specific energy

double precision, public :: specific_energy_isco

Specific energy of a test particle at the Innermost Stable Circular Orbit (ISCO)

double precision, public :: surface_area

Surface area

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

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

type(tabu_eos), public, DIMENSION(:), ALLOCATABLE :: tab_eos

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

double precision, public :: tsw

Ratio between the rotational kinetic and gravitatial potential energy .

See Section 6 in Gourgoulhon et al, Astron.Astrophys.349:851,1999

For axisymmetric configurations as those considered here, the threshold for dynamical bar-mode instability is [Masaru Shibata et al 2000 ApJ 542 453]. See also Manca et al., Classical and Quantum Gravity, 24, 171, Sec.3.3 in Galeazzi et al., Astron Astrophys 541:A156, and Sec.5.1.3 in Paschalidis, V., Stergioulas, N., Rotating stars in relativity. Living Rev Relativ 20, 7 (2017).

double precision, public, DIMENSION(:), ALLOCATABLE :: v_euler_x

1-D array storing the x component of the fluid 3-velocity with respect to

double precision, public, DIMENSION(:), ALLOCATABLE :: v_euler_y

1-D array storing the y component of the fluid 3-velocity with respect to

double precision, public, DIMENSION(:), ALLOCATABLE :: v_euler_z

1-D array storing the z component of the fluid 3-velocity with respect to


Type-Bound Procedures

procedure, public, NON_OVERRIDABLE :: check_i_matter

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

  • 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

procedure(derived_type_constructor_int), public, deferred :: derived_type_constructor

Constructs a TYPE that extends idbase

  • subroutine derived_type_constructor_int(derived_type, filename, eos_filenames) Prototype

    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

procedure, public :: estimate_lengthscale_field

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.

  • 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

procedure, public :: get_angular_momentum

  • interface

    public pure module function get_angular_momentum(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_area_radius

Returns area_radius

  • interface

    public pure module function get_area_radius(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public, NON_OVERRIDABLE :: get_cold_system

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

  • 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

procedure, public :: get_energy_density_center

  • interface

    public pure module function get_energy_density_center(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_ent_center

Returns ent_center

  • interface

    public pure module function get_ent_center(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure(get_eos_id_int), public, deferred :: get_eos_id

Returns an integer that identifies the equation of state

  • function get_eos_id_int(this) Prototype

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value integer

procedure, public, NON_OVERRIDABLE :: get_estimate_length_scale

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

  • 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

procedure, public :: get_f_isco

Returns f_isco

  • interface

    public pure module function get_f_isco(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_gamma

Returns gamma

  • interface

    public pure module function get_gamma(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_gamma0

Returns gamma0

  • interface

    public pure module function get_gamma0(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_gamma1

Returns gamma1

  • interface

    public pure module function get_gamma1(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_gamma2

Returns gamma2

  • interface

    public pure module function get_gamma2(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_gamma3

Returns gamma3

  • interface

    public pure module function get_gamma3(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_grv2

Returns grv2

  • interface

    public pure module function get_grv2(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_grv3

Returns grv3

  • interface

    public pure module function get_grv3(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_kappa

Returns kappa

  • interface

    public pure module function get_kappa(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_kappa0

Returns kappa0

  • interface

    public pure module function get_kappa0(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_kappa1

Returns kappa1

  • interface

    public pure module function get_kappa1(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_kappa2

Returns kappa2

  • interface

    public pure module function get_kappa2(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_kappa3

Returns kappa3

  • interface

    public pure module function get_kappa3(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_logP1

Returns logP1

  • interface

    public pure module function get_logP1(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_logRho0

Returns logRho0

  • interface

    public pure module function get_logRho0(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_logRho1

Returns logRho1

  • interface

    public pure module function get_logRho1(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_logRho2

Returns logRho2

  • interface

    public pure module function get_logRho2(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_mass_grav

Returns mass_grav

  • interface

    public pure module function get_mass_grav(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public, NON_OVERRIDABLE :: get_n_matter

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

  • 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

procedure, public :: get_nbar_center

Returns nbar_center

  • interface

    public pure module function get_nbar_center(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_npeos

Returns npeos

  • interface

    public pure module function get_npeos(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value integer

procedure, public :: get_omega_c

Returns omega_c

Returns mass

  • interface

    public pure module function get_omega_c(this)

    Returns omega_c

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public, NON_OVERRIDABLE :: get_one_lapse

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

  • 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

procedure, public :: get_pressure_center

Returns pressure_center

Returns eos

  • interface

    public pure module function get_pressure_center(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_r_circ

Returns r_circ

  • interface

    public pure module function get_r_circ(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_r_eq

Returns r_eq

  • interface

    public pure module function get_r_eq(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_r_eq_3pi2

Returns r_eq_3pi2

  • interface

    public pure module function get_r_eq_3pi2(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_r_eq_pi

Returns r_eq_pi

  • interface

    public pure module function get_r_eq_pi(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_r_eq_pi2

Returns r_eq_pi2

  • interface

    public pure module function get_r_eq_pi2(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_r_isco

Returns r_isco

  • interface

    public pure module function get_r_isco(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_r_mean

Returns r_mean

  • interface

    public pure module function get_r_mean(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_r_pole

Returns r_pole

  • interface

    public pure module function get_r_pole(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_r_ratio

Returns r_ratio

  • interface

    public pure module function get_r_ratio(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_rho_center

Returns rho_center

  • interface

    public pure module function get_rho_center(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_specific_angular_momentum_isco

  • interface

    public pure module function get_specific_angular_momentum_isco(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_specific_energy_center

  • interface

    public pure module function get_specific_energy_center(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_specific_energy_isco

  • interface

    public pure module function get_specific_energy_isco(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: get_surface_area

Returns surface_area

  • interface

    public pure module function get_surface_area(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public, NON_OVERRIDABLE :: get_total_spatial_extent

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

  • 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.

procedure, public :: get_tsw

Returns tsw

  • interface

    public pure module function get_tsw(this)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public, NON_OVERRIDABLE :: get_zero_shift

Returns zero_shift, the LOGICAL variable that determines if the shift

  • 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

procedure, public, NON_OVERRIDABLE :: initialize

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.

  • 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

procedure(initialize_id_int), public, deferred :: initialize_id

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

  • subroutine initialize_id_int(this, flag, switch) Prototype

    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

procedure, public :: integrate_baryon_mass_density

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

  • 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

procedure, public :: print_summary => print_summary_drs

  • interface

    public module subroutine print_summary_drs(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(diffstarbase), intent(in) :: this
    character(len=*), intent(inout), optional :: filename

    Name of the formatted file to print the summary to

procedure(read_id_full_int), public, deferred :: read_id_full

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

  • 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) Prototype

    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

procedure(read_id_hydro_int), public, deferred :: read_id_hydro

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

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

    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

procedure(read_id_k_int), public, deferred :: read_id_k

Reads the components of the extrinsic curvature

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

    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

procedure(read_id_mass_b_int), public, deferred :: read_id_mass_b

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

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

    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

procedure(read_id_particles_int), public, deferred :: read_id_particles

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

  • 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) Prototype

    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

procedure(read_id_spacetime_int), public, deferred :: read_id_spacetime

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

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

    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

procedure(read_double_at_pos), public, deferred :: read_mass_density

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

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

    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

procedure(read_double_at_pos), public, deferred :: read_pressure

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

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

    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

procedure, public :: return_adm_mass => get_adm_mass

  • interface

    public module function get_adm_mass(this)

    Returns 0 (the ADM mass is not necessarily known for this TYPE)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    Return Value double precision

procedure, public :: return_barycenter => get_barycenter

  • interface

    public module function get_barycenter(this, i_matter)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    integer, intent(in) :: i_matter

    Index of the matter object whose parameter is to return

    Return Value double precision, DIMENSION(3)

procedure, public :: return_center => get_center

  • interface

    public module function get_center(this, i_matter)

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    integer, intent(in) :: i_matter

    Index of the matter object whose parameter is to return

    Return Value double precision, DIMENSION(3)

procedure, public :: return_eos_name => get_eos

  • interface

    public module function get_eos(this, i_matter)

    Arguments

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

    diffstarbase 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

procedure(return_eos_parameters_int), public, deferred :: return_eos_parameters

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

  • subroutine return_eos_parameters_int(this, i_matter, eos_params) Prototype

    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

procedure, public :: return_mass => get_mass

  • interface

    public module function get_mass(this, i_matter)

    Returns mass

    Arguments

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

    diffstarbase object which this PROCEDURE is a member of

    integer, intent(in) :: i_matter

    Return Value double precision

procedure, public :: return_spatial_extent => get_radii

  • interface

    public module function get_radii(this, i_matter)

    Arguments

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

    diffstarbase 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 double precision, DIMENSION(6)

procedure, public, NON_OVERRIDABLE :: sanity_check

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.

  • 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

procedure, public, NON_OVERRIDABLE :: set_cold_system

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

  • 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

procedure, public, NON_OVERRIDABLE :: set_estimate_length_scale

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

  • 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

procedure, public, NON_OVERRIDABLE :: set_n_matter

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

  • 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

procedure, public, NON_OVERRIDABLE :: set_one_lapse

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

  • 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

procedure, public, NON_OVERRIDABLE :: set_zero_shift

Sets zero_shift, the LOGICAL variable that determines if the shift

  • 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

procedure(read_logical_at_pos), public, deferred :: test_position

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

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

    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

Source Code

  TYPE, ABSTRACT, EXTENDS(idbase):: diffstarbase
  !# ABSTRACT TYPE for |drs| |id| (produced with |lorene|, or with
  !  |fuka|, etc.; or produced with the same tool, but read in different ways,
  !  for example by linking to the |lorene| library, or reading the |id| from
  !  a lattice, etc.)


    !-------------------------------!
    !--  Parameters of the |drs|  --!
    !-------------------------------!

    DOUBLE PRECISION:: omega_c
    !! Central angular velocity \([{\rm rad/s}]\)

    DOUBLE PRECISION:: mass
    !! Baryonic mass of |drs| \([M_\odot]\)

    DOUBLE PRECISION:: adm_mass
    !! ADM mass of the |drs| \([M_\odot]\)

    DOUBLE PRECISION:: mass_grav
    !! Gravitational mass of |drs| \([M_\odot]\)

    DOUBLE PRECISION:: angular_momentum= 0.0D0
    !! Angular momentum of the |drs| \([G M_\odot^2/c]\)

    DOUBLE PRECISION:: tsw
    !# Ratio between the rotational kinetic and gravitatial potential energy
    !  \(T/|W|\).
    !
    !  See Section 6 in
    !  [Gourgoulhon et al, Astron.Astrophys.349:851,1999](https://arxiv.org/abs/astro-ph/9907225v1){:target="_blank"}
    !
    !  For axisymmetric configurations as those considered here, the
    !  threshold for dynamical bar-mode instability is \(T/|W|\sim 0.25\)
    !  [[Masaru Shibata et al 2000 ApJ 542 453](https://arxiv.org/pdf/astro-ph/0005378.pdf){:target="_blank"}].
    !  See also [Manca et al., Classical and Quantum Gravity, 24, 171](https://arxiv.org/abs/0705.1826){:target="_blank"}, Sec.3.3 in [Galeazzi et al., Astron Astrophys 541:A156](https://arxiv.org/abs/1101.2664){:target="_blank"}, and Sec.5.1.3 in [Paschalidis, V., Stergioulas, N., _Rotating stars in relativity_. Living Rev Relativ 20, 7 (2017)](https://link.springer.com/article/10.1007%2Fs41114-017-0008-x){:target="_blank"}.

    DOUBLE PRECISION:: grv2
    !# Error on the virial identity \({\rm GRV2}\).
    !
    !  See Section 3.5 in
    !  [Gourgoulhon et al, Astron.Astrophys.349:851,1999](https://arxiv.org/abs/astro-ph/9907225v1){:target="_blank"}.

    DOUBLE PRECISION:: grv3
    !# Error on the virial identity \({\rm GRV3}\).
    !
    !  See Section 3.5 in
    !  [Gourgoulhon et al, Astron.Astrophys.349:851,1999](https://arxiv.org/abs/astro-ph/9907225v1){:target="_blank"} .
    !
    !  The error is computed as the integral defined
    !  by Eq. (43) of [Gourgoulhon and Bonazzola, Class. Quantum Grav. 11, 443 (1994)](https://iopscience.iop.org/article/10.1088/0264-9381/11/2/015?pageTitle=IOPscience){:target="_blank"}
    !  divided by the integral of the matter terms.

    DOUBLE PRECISION, DIMENSION(3):: center
    !# Array containing the centers of the stars
    !  @todo add details

    DOUBLE PRECISION, DIMENSION(3):: barycenter
    !# Array containing the barycenters of the stars
    !  @todo add details

    DOUBLE PRECISION, DIMENSION(6):: radii

    DOUBLE PRECISION:: r_circ
    !# Circumferential radius

    DOUBLE PRECISION:: r_mean
    !# Mean radius

    DOUBLE PRECISION:: r_eq
    !# Equatorial radius at \(\phi=0\)

    DOUBLE PRECISION:: r_eq_pi2
    !# Equatorial radius at \(\phi=\dfrac{\pi}{2}\)

    DOUBLE PRECISION:: r_eq_pi
    !# Equatorial radius at \(\phi=\pi\)

    DOUBLE PRECISION:: r_eq_3pi2
    !# Equatorial radius at \(\phi=\dfrac{3\pi}{2}\)

    DOUBLE PRECISION:: r_pole
    !# Polar radius

    DOUBLE PRECISION:: r_ratio
    !# Ratio [[diffstarbase:r_pole]]/[[diffstarbase:r_eq]]

    DOUBLE PRECISION:: r_isco
    !# Radius of the Innermost Stable Circular Orbit (ISCO)

    DOUBLE PRECISION:: f_isco
    !# Orbital frequency of the Innermost Stable Circular Orbit (ISCO)

    DOUBLE PRECISION:: specific_energy_isco
    !# Specific energy of a test particle at the Innermost Stable Circular
    !  Orbit (ISCO)

    DOUBLE PRECISION:: specific_angular_momentum_isco
    !# Specific angular momentum of a test particle at the Innermost Stable
    !  Circular Orbit (ISCO)

    DOUBLE PRECISION:: surface_area
    !# Surface area

    DOUBLE PRECISION:: area_radius
    !# Areal (or circumferential) radius of |drs| [Msun_geo]
    !  Note that these is the areal radius of the star in the binary system,
    !  which is different than that of an isolated star. The latter is used
    !  in the mass-radius diagrams, together with the gravitatonal mass

    DOUBLE PRECISION:: ent_center
    !! Central enthalpy \([c^2]\)

    DOUBLE PRECISION:: nbar_center
    !! Central baryon number density \([L_\odot^{-3}]\)

    DOUBLE PRECISION:: rho_center
    !! Central baryon mass density \([M_\odot L_\odot^{-3}]\)

    DOUBLE PRECISION:: energy_density_center
    !! Central energy density \([M_\odot c^2 L_\odot^{-3}]\)

    DOUBLE PRECISION:: specific_energy_center
    !! Central specific energy \([c^2]\)

    DOUBLE PRECISION:: pressure_center
    !! Central pressure \([M_\odot c^2 L_\odot^{-3}]\)

    DOUBLE PRECISION:: redshift_eqf
    !! Forward redshift factor at equator

    DOUBLE PRECISION:: redshift_eqb
    !! Backward redshift factor at equator

    DOUBLE PRECISION:: redshift_pole
    !! Redshift factor at North pole

    CHARACTER(LEN=:), ALLOCATABLE:: eos
    !! Name of the equation of state (EoS) of star 1

    INTEGER:: eos_id
    !! |sphincsid| identifier for the |eos| of star 1


    !
    !-- Parameters of single polytropic equations of state for the two NSs
    !

    DOUBLE PRECISION:: gamma
    !! Single polytrope: polytropic index

    DOUBLE PRECISION:: kappa
    !! Single polytrope: polytropic constant [pure number]

    !
    !-- Parameters of the piecewise polytropic equation of state for NS 1
    !

    INTEGER:: npeos
    !! Piecewise polytrope: Number of polytropic pieces

    DOUBLE PRECISION:: gamma0
    !! Piecewise polytrope: polytropic index \(\gamma_0\)

    DOUBLE PRECISION:: gamma1
    !! Piecewise polytrope: polytropic index \(\gamma_1\)

    DOUBLE PRECISION:: gamma2
    !! Piecewise polytrope: polytropic index \(\gamma_2\)

    DOUBLE PRECISION:: gamma3
    !! Piecewise polytrope: polytropic index \(\gamma_3\)

    DOUBLE PRECISION:: kappa0
    !# Piecewise polytrope: polytropic constant \(\kappa_0\)
    !  [pure number]

    DOUBLE PRECISION:: kappa1
    !# Piecewise polytrope: polytropic constant \(\kappa_1\)
    !  [pure number]

    DOUBLE PRECISION:: kappa2
    !# Piecewise polytrope: polytropic constant \(\kappa_2\)
    !  [pure number]

    DOUBLE PRECISION:: kappa3
    !# Piecewise polytrope: polytropic constant \(\kappa_3\)
    !  [pure number]

    DOUBLE PRECISION:: logP1
    !# Piecewise polytrope: Base 10 exponent of the pressure at the first
    !  fiducial density (between \(\gamma_0\) and \(\gamma_1\))
    !  \([{\rm dyne/cm^2}]\)

    DOUBLE PRECISION:: logRho0
    !# Piecewise polytrope: Base 10 exponent of the first fiducial density
    !  (between \(\gamma_0\) and \(\gamma_1\)) \([{\rm g/cm^3}]\)

    DOUBLE PRECISION:: logRho1
    !# Piecewise polytrope: Base 10 exponent of the second fiducial density
    !  (between \(\gamma_1\) and \(\gamma_2\)) \([{\rm g/cm^3}]\)

    DOUBLE PRECISION:: logRho2
    !# Piecewise polytrope: Base 10 exponent of the third fiducial density
    !  (between \(\gamma_2\) and \(\gamma_3\)) \([{\rm g/cm^3}]\)

    CHARACTER(LEN=max_length), DIMENSION(1):: eos_filename
    !# Array of string containing the names of the files containing the |eos|
    !  to be used for each matter object.

    CHARACTER(LEN=:), ALLOCATABLE:: eos_table
    !# String containing the path to the files containing the table of the |eos|


    !
    !-- Spacetime fields
    !

    !> 1-D array storing the lapse function
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: lapse
    !> 1-D array storing the x component of the shift vector [c]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: shift_x
    !> 1-D array storing the y component of the shift vector [c]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: shift_y
    !> 1-D array storing the z component of the shift vector [c]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: shift_z
    !> 1-D array storing the xx component of the spatial metric [pure number]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: g_xx
    !> 1-D array storing the xy component of the spatial metric [pure number]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: g_xy
    !> 1-D array storing the xz component of the spatial metric [pure number]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: g_xz
    !> 1-D array storing the yy component of the spatial metric [pure number]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: g_yy
    !> 1-D array storing the yz component of the spatial metric [pure number]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: g_yz
    !> 1-D array storing the zz component of the spatial metric [pure number]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: g_zz
    !& 1-D array storing the xx component of the extrinsic curvature
    !  [c/MSun_geo]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: k_xx
    !& 1-D array storing the xy component of the extrinsic curvature
    !  [c/MSun_geo]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: k_xy
    !& 1-D array storing the xz component of the extrinsic curvature
    !  [c/MSun_geo]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: k_xz
    !& 1-D array storing the yy component of the extrinsic curvature
    !  [c/MSun_geo]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: k_yy
    !& 1-D array storing the yz component of the extrinsic curvature
    !  [c/MSun_geo]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: k_yz
    !& 1-D array storing the zz component of the extrinsic curvature
    !  [c/MSun_geo]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: k_zz

    !
    !-- Hydro fields
    !

    !> 1-D array storing the baryon mass density in the fluid frame [kg m^{-3}]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: baryon_density
    !> 1-D array storing the energy density [kg c^2 m^{-3}]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: energy_density
    !> 1-D array storing the specific internal energy [c^2]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: specific_energy
    !> 1-D array storing the pressure
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: pressure
    !> 1-D array storing the x component of the fluid 3-velocity with respect to
    !  the Eulerian observer [c]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: v_euler_x
    !> 1-D array storing the y component of the fluid 3-velocity with respect to
    !  the Eulerian observer [c]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: v_euler_y
    !> 1-D array storing the z component of the fluid 3-velocity with respect to
    !  the Eulerian observer [c]
    DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: v_euler_z


    CONTAINS


    !-------------------!
    !--  SUBROUTINES  --!
    !-------------------!


    PROCEDURE(get_eos_id_int), DEFERRED:: get_eos_id
    !! Returns an integer that identifies the equation of state


    !-----------------!
    !--  FUNCTIONS  --!
    !-----------------!


    !
    !-- FUNCTIONS that access PRIVATE member variables
    !

    PROCEDURE:: return_mass                 => get_mass
    PROCEDURE:: return_adm_mass             => get_adm_mass
    PROCEDURE:: return_center               => get_center
    PROCEDURE:: return_barycenter           => get_barycenter
    PROCEDURE:: return_eos_name             => get_eos
    PROCEDURE:: return_spatial_extent       => get_radii
    PROCEDURE:: print_summary               => print_summary_drs


    PROCEDURE, PUBLIC:: get_omega_c
    !! Returns [[diffstarbase:omega_c]]
    !PROCEDURE, PUBLIC:: get_mass
    !! Returns [[diffstarbase:mass]]
    PROCEDURE, PUBLIC:: get_mass_grav
    !! Returns [[diffstarbase:mass_grav]]
    PROCEDURE, PUBLIC:: get_angular_momentum
    !! Returns [[diffstarbase:angular_momentum]]
    PROCEDURE, PUBLIC:: get_tsw
    !! Returns [[diffstarbase:tsw]]
    PROCEDURE, PUBLIC:: get_grv2
    !! Returns [[diffstarbase:grv2]]
    PROCEDURE, PUBLIC:: get_grv3
    !! Returns [[diffstarbase:grv3]]
    PROCEDURE, PUBLIC:: get_r_circ
    !! Returns [[diffstarbase:r_circ]]
    PROCEDURE, PUBLIC:: get_r_mean
    !! Returns [[diffstarbase:r_mean]]
    PROCEDURE, PUBLIC:: get_r_eq
    !! Returns [[diffstarbase:r_eq]]
    PROCEDURE, PUBLIC:: get_r_eq_pi2
    !! Returns [[diffstarbase:r_eq_pi2]]
    PROCEDURE, PUBLIC:: get_r_eq_pi
    !! Returns [[diffstarbase:r_eq_pi]]
    PROCEDURE, PUBLIC:: get_r_eq_3pi2
    !! Returns [[diffstarbase:r_eq_3pi2]]
    PROCEDURE, PUBLIC:: get_r_pole
    !! Returns [[diffstarbase:r_pole]]
    PROCEDURE, PUBLIC:: get_r_ratio
    !! Returns [[diffstarbase:r_ratio]]
    PROCEDURE, PUBLIC:: get_r_isco
    !! Returns [[diffstarbase:r_isco]]
    PROCEDURE, PUBLIC:: get_f_isco
    !! Returns [[diffstarbase:f_isco]]
    PROCEDURE, PUBLIC:: get_specific_energy_isco
    !! Returns [[diffstarbase:specific_energy_isco]]
    PROCEDURE, PUBLIC:: get_specific_angular_momentum_isco
    !! Returns [[diffstarbase:specific_angular_momentum_isco]]
    PROCEDURE, PUBLIC:: get_surface_area
    !! Returns [[diffstarbase:surface_area]]
    PROCEDURE, PUBLIC:: get_area_radius
    !! Returns [[diffstarbase:area_radius]]
    PROCEDURE, PUBLIC:: get_ent_center
    !! Returns [[diffstarbase:ent_center]]
    PROCEDURE, PUBLIC:: get_nbar_center
    !! Returns [[diffstarbase:nbar_center]]
    PROCEDURE, PUBLIC:: get_rho_center
    !! Returns [[diffstarbase:rho_center]]
    PROCEDURE, PUBLIC:: get_energy_density_center
    !! Returns [[diffstarbase:energy_density_center]]
    PROCEDURE, PUBLIC:: get_specific_energy_center
    !! Returns [[diffstarbase:specific_energy_center]]
    PROCEDURE, PUBLIC:: get_pressure_center
    !! Returns [[diffstarbase:pressure_center]]
    !PROCEDURE, PUBLIC:: get_eos
    !! Returns [[diffstarbase:eos]]

    !
    !-- PROCEDURES to be used for single polytropic EOS
    !
    PROCEDURE, PUBLIC:: get_gamma
    !! Returns [[diffstarbase:gamma]]
    PROCEDURE, PUBLIC:: get_kappa
    !! Returns [[diffstarbase:kappa]]

    !
    !-- PROCEDURES to be used for piecewise polytropic EOS
    !
    PROCEDURE, PUBLIC:: get_npeos
    !! Returns [[diffstarbase:npeos]]
    PROCEDURE, PUBLIC:: get_gamma0
    !! Returns [[diffstarbase:gamma0]]
    PROCEDURE, PUBLIC:: get_gamma1
    !! Returns [[diffstarbase:gamma1]]
    PROCEDURE, PUBLIC:: get_gamma2
    !! Returns [[diffstarbase:gamma2]]
    PROCEDURE, PUBLIC:: get_gamma3
    !! Returns [[diffstarbase:gamma3]]
    PROCEDURE, PUBLIC:: get_kappa0
    !! Returns [[diffstarbase:kappa0]]
    PROCEDURE, PUBLIC:: get_kappa1
    !! Returns [[diffstarbase:kappa1]]
    PROCEDURE, PUBLIC:: get_kappa2
    !! Returns [[diffstarbase:kappa2]]
    PROCEDURE, PUBLIC:: get_kappa3
    !! Returns [[diffstarbase:kappa3]]
    PROCEDURE, PUBLIC:: get_logP1
    !! Returns [[diffstarbase:logP1]]
    PROCEDURE, PUBLIC:: get_logRho0
    !! Returns [[diffstarbase:logRho0]]
    PROCEDURE, PUBLIC:: get_logRho1
    !! Returns [[diffstarbase:logRho1]]
    PROCEDURE, PUBLIC:: get_logRho2
    !! Returns [[diffstarbase:logRho2]]


  END TYPE diffstarbase