Skip to content

Commit 2d98668

Browse files
authored
Merge pull request #89 from ReactionMechanismGenerator/fix_typo
Fix typo in ParametrizedTPDomain jacobiany!
2 parents 782ac3c + 02edbc8 commit 2d98668

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/Domain.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,7 +1849,7 @@ function jacobiany!(jac::Q,y::U,p::W,t::Z,domain::D,interfaces::Q3,colorvec::Q2=
18491849
@simd for i in domain.indexes[1]:domain.indexes[2]
18501850
@views @inbounds @fastmath jac[domain.indexes[3],i] = sum(jac[domain.indexes[1]:domain.indexes[2],i])*R*T/P
18511851
end
1852-
@views @inbounds @fastmath jac[domain.indexes[3],domain.indexes[3]] = sum(jac[domain.indexes[1]:domain.indexes[2],domain.indexes[3]])*R*T/P
1852+
@views @inbounds @fastmath jac[domain.indexes[3],domain.indexes[3]] = sum(jac[domain.indexes[1]:domain.indexes[2],domain.indexes[3]])*R*T/P + Calculus.derivative(domain.T,t)/T - Calculus.derivative(domain.P,t)/P
18531853

18541854
@simd for ind in domain.constantspeciesinds
18551855
@inbounds jac[ind,:] .= 0.
@@ -1858,14 +1858,12 @@ function jacobiany!(jac::Q,y::U,p::W,t::Z,domain::D,interfaces::Q3,colorvec::Q2=
18581858
@simd for inter in interfaces
18591859
if isa(inter,Outlet) && domain == inter.domain
18601860
flow = inter.F(t)
1861-
@simd for i in domain:indexes[1]:domain.indexes[2]
1861+
@simd for i in domain.indexes[1]:domain.indexes[2]
18621862
@inbounds @fastmath jac[i,i] .-= flow/N
18631863
end
18641864
end
18651865
end
18661866

1867-
@inbounds jacobianytherm!(jac,y,p,t,domain,interfaces,domain.indexes[3],V,colorvec)
1868-
18691867
return jac
18701868
end
18711869

0 commit comments

Comments
 (0)