A class that defines a time dependent coordinate transformation for the scalar wave equation on s Schwarzschild spacetime.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(rgfb), | public | :: | dxdlambda_b | A real boundary grid function that stores ∂r∗∂λ on the element boundaries. |
|||
type(rgfb), | public | :: | dxdxi_b | A real boundary grid function that stores ∂r∗∂ξ on the element boundaries. |
|||
real(kind=wp), | public | :: | maxspeed | The maximum coordinate speed (needed for CFL timestep condition). |
|||
type(rgf), | public | :: | dxdlambda | A real grid function that stores ∂r∗∂λ everywhere. |
|||
type(rgf), | public | :: | dxdxi | A real grid function that stores ∂r∗∂ξ everywhere. |
|||
type(rgf), | public | :: | d2xdlambda2 | A real grid function that stores ∂2r∗∂λ2 everywhere. |
|||
type(rgf), | public | :: | d2xdxi2 | A real grid function that stores ∂2r∗∂ξ2 everywhere. |
|||
type(rgf), | public | :: | d2xdlambdadxi | A real grid function that stores ∂2r∗∂λ∂ξ everywhere. |
|||
type(rgf), | public | :: | rm2m | A real grid function that stores r−2M everywhere. |
The initialization routine.
The interface for the initialization routine.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tdc), | intent(inout) | :: | this | This time dependent coordinate object is being initialized. |
The routine that sets the coefficients for the wave equation.
The interface for the routine that sets the coefficient for the scalar wave equation in Schwarzschild spacetime.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Routine to transform from λ,ξ) to (t,r∗) for complex vector arguments at the boundary of an element.
Routine to transform from time dependent (λ,ξ) to tortoise coordinates (t,r∗) for complex vector input at element boundaries.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Routine to transform from λ,ξ) to (t,r∗) for complex scalar arguments at the boundary of an element.
Routine to transform from time dependent (λ,ξ) to tortoise coordinates (t,r∗) for complex scalar input at element boundaries.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Routine to transform from λ,ξ) to (t,r∗) for real scalar arguments at the boundary of an element.
Routine to transform from time dependent (λ,ξ) to tortoise coordinates (t,r∗) for real scalar input at element boundaries.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Generic name for routines that transform from λ,ξ) to (t,r∗) at the boundary of an element.
Routine to transform from (t,r∗) to λ,ξ) for complex vector arguments at the boundary of an element.
Routine to transform from tortoise coordinates (t,r∗) to time dependent (λ,ξ) for complex vector input at element boundaries.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Routine to transform from (t,r∗) to λ,ξ) for complex scalar arguments at the boundary of an element.
Routine to transform from tortoise coordinates (t,r∗) to time dependent (λ,ξ) for complex scalar input at element boundaries.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Routine to transform from (t,r∗) to λ,ξ) for complex scalar arguments at any node in any element.
Routine to transform from tortoise coordinates (t,r∗) to time dependent (λ,ξ) for complex scalar input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 ∂Ψ∂ξ. |
Generic name for routines that transform from (t,r∗) to λ,ξ).
type :: tdc
!! A class that defines a time dependent coordinate transformation for the
!! scalar wave equation on s Schwarzschild spacetime.
type(rgfb) :: dxdlambda_b
!! A real boundary grid function that stores
!! \(\frac{\partial r_*}{\partial \lambda}\) on the element boundaries.
type(rgfb) :: dxdxi_b
!! A real boundary grid function that stores
!! \(\frac{\partial r_*}{\partial \xi}\) on the element boundaries.
real(wp) :: maxspeed
!! The maximum coordinate speed (needed for CFL timestep condition).
type(rgf) :: dxdlambda
!! A real grid function that stores
!! \(\frac{\partial r_*}{\partial \lambda}\) everywhere.
type(rgf) :: dxdxi
!! A real grid function that stores
!! \(\frac{\partial r_*}{\partial \xi}\) everywhere.
type(rgf) :: d2xdlambda2
!! A real grid function that stores
!! \(\frac{\partial^2 r_*}{\partial \lambda^2}\) everywhere.
type(rgf) :: d2xdxi2
!! A real grid function that stores
!! \(\frac{\partial^2 r_*}{\partial \xi^2}\) everywhere.
type(rgf) :: d2xdlambdadxi
!! A real grid function that stores
!! \(\frac{\partial^2 r_*}{\partial \lambda \partial \xi}\) everywhere.
type(rgf) :: rm2m
!! A real grid function that stores \(r-2M\) everywhere.
contains
procedure :: init => tdc_init
!! The initialization routine.
procedure :: set_coefficients => tdc_set_coefficients
!! The routine that sets the coefficients for the wave equation.
procedure :: tdc_to_tortoise_cvec => tdc_tdc_to_tortoise_cvec
!! Routine to transform from \(\lambda,\xi)\) to \((t,r_*)\) for complex
!! vector arguments at the boundary of an element.
procedure :: tdc_to_tortoise_cscal => tdc_tdc_to_tortoise_cscal
!! Routine to transform from \(\lambda,\xi)\) to \((t,r_*)\) for complex
!! scalar arguments at the boundary of an element.
procedure :: tdc_to_tortoise_rscal => tdc_tdc_to_tortoise_rscal
!! Routine to transform from \(\lambda,\xi)\) to \((t,r_*)\) for real
!! scalar arguments at the boundary of an element.
generic :: tdc_to_tortoise => tdc_to_tortoise_cvec, tdc_to_tortoise_cscal, &
tdc_to_tortoise_rscal
!! Generic name for routines that transform from \(\lambda,\xi)\) to
!! \((t,r_*)\) at the boundary of an element.
procedure :: tortoise_to_tdc_cvecb => tdc_tortoise_to_tdc_cvecb
!! Routine to transform from \((t,r_*)\) to \(\lambda,\xi)\) for complex
!! vector arguments at the boundary of an element.
procedure :: tortoise_to_tdc_cscalb => tdc_tortoise_to_tdc_cscalb
!! Routine to transform from \((t,r_*)\) to \(\lambda,\xi)\) for complex
!! scalar arguments at the boundary of an element.
procedure :: tortoise_to_tdc_cscal => tdc_tortoise_to_tdc_cscal
!! Routine to transform from \((t,r_*)\) to \(\lambda,\xi)\) for complex
!! scalar arguments at any node in any element.
generic :: tortoise_to_tdc => tortoise_to_tdc_cvecb, &
tortoise_to_tdc_cscalb, &
tortoise_to_tdc_cscal
!! Generic name for routines that transform from \((t,r_*)\) to
!! \(\lambda,\xi)\).
end type tdc