Skip to content

Commit 67c27cb

Browse files
committed
add jacobianp! for ConstantTVDomain, ParametrizedTConstantVDomain, ConstantTADomain
1 parent 48d9375 commit 67c27cb

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/Domain.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2272,6 +2272,20 @@ function jacobianp!(jacp::Q,y::U,p::W,t::Z,domain::D,interfaces::Q3,colorvec::Q2
22722272
end
22732273
end
22742274

2275+
function jacobianp!(jacp::Q,y::U,p::W,t::Z,domain::D,interfaces::Q3,colorvec::Q2=nothing) where {Q3<:AbstractArray,Q2,Q<:AbstractArray,U<:AbstractArray,W,Z<:Real,D<:Union{ConstantTVDomain,ParametrizedTConstantVDomain,ConstantTADomain}}
2276+
jacp.=0.0
2277+
ns,cs,T,P,V,C,N,mu,kfs,krevs,Hs,Us,Gs,diffs,Cvave,cpdivR = calcthermo(domain,y,t,p)
2278+
2279+
Nspcs = length(cs)
2280+
Nrxns = size(domain.rxnarray)[2]
2281+
2282+
jacobianpnsderiv!(jacp,y,p,t,domain,domain.rxnarray,cs,T,V,kfs,krevs,Nspcs,Nrxns)
2283+
2284+
@simd for ind in domain.constantspeciesinds
2285+
@inbounds jacp[ind,:] .= 0.
2286+
end
2287+
end
2288+
22752289
function getreactionindices(ig::Q) where {Q<:AbstractPhase}
22762290
arr = zeros(Int64,(6,length(ig.reactions)))
22772291
for (i,rxn) in enumerate(ig.reactions)

0 commit comments

Comments
 (0)