Skip to content

Commit 24a3f11

Browse files
committed
Type stable way to input function for interfaces
1 parent 4fa62bd commit 24a3f11

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/Interface.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,16 +227,16 @@ function stickingcoefficient2arrhenius(sc,sitedensity,N,mw;Tmin=300.0,Tmax=2000.
227227
return Arrhenius(;A=p[1],n=p[2],Ea=p[3])
228228
end
229229

230-
struct Inlet{Q<:Real,S,V<:AbstractArray,U<:Real,X<:Real} <: AbstractBoundaryInterface
230+
struct Inlet{Q<:Real,S,V<:AbstractArray,U<:Real,X<:Real,FF<:Function} <: AbstractBoundaryInterface
231231
domain::S
232232
y::V
233-
F::Function
233+
F::FF
234234
T::U
235235
P::X
236236
H::Q
237237
end
238238

239-
function Inlet(domain::V,conddict::Dict{String,X},F::Function) where {V,X<:Real,B<:Real}
239+
function Inlet(domain::V,conddict::Dict{String,X},F::FF) where {V,X<:Real,B<:Real,FF<:Function}
240240
y = makespcsvector(domain.phase,conddict)
241241
T = conddict["T"]
242242
P = conddict["P"]
@@ -247,8 +247,8 @@ end
247247

248248
export Inlet
249249

250-
struct Outlet{V} <: AbstractBoundaryInterface
250+
struct Outlet{V,FF<:Function} <: AbstractBoundaryInterface
251251
domain::V
252-
F::Function
252+
F::FF
253253
end
254254
export Outlet

0 commit comments

Comments
 (0)