Loading [MathJax]/jax/output/HTML-CSS/jax.js

time_dependent_coordinate_implementation Submodule

Implementation of the interfaces defined in time_dependent_coordinate.


Uses

  • module~~time_dependent_coordinate_implementation~~UsesGraph module~time_dependent_coordinate_implementation time_dependent_coordinate_implementation module~time_dependent_coordinate time_dependent_coordinate module~time_dependent_coordinate_implementation->module~time_dependent_coordinate module~grid_function grid_function module~time_dependent_coordinate->module~grid_function module~kinds kinds module~time_dependent_coordinate->module~kinds module~grid_function->module~kinds module~element element module~grid_function->module~element module~element->module~kinds

Contents


Subroutines

subroutine coord_trans(a, b, xp, xip, dxpdt, d2xpdt2, xi, x, dxdt, dxdxi, d2xdt2, d2xdxi2, d2xdtdxi)

Routine that calculates the Tortoise coordinates (t,r) from time dependent coordinates (λ,ξ) where the particle is kept at a fixed coordinate location as well as the informtation needed to transform the wave equation to time dependent coordinates.

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in) :: a

The lower boundary location of the time dependent coordinate region.

real(kind=wp), intent(in) :: b

The upper boundary location of the time dependent coordinate region.

real(kind=wp), intent(in) :: xp

The current particle location in Tortoise coordinates, rp.

real(kind=wp), intent(in) :: xip

The constant particle location in time dependent coordinates, ξp.

real(kind=wp), intent(in) :: dxpdt

The current time derivative of the particle location in Tortoise coordinates, drpdt.

real(kind=wp), intent(in) :: d2xpdt2

The current second time derivative of the particle location in Tortoise coordinates, d2rpdt2.

real(kind=wp), intent(in), dimension(:):: xi

A 1d array containing coordinate values ξi.

real(kind=wp), intent(out), dimension(:):: x

A 1d array that on output contains the Tortoise coordinates (r)i.

real(kind=wp), intent(out), dimension(:):: dxdt

A 1d array that on outout contains drdt.

real(kind=wp), intent(out), dimension(:):: dxdxi

A 1d array that on outout contains drdξ.

real(kind=wp), intent(out), dimension(:):: d2xdt2

A 1d array that on outout contains d2rdt2.

real(kind=wp), intent(out), dimension(:):: d2xdxi2

A 1d array that on outout contains d2rdξ2.

real(kind=wp), intent(out), dimension(:):: d2xdtdxi

A 1d array that on outout contains d2rdtdξ.

subroutine convert_rschw_to_rstar(rp, drpdt, d2rpdt2)

Routine that converts the particle location and time derivatives in Schwarszschild coordinates to Tortoise coordinates.

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(inout) :: rp

On input the particle location in Schwarschild coordinates, rp. On output the particle location in Tortoise coordinates, rp.

real(kind=wp), intent(inout) :: drpdt

On input the time derivative of the particle location in Schwarschild coordinates, drpdt. On output the time derivative of the particle location in Tortoise coordinates, drpdt.

real(kind=wp), intent(inout) :: d2rpdt2

On input the second time derivative of the particle location in Schwarschild coordinates, d2rpdt2. On output the second time derivative of the particle location in Tortoise coordinates, d2rpdt2.


Module Procedures

module procedure tdc_init module subroutine tdc_init(this)

Arguments

Type IntentOptional AttributesName
class(tdc), intent(inout) :: this

This time dependent coordinate object is being initialized.

module procedure tdc_set_coefficients module subroutine tdc_set_coefficients(this, coeffs, lcoeffs, lambda, s, sinv, rho, rstar, rschw, ll)

Arguments

Type IntentOptional AttributesName
class(tdc), intent(inout) :: this

The routine is called on this time dependent coordinate object.

type(rgf), intent(inout), dimension(:):: coeffs

A 1d array of real grid functions containing the wave equation coefficients (should be eq_coeffs). On output it will contain (cξξ,cλξ,cξ,cλ).

type(rgf), intent(inout), dimension(:):: lcoeffs

A 1d array of real grid functions containing the dependent coefficients (should be eq_lcoeffs). On output it will contain the potential for all modes.

type(rgfb), intent(inout), dimension(:):: lambda

A 1d array of real boundary grid functions containing the characteristic speeds at the boundary of the elements (should be eq_lambda). On output it will be updated.

type(rgfb), intent(inout), dimension(:,:):: s

A 2d array of real boundary grid functions containing the matrix used to convert from characteristic to evolved variables (should be eq_s). On output it will be updated.

type(rgfb), intent(inout), dimension(:,:):: sinv

A 2d array of real boundary grid functions containing the matrix used to convert from evolved to characteristic variables (should be eq_sinv). On output it will be updated.

type(rgf), intent(in) :: rho

A real grid function containing the computational radial coordinate, ρ.

type(rgf), intent(inout) :: rstar

A real grid function containing the tortoise radial coordinate, r. On output this will be updated.

type(rgf), intent(inout) :: rschw

A real grid function containing the Schwarzschild radial coodrinate, rschw. On output this will be updated.

integer(kind=c_int), intent(in), dimension(:):: ll

A 1d array of c_int containing the -values of all the modes.

module procedure tdc_tdc_to_tortoise_cvec module subroutine tdc_tdc_to_tortoise_cvec(this, ielem, dir, dudlambda, dudxi, dudt, dudrstar)

Arguments

Type IntentOptional AttributesName
class(tdc), intent(inout) :: this

The routine is called on this time dependent coordinate object.

integer(kind=ip), intent(in) :: ielem

The index of the element that contains the coordinate transformation information.

integer(kind=ip), intent(in) :: dir

The index of the boundary within the element that contains the coordinate transformation. Left boundary: 1, right boundary: 2.

complex(kind=wp), intent(in), dimension(:):: dudlambda

The vector of Ψλ values to transform.

complex(kind=wp), intent(in), dimension(:):: dudxi

The vector of Ψξ values to transform.

complex(kind=wp), intent(out), dimension(:):: dudt

On output contains the Ψt vector.

complex(kind=wp), intent(out), dimension(:):: dudrstar

On output contains the Ψr vector.

module procedure tdc_tdc_to_tortoise_cscal module subroutine tdc_tdc_to_tortoise_cscal(this, ielem, dir, dudlambda, dudxi, dudt, dudrstar)

Arguments

Type IntentOptional AttributesName
class(tdc), intent(inout) :: this

The routine is called on this time dependent coordinate object.

integer(kind=ip), intent(in) :: ielem

The index of the element that contains the coordinate transformation information.

integer(kind=ip), intent(in) :: dir

The index of the boundary within the element that contains the coordinate transformation. Left boundary: 1, right boundary: 2.

complex(kind=wp), intent(in) :: dudlambda

The value of Ψλ to transform.

complex(kind=wp), intent(in) :: dudxi

The value of Ψξ to transform.

complex(kind=wp), intent(out) :: dudt

On output contains the Ψt value.

complex(kind=wp), intent(out) :: dudrstar

On output contains the Ψr value.

module procedure tdc_tdc_to_tortoise_rscal module subroutine tdc_tdc_to_tortoise_rscal(this, ielem, dir, dudlambda, dudxi, dudt, dudrstar)

Arguments

Type IntentOptional AttributesName
class(tdc), intent(inout) :: this

The routine is called on this time dependent coordinate object.

integer(kind=ip), intent(in) :: ielem

The index of the element that contains the coordinate transformation information.

integer(kind=ip), intent(in) :: dir

The index of the boundary within the element that contains the coordinate transformation. Left boundary: 1, right boundary: 2.

real(kind=wp), intent(in) :: dudlambda

The value of Ψλ to transform.

real(kind=wp), intent(in) :: dudxi

The value of Ψξ to transform.

real(kind=wp), intent(out) :: dudt

On output contains the Ψt value.

real(kind=wp), intent(out) :: dudrstar

On output contains the Ψr value.

module procedure tdc_tortoise_to_tdc_cvecb module subroutine tdc_tortoise_to_tdc_cvecb(this, ielem, dir, dudt, dudrstar, dudlambda, dudxi)

Arguments

Type IntentOptional AttributesName
class(tdc), intent(inout) :: this

The routine is called on this time dependent coordinate object.

integer(kind=ip), intent(in) :: ielem

The index of the element that contains the coordinate transformation information.

integer(kind=ip), intent(in) :: dir

The index of the boundary within the element that contains the coordinate transformation. Left boundary: 1, right boundary: 2.

complex(kind=wp), intent(in), dimension(:):: dudt

The vector of Ψt to transform.

complex(kind=wp), intent(in), dimension(:):: dudrstar

The vector of Ψr to transform.

complex(kind=wp), intent(out), dimension(:):: dudlambda

On output contains the Ψλ vector.

complex(kind=wp), intent(out), dimension(:):: dudxi

On output contains the Ψξ vector.

module procedure tdc_tortoise_to_tdc_cscalb module subroutine tdc_tortoise_to_tdc_cscalb(this, ielem, dir, dudt, dudrstar, dudlambda, dudxi)

Arguments

Type IntentOptional AttributesName
class(tdc), intent(inout) :: this

The routine is called on this time dependent coordinate object.

integer(kind=ip), intent(in) :: ielem

The index of the element that contains the coordinate transformation information.

integer(kind=ip), intent(in) :: dir

The index of the boundary within the element that contains the coordinate transformation. Left boundary: 1, right boundary: 2.

complex(kind=wp), intent(in) :: dudt

The value of Ψt to transform.

complex(kind=wp), intent(in) :: dudrstar

The value of Ψr to transform.

complex(kind=wp), intent(out) :: dudlambda

On output contains the Ψλ value.

complex(kind=wp), intent(out) :: dudxi

On output contains the Ψξ value.

module procedure tdc_tortoise_to_tdc_cscal module subroutine tdc_tortoise_to_tdc_cscal(this, elem, node, dpsidt, dpsidr)

Arguments

Type IntentOptional AttributesName
class(tdc), intent(inout) :: this

The routine is called on this time dependent coordinate object.

integer(kind=ip), intent(in) :: elem

The element index of the point to transform.

integer(kind=ip), intent(in) :: node

The node index of the point to transform.

complex(kind=wp), intent(inout) :: dpsidt

On input contains: Ψt. On output contains Ψλ.

complex(kind=wp), intent(inout) :: dpsidr

On input contains: Ψr. On output contains Ψξ.