Skip to content

Commit 4fa62bd

Browse files
committed
Type stable way to input functions for each domains
1 parent 7a32bf2 commit 4fa62bd

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

src/Domain.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,13 @@ function ConstantPDomain(;phase::Z,initialconds::Dict{X,E},constantspecies::Arra
238238
end
239239
export ConstantPDomain
240240

241-
struct ParametrizedTPDomain{N<:AbstractPhase,S<:Integer,W<:Real,W2<:Real,I<:Integer,Q<:AbstractArray} <: AbstractVariableKDomain
241+
struct ParametrizedTPDomain{N<:AbstractPhase,S<:Integer,W<:Real,W2<:Real,I<:Integer,Q<:AbstractArray,FT<:Function,FP<:Function} <: AbstractVariableKDomain
242242
phase::N
243243
indexes::Q #assumed to be in ascending order
244244
parameterindexes::Q
245245
constantspeciesinds::Array{S,1}
246-
T::Function
247-
P::Function
246+
T::FT
247+
P::FP
248248
efficiencyinds::Array{I,1}
249249
rxnarray::Array{Int64,2}
250250
jacobian::Array{W,2}
@@ -319,12 +319,12 @@ function ParametrizedTPDomain(;phase::Z,initialconds::Dict{X,Any},constantspecie
319319
end
320320
export ParametrizedTPDomain
321321

322-
struct ParametrizedVDomain{N<:AbstractPhase,S<:Integer,W<:Real,W2<:Real,I<:Integer,Q<:AbstractArray} <: AbstractVariableKDomain
322+
struct ParametrizedVDomain{N<:AbstractPhase,S<:Integer,W<:Real,W2<:Real,I<:Integer,Q<:AbstractArray,FV<:Function} <: AbstractVariableKDomain
323323
phase::N
324324
indexes::Q #assumed to be in ascending order
325325
parameterindexes::Q
326326
constantspeciesinds::Array{S,1}
327-
V::Function
327+
V::FV
328328
efficiencyinds::Array{I,1}
329329
rxnarray::Array{Int64,2}
330330
jacobian::Array{W,2}
@@ -396,12 +396,12 @@ function ParametrizedVDomain(;phase::Z,initialconds::Dict{X,Any},constantspecies
396396
end
397397
export ParametrizedVDomain
398398

399-
struct ParametrizedPDomain{N<:AbstractPhase,S<:Integer,W<:Real,W2<:Real,I<:Integer,Q<:AbstractArray} <: AbstractVariableKDomain
399+
struct ParametrizedPDomain{N<:AbstractPhase,S<:Integer,W<:Real,W2<:Real,I<:Integer,Q<:AbstractArray,FP<:Function} <: AbstractVariableKDomain
400400
phase::N
401401
indexes::Q #assumed to be in ascending order
402402
parameterindexes::Q
403403
constantspeciesinds::Array{S,1}
404-
P::Function
404+
P::FP
405405
efficiencyinds::Array{I,1}
406406
rxnarray::Array{Int64,2}
407407
jacobian::Array{W,2}
@@ -556,12 +556,12 @@ function ConstantTVDomain(;phase::Z,initialconds::Dict{X,E},constantspecies::Arr
556556
end
557557
export ConstantTVDomain
558558

559-
struct ParametrizedTConstantVDomain{N<:AbstractPhase,S<:Integer,W<:Real,W2<:Real,I<:Integer,Q<:AbstractArray} <: AbstractVariableKDomain
559+
struct ParametrizedTConstantVDomain{N<:AbstractPhase,S<:Integer,W<:Real,W2<:Real,I<:Integer,Q<:AbstractArray,FT<:Function} <: AbstractVariableKDomain
560560
phase::N
561561
indexes::Q #assumed to be in ascending order
562562
parameterindexes::Q
563563
constantspeciesinds::Array{S,1}
564-
T::Function
564+
T::FT
565565
V::W
566566
efficiencyinds::Array{I,1}
567567
rxnarray::Array{Int64,2}

0 commit comments

Comments
 (0)