Get Lorentz factor from velocity
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in), | dimension(3) | :: | v | ||
| double precision, | intent(out) | :: | lfac |
pure subroutine get_lfac_from_velocity(v,lfac) use mod_global_parameters, only: ndir, c_norm double precision,dimension(3), intent(in) :: v double precision, intent(out) :: lfac if (relativistic) then lfac = 1.0d0 / sqrt(1.0d0 - sum(v(:)**2)/c_norm**2) else lfac = 1.0d0 end if end subroutine get_lfac_from_velocity