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