read Submodule

Implementation of the methods of TYPE bnsfuka that read \(\mathrm{BNS}\) data using \(\texttt{FUKA}\)

FT 09.02.2022



Uses

  • module~~read~2~~UsesGraph module~read~2 read module~bns_fuka bns_fuka module~read~2->module~bns_fuka module~utility utility module~read~2->module~utility module~bns_fuka->module~utility iso_c_binding iso_c_binding module~bns_fuka->iso_c_binding mesh_refinement mesh_refinement module~bns_fuka->mesh_refinement module~bns_base bns_base module~bns_fuka->module~bns_base module~id_base id_base module~bns_fuka->module~id_base timing timing module~bns_fuka->timing constants constants module~utility->constants matrix matrix module~utility->matrix module~bns_base->module~utility module~bns_base->module~id_base module~id_base->module~utility module~id_base->timing

Contents


Module Procedures

module procedure is_hydro_positive module function is_hydro_positive(this, x, y, z) result(res)

Return 1 if the energy density is nonpositive or if the specific energy is nonpositive, or if the pressure is nonpositive at the specified point

Read more…

Arguments

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

bnsfuka object 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

.TRUE. if the energy density or the specific energy or the pressure are negative, .FALSE. otherwise

module procedure read_fuka_id_full module subroutine read_fuka_id_full(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)

Stores the \(\mathrm{ID}\) in non-bnsfuka-member arrays with the same shape as the bnsfuka member arrays

Read more…

Arguments

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

bnsfuka 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

module procedure read_fuka_id_hydro module subroutine read_fuka_id_hydro(this, nx, ny, nz, pos, baryon_density, energy_density, specific_energy, pressure, u_euler)

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

Read more…

Arguments

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

bnsfuka 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

module procedure read_fuka_id_k module subroutine read_fuka_id_k(this, n, x, y, z, k_xx, k_xy, k_xz, k_yy, k_yz, k_zz)

Stores the components of the extrinsic curvature in arrays

Read more…

Arguments

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

bnsfuka 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

module procedure read_fuka_id_mass_b module subroutine read_fuka_id_mass_b(this, x, y, z, g, baryon_density, gamma_euler)

Stores the hydro \(\mathrm{ID}\) in the arrays needed to compute the baryon mass, storing it to variables (not arrays as the others SUBROUTINES in this SUBMODULE).

Read more…

Arguments

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

bnsfuka object 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

module procedure read_fuka_id_member module subroutine read_fuka_id_member(this, n, x, y, z)

Stores the \(\mathrm{ID}\) in the bnsfuka member arrays

Read more…

Arguments

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

bnsfuka 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

module procedure read_fuka_id_particles module subroutine read_fuka_id_particles(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)

Stores the hydro \(\mathrm{ID}\) in the arrays needed to compute the \(\mathrm{SPH}\) \(\mathrm{ID}\)

Read more…

Arguments

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

bnsfuka object which this PROCEDURE is a member of

integer, intent(in) :: n
real(kind=C_DOUBLE), intent(in), DIMENSION(:) :: x
real(kind=C_DOUBLE), intent(in), DIMENSION(:) :: y
real(kind=C_DOUBLE), 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

module procedure read_fuka_id_spacetime module subroutine read_fuka_id_spacetime(this, nx, ny, nz, pos, lapse, shift, g, ek)

Stores the spacetime \(\mathrm{ID}\) in multi-dimensional arrays needed to compute the BSSN variables and constraints

Read more…

Arguments

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

bnsfuka 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

module procedure read_fuka_mass_density module function read_fuka_mass_density(this, x, y, z) result(res)

Returns the \(\texttt{FUKA}\) mass density at the point given as argument, in units of .

Read more…

Arguments

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

bnsfuka object 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

Baryon mass density at

module procedure read_fuka_pressure module function read_fuka_pressure(this, x, y, z) result(res)

Returns the \(\texttt{FUKA}\) pressure at the point given as argument, in units of .

Read more…

Arguments

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

bnslorene object 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

Pressure at

module procedure read_fuka_spatial_metric module function read_fuka_spatial_metric(this, x, y, z) result(res)

Returns the \(\texttt{FUKA}\) conformal factor to the 4th power, equal to the diagonal components of the conformally flat spatial ADM metric.

Read more…

Arguments

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

bnsfuka object which this PROCEDURE is a member of

real(kind=C_DOUBLE), intent(in), VALUE :: x

coordinate of the desired point

real(kind=C_DOUBLE), intent(in), VALUE :: y

coordinate of the desired point

real(kind=C_DOUBLE), intent(in), VALUE :: z

coordinate of the desired point

Return Value real(kind=C_DOUBLE)

at

module procedure run_kadath_reader module subroutine run_kadath_reader(this, mpi_ranks, nx, ny, nz, xmin, xmax, ymin, ymax, zmin, zmax, coords, 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, mass_density, specific_energy, pressure, v_eul_x, v_eul_y, v_eul_z, filename)

Calls the MPI-parallelized version of the function KadathExportBNS within Kadath

Read more…

Arguments

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

bnsfuka object which this PROCEDURE is a member of

integer, intent(in) :: mpi_ranks

Number of MPI ranks

integer, intent(in) :: nx

Number of lattice points in the direction

integer, intent(in) :: ny

Number of lattice points in the direction

integer, intent(in) :: nz

Number of lattice points in the direction

double precision, intent(in) :: xmin

Minimum value for over the lattice

double precision, intent(in) :: xmax

Maximum value for over the lattice

double precision, intent(in) :: ymin

Minimum value for over the lattice

double precision, intent(in) :: ymax

Maximum value for over the lattice

double precision, intent(in) :: zmin

Minimum value for over the lattice

double precision, intent(in) :: zmax

Maximum value for over the lattice

double precision, intent(inout), DIMENSION(nx,ny,nz,3) :: coords

Array containing the \(\mathrm{ID}\) on a lattice. First three indices run over the lattice's dimensions, the fourth one runs ovr the fields

double precision, intent(inout), DIMENSION(nx,ny,nz) :: lapse
double precision, intent(inout), DIMENSION(nx,ny,nz) :: shift_x
double precision, intent(inout), DIMENSION(nx,ny,nz) :: shift_y
double precision, intent(inout), DIMENSION(nx,ny,nz) :: shift_z
double precision, intent(inout), DIMENSION(nx,ny,nz) :: g_xx
double precision, intent(inout), DIMENSION(nx,ny,nz) :: g_xy
double precision, intent(inout), DIMENSION(nx,ny,nz) :: g_xz
double precision, intent(inout), DIMENSION(nx,ny,nz) :: g_yy
double precision, intent(inout), DIMENSION(nx,ny,nz) :: g_yz
double precision, intent(inout), DIMENSION(nx,ny,nz) :: g_zz
double precision, intent(inout), DIMENSION(nx,ny,nz) :: k_xx
double precision, intent(inout), DIMENSION(nx,ny,nz) :: k_xy
double precision, intent(inout), DIMENSION(nx,ny,nz) :: k_xz
double precision, intent(inout), DIMENSION(nx,ny,nz) :: k_yy
double precision, intent(inout), DIMENSION(nx,ny,nz) :: k_yz
double precision, intent(inout), DIMENSION(nx,ny,nz) :: k_zz
double precision, intent(inout), DIMENSION(nx,ny,nz) :: mass_density
double precision, intent(inout), DIMENSION(nx,ny,nz) :: specific_energy
double precision, intent(inout), DIMENSION(nx,ny,nz) :: pressure
double precision, intent(inout), DIMENSION(nx,ny,nz) :: v_eul_x
double precision, intent(inout), DIMENSION(nx,ny,nz) :: v_eul_y
double precision, intent(inout), DIMENSION(nx,ny,nz) :: v_eul_z
character(len=*), intent(in) :: filename

Path to the \(\mathrm{ID}\) file output by \(\texttt{FUKA}\), as given in the parameter fe sphincs_id_parameters.dat

module procedure set_up_lattices_around_stars module subroutine set_up_lattices_around_stars(this)

Read the \(\texttt{FUKA}\) \(\mathrm{ID}\) on two lattices, each one enclosing a star. The lattices are needed to interpolate the \(\mathrm{ID}\) on the particles.

Read more…

Arguments

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

bnsfuka object which this PROCEDURE is a member of