interpolate Submodule

Implementation of the methods of TYPE ejecta that interpolate the data on a grid, to a generic point

FT 19.11.2021



Uses

  • module~~interpolate~2~~UsesGraph module~interpolate~2 interpolate module~ejecta_generic ejecta_generic module~interpolate~2->module~ejecta_generic module~utility utility module~interpolate~2->module~utility module~ejecta_generic->module~utility module~id_base id_base module~ejecta_generic->module~id_base constants constants module~utility->constants matrix matrix module~utility->matrix module~id_base->module~utility timing timing module~id_base->timing

Contents


Module Procedures

module procedure interpolate_id_full module subroutine interpolate_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-ejecta-member arrays with the same shape as the ejecta member arrays

Read more…

Arguments

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

ejecta 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 interpolate_id_hydro module subroutine interpolate_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(ejecta), intent(inout) :: this

ejecta 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 interpolate_id_k module subroutine interpolate_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(ejecta), intent(inout) :: this

ejecta 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 interpolate_id_mass_b module subroutine interpolate_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 the [[ejecta_generic@interpolate]] SUBMODULE).

Read more…

Arguments

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

ejecta 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 interpolate_id_particles module subroutine interpolate_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(ejecta), intent(inout) :: this

ejecta 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

module procedure interpolate_id_spacetime module subroutine interpolate_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(ejecta), intent(inout) :: this

ejecta 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 interpolate_mass_density module function interpolate_mass_density(this, x, y, z) result(res)

Returns the mass density at the point given as argument, in units of .

Read more…

Arguments

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

ejecta 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 interpolate_pressure module function interpolate_pressure(this, x, y, z) result(res)

Returns the pressure at the point given as argument, in units of .

Read more…

Arguments

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

ejecta 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 interpolate_spatial_metric module function interpolate_spatial_metric(this, x, y, z) result(res)

Returns the spatial metric.

Read more…

Arguments

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

ejecta 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

at

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; return 0 otherwise

Read more…

Arguments

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

ejecta 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

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