findL Subroutine

public subroutine findL(tpoint, Lpoint, fl)

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: tpoint
double precision, intent(out) :: Lpoint
type(rc_fluid), intent(in) :: fl

Called by

proc~~findl~~CalledByGraph proc~findl findL proc~radiative_cooling_init radiative_cooling_init proc~radiative_cooling_init->proc~findl

Source Code

    subroutine findL (tpoint,Lpoint,fl)
    !  Fast search option to find correct point 
    !  in cooling curve
      

      double precision,intent(IN)   :: tpoint
      double precision, intent(OUT) :: Lpoint
      type(rc_fluid), intent(in) :: fl

      double precision :: lgtp
      integer :: jl,jc,jh,i

      lgtp = dlog10(tpoint)
      jl = int((lgtp - fl%lgtcoolmin) /fl%lgstep) + 1
      Lpoint = fl%Lcool(jl)+ (tpoint-fl%tcool(jl)) &
                * (fl%Lcool(jl+1)-fl%Lcool(jl)) &
                / (fl%tcool(jl+1)-fl%tcool(jl))

    end subroutine findL