find_center Module Procedure

module procedure find_center module function find_center(this, separation, x_sign, get_density) result(center)

Finds the center of a star, as the point where the density is maximal.

FT 27.09.2022


Arguments

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

bnsbase object owning this PROCEDURE

double precision, intent(in) :: separation

Separation between the stars

double precision, intent(in) :: x_sign

Sign of the x coordinates of the point inside the star

procedure(get_density_at_pos), optional :: get_density

Return Value double precision

Center of a star, as the point where the density is maximal.


Called by

proc~~find_center~~CalledByGraph proc~find_center find_center interface~find_center find_center interface~find_center->proc~find_center

Contents


Variables

Type Visibility Attributes Name Initial
logical, private, parameter :: debug = .FALSE.
integer, private :: i
integer, private, parameter :: n_pts = 5000
procedure, private, POINTER :: return_density
double precision, private :: rho
double precision, private :: rho_max
double precision, private :: x
double precision, private :: x_left
double precision, private :: x_right

Subroutines

subroutine read_density(x, y, z, rho)

Reads the density using the method read_mass_density. This is a wrapper needed as the TARGET of a PROCEDURE POINTER (PROCEDURE POINTERS cannot point to TYPE-BOUND PROCEDURES unfortunately)

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: x
double precision, intent(in) :: y
double precision, intent(in) :: z
double precision, intent(out) :: rho

subroutine read_density_opt(x, y, z, rho)

Reads the density using the method passed optionally as an argument.

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: x
double precision, intent(in) :: y
double precision, intent(in) :: z
double precision, intent(out) :: rho