From 05fcc3fe8183196bd4f91d18c2142d68f5764bb0 Mon Sep 17 00:00:00 2001 From: Albert de Montserrat <58044444+albert-de-montserrat@users.noreply.github.com> Date: Thu, 8 Feb 2024 15:10:58 +0100 Subject: [PATCH] Fixes bug in `Latent_HeatCapacity` (#171) * `precision` not defined for LatentTeat. Use type signature instead * oops... --- src/Energy/HeatCapacity.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Energy/HeatCapacity.jl b/src/Energy/HeatCapacity.jl index e8fdd0cb..6d33b6ef 100644 --- a/src/Energy/HeatCapacity.jl +++ b/src/Energy/HeatCapacity.jl @@ -94,10 +94,10 @@ end # Calculation routine @inline function compute_heatcapacity( - a::T_HeatCapacity_Whittington{_T}; - T = zero(precision(a)), + a::T_HeatCapacity_Whittington{_T}; + T = zero(_T), kwargs... - ) where _T +) where _T @unpack_val a0, a1, b0, b1, c0, c1, molmass, Tcutoff = a cp = a0 / molmass @@ -144,10 +144,10 @@ end # Calculation routine @inline function compute_heatcapacity( - a::Latent_HeatCapacity; - dϕdT = zero(precision(a)), + a::Latent_HeatCapacity{_T}; + dϕdT = zero(_T), kwargs... - ) +) where _T @unpack_val Q_L = a Cp = compute_heatcapacity(a.Cp, kwargs)