Compute the space step step by means of CFL condition.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrand_ladvection), | intent(in) | :: | self | Advection field. |
||
real(kind=R_P), | intent(in) | :: | Dt | Time step. |
Space step.
pure function compute_dx(self, Dt) result(Dx)
!< Compute the space step step by means of CFL condition.
class(integrand_ladvection), intent(in) :: self !< Advection field.
real(R_P), intent(in) :: Dt !< Time step.
real(R_P) :: Dx !< Space step.
associate(a=>self%a, CFL=>self%CFL)
Dx = Dt / CFL * abs(a)
endassociate
endfunction compute_dx