place_particles_ellipsoidal_surfaces Interface

interface


Calls

interface~~place_particles_ellipsoidal_surfaces~~CallsGraph interface~place_particles_ellipsoidal_surfaces place_particles_ellipsoidal_surfaces proc~place_particles_ellipsoidal_surfaces place_particles_ellipsoidal_surfaces interface~place_particles_ellipsoidal_surfaces->proc~place_particles_ellipsoidal_surfaces bilinear_interpolation bilinear_interpolation proc~place_particles_ellipsoidal_surfaces->bilinear_interpolation none~allocate_surface_memory allocate_surface_memory proc~place_particles_ellipsoidal_surfaces->none~allocate_surface_memory none~initialize_surfaces initialize_surfaces proc~place_particles_ellipsoidal_surfaces->none~initialize_surfaces none~validate_position_final~2 validate_position_final proc~place_particles_ellipsoidal_surfaces->none~validate_position_final~2 proc~assign_surfaces_mass assign_surfaces_mass proc~place_particles_ellipsoidal_surfaces->proc~assign_surfaces_mass proc~cartesian_from_spherical cartesian_from_spherical proc~place_particles_ellipsoidal_surfaces->proc~cartesian_from_spherical proc~compute_colatitudes_uniformly_in compute_colatitudes_uniformly_in proc~place_particles_ellipsoidal_surfaces->proc~compute_colatitudes_uniformly_in proc~is_finite_number is_finite_number proc~place_particles_ellipsoidal_surfaces->proc~is_finite_number proc~number_surfaces number_surfaces proc~place_particles_ellipsoidal_surfaces->proc~number_surfaces proc~particle_volume particle_volume proc~place_particles_ellipsoidal_surfaces->proc~particle_volume proc~place_surfaces place_surfaces proc~place_particles_ellipsoidal_surfaces->proc~place_surfaces proc~print_mass_profile_surface_radii print_mass_profile_surface_radii proc~place_particles_ellipsoidal_surfaces->proc~print_mass_profile_surface_radii proc~reallocate_array_1d reallocate_array_1d proc~place_particles_ellipsoidal_surfaces->proc~reallocate_array_1d proc~reallocate_array_2d reallocate_array_2d proc~place_particles_ellipsoidal_surfaces->proc~reallocate_array_2d nu nu none~initialize_surfaces->nu pos pos none~initialize_surfaces->pos pvol pvol none~initialize_surfaces->pvol validate_position validate_position none~validate_position_final~2->validate_position proc~compute_colatitudes_uniformly_in->proc~is_finite_number proc~number_surfaces->proc~is_finite_number

public module subroutine place_particles_ellipsoidal_surfaces(this, mass_star, radius, center, central_density, npart_des, npart_out, pos, pvol, nu, h, last_r, upper_bound, lower_bound, upper_factor, lower_factor, max_steps, filename_mass_profile, filename_shells_radii, filename_shells_pos, get_density, integrate_density, get_id, validate_position, radii, surf)

Arguments

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

particles object which this PROCEDURE is a member of

double precision, intent(in) :: mass_star

Baryonic mass of the star

double precision, intent(in) :: radius

Radius of the star in the x direction towards the companion

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

(x|) coordinate of the center of the star, i.e., of the point with highest density

double precision, intent(in) :: central_density

Central density of the star, i.e., highest density

integer, intent(in) :: npart_des

idbase object needed to access the BNS data

integer, intent(out) :: npart_out

Final number of particles on the star

double precision, intent(inout), DIMENSION(:,:), ALLOCATABLE :: pos

Array string the final positions

double precision, intent(inout), DIMENSION(:), ALLOCATABLE :: pvol

Array soring the inal particle volumes

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

Array storing the final particle masses Array storing the particle baryon masses

double precision, intent(inout), DIMENSION(:), ALLOCATABLE :: h

Array storing the initial guess for the particle smoothing lengths

double precision, intent(in) :: last_r

Radius of the last ellipsoidal surface

double precision, intent(inout) :: upper_bound

Desired upper bound for the differences between particle masses on neighbouring ellipsoidal surfaces

double precision, intent(inout) :: lower_bound

Desired lower bound for the differences between particle masses on neighbouring ellipsoidal surfaces

double precision, intent(in) :: upper_factor

If, after max_steps, the iteration did not converge, multiply upper_bound by upper_factor, and lower_bound by lower_factor. upper_factor >= 1, usually an increase of 1% works

double precision, intent(in) :: lower_factor

If, after max_steps, the iteration did not converge, multiply upper_bound by upper_factor, and lower_bound by lower_factor. lower_factor <= 1, usually a decrease of 1% works

integer, intent(in) :: max_steps

If, after max_steps, the iteration did not converge, multiply upper_bound by upper_factor, and lower_bound by lower_factor. max_steps >= 10. 100 is a nice value

character(len=*), intent(inout), optional :: filename_mass_profile
character(len=*), intent(inout), optional :: filename_shells_radii

Name of the file to store the surface radii

character(len=*), intent(inout), optional :: filename_shells_pos

Name of the file to store the final particle positions

function get_density(x, y, z) result(density)

Returns the baryon mass density 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

Baryon mass density at

subroutine integrate_density(center, radius, central_density, dr, dth, dphi, mass, mass_profile, mass_profile_idx, radii, surf)
Arguments
Type IntentOptional Attributes Name
double precision, intent(in), DIMENSION(3) :: center

Center of the star

double precision, intent(in) :: radius

Radius of the star

double precision, intent(in) :: central_density

Central density of the star

double precision, intent(in) :: dr

Integration steps

double precision, intent(in) :: dth

Integration steps

double precision, intent(in) :: dphi

Integration steps

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 INTEGER, DIMENSION(:), ALLOCATABLE, INTENT(INOUT)::mass_profile_idx

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

Surface of the matter object

subroutine get_id(x, y, z, sqdetg, baryon_density, gamma_euler)

Returns the baryon mass density 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

double precision, intent(out) :: sqdetg
double precision, intent(out) :: baryon_density
double precision, intent(out) :: gamma_euler
procedure(validate_position_int), optional :: validate_position

Returns 1 if the position is not valid, 0 otherwise

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

Surface of the matter object

Description

Places particles on ellipsoidal surfaces on one star