Skip to content

Commit 0e05b6b

Browse files
hwpangmjohnson541
authored andcommitted
BugFix: remove unnecessary broadcast in jacobiany
1 parent 154e70e commit 0e05b6b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Domain.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,7 +1627,7 @@ end
16271627
if isa(inter,Outlet) && domain == inter.domain
16281628
flow = inter.F(t)
16291629
@simd for i in domain.indexes[1]:domain.indexes[2]
1630-
@inbounds @fastmath jac[i,i] .-= flow/N
1630+
@inbounds @fastmath jac[i,i] -= flow/N
16311631
end
16321632
@views @inbounds @fastmath jac[domain.indexes[1]:domain.indexes[2],domain.indexes[3]] .-= flow.*ns.*(-C)
16331633
end
@@ -1665,7 +1665,7 @@ function jacobiany!(jac::Q,y::U,p::W,t::Z,domain::D,interfaces::Q3,colorvec::Q2=
16651665
elseif isa(inter,Outlet) && domain == inter.domain
16661666
flow = inter.F(t)
16671667
@simd for i in domain.indexes[1]:domain.indexes[2]
1668-
@inbounds @fastmath jac[i,i] .-= flow/N
1668+
@inbounds @fastmath jac[i,i] -= flow/N
16691669
@inbounds @fastmath dCvavedni = cpdivR[i]*R/N
16701670
@fastmath dTdt = (P*V/N*flow)/(N*Cvave)
16711671
@fastmath ddnidTdt = -dTdt*(dCvavedni/Cvave)
@@ -1720,7 +1720,7 @@ function jacobiany!(jac::Q,y::U,p::W,t::Z,domain::D,interfaces::Q3,colorvec::Q2=
17201720
elseif isa(inter,Outlet) && domain == inter.domain
17211721
flow = inter.F(t)
17221722
@simd for i in domain.indexes[1]:domain.indexes[2]
1723-
@inbounds @fastmath jac[i,i] .-= flow/N
1723+
@inbounds @fastmath jac[i,i] -= flow/N
17241724
end
17251725
end
17261726
end
@@ -1747,7 +1747,7 @@ function jacobiany!(jac::Q,y::U,p::W,t::Z,domain::D,interfaces::Q3,colorvec::Q2=
17471747
if isa(inter,Outlet) && domain == inter.domain
17481748
flow = inter.F(t)
17491749
@simd for i in domain.indexes[1]:domain.indexes[2]
1750-
@inbounds @fastmath jac[i,i] .-= flow/N
1750+
@inbounds @fastmath jac[i,i] -= flow/N
17511751
end
17521752
end
17531753
end
@@ -1788,7 +1788,7 @@ function jacobiany!(jac::Q,y::U,p::W,t::Z,domain::D,interfaces::Q3,colorvec::Q2=
17881788
flow = inter.F(t)
17891789
@fastmath dTdt = (P*V/N*flow)/(N*Cvave)
17901790
@simd for i in domain.indexes[1]:domain.indexes[2]
1791-
@inbounds @fastmath jac[i,i] .-= flow/N
1791+
@inbounds @fastmath jac[i,i] -= flow/N
17921792
@inbounds @fastmath dCvavedni = cpdivR[i]*R/N
17931793
@fastmath ddnidTdt = -dTdt*(dCvavedni/Cvave)
17941794
@inbounds jac[domain.indexes[3],i] -= ddnidTdt
@@ -1843,7 +1843,7 @@ function jacobiany!(jac::Q,y::U,p::W,t::Z,domain::D,interfaces::Q3,colorvec::Q2=
18431843
elseif isa(inter,Outlet) && domain == inter.domain
18441844
flow = inter.F(t)
18451845
@simd for i in domain.indexes[1]:domain.indexes[2]
1846-
@inbounds @fastmath jac[i,i] .-= flow/N
1846+
@inbounds @fastmath jac[i,i] -= flow/N
18471847
end
18481848
@views @inbounds @fastmath jac[domain.indexes[1]:domain.indexes[2],domain.indexes[4]] .-= -flow.*ns./N/V
18491849
end
@@ -1866,7 +1866,7 @@ function jacobiany!(jac::Q,y::U,p::W,t::Z,domain::D,interfaces::Q3,colorvec::Q2=
18661866
if isa(inter,Outlet) && domain == inter.domain
18671867
flow = inter.F(t)
18681868
@simd for i in domain.indexes[1]:domain.indexes[2]
1869-
@inbounds @fastmath jac[i,i] .-= flow/N
1869+
@inbounds @fastmath jac[i,i] -= flow/N
18701870
end
18711871
end
18721872
end

0 commit comments

Comments
 (0)