find_radius Module Procedure

module procedure find_radius module function find_radius(this, center, vector, get_density) result(radius)

Finds the radius of a matter object, relative to a center and along a direction. The radius is determined as the first point where the density is zero.

FT 27.09.2022


Arguments

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

bnsbase object owning this PROCEDURE

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

Center point relative to which the radius is measured

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

Vector that defines the direction along which to measure the radius. If not normalized, it will be normalized.

procedure(get_density_at_pos), optional :: get_density

Return Value double precision

Radius of the star relative to center, along the direction specified by vector


Calls

proc~~find_radius~~CallsGraph proc~find_radius find_radius none~line line proc~find_radius->none~line

Called by

proc~~find_radius~~CalledByGraph proc~find_radius find_radius interface~find_radius find_radius interface~find_radius->proc~find_radius

Contents


Variables

Type Visibility Attributes Name Initial
logical, private, parameter :: debug = .FALSE.
double precision, private, parameter :: min_dens = 1.D-12
double precision, private, parameter :: min_dist = 1.D-6
double precision, private, DIMENSION(3) :: point_left
double precision, private, DIMENSION(3) :: point_mean
double precision, private, DIMENSION(3) :: point_right
procedure, private, POINTER :: return_density
double precision, private :: rho_left
double precision, private :: rho_mean
double precision, private :: rho_right
double precision, private :: vector_norm
double precision, private, DIMENSION(3) :: versor
double precision, private, parameter :: x_ini = 130.D0
double precision, private :: x_left
double precision, private :: x_mean
double precision, private :: x_right

Functions

pure function line(x) result(point)

The line parametrized by x, with being center and being vector

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: x

Parameter along the line

Return Value double precision, DIMENSION(3)

Coordinates of the point on the line at the given


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