Skip to content

Commit 6051e12

Browse files
committed
fix: numerically identical change for avoid memory allocation
- non-diagonal noise path of `perform_step!(::EulerHeunCache)` second stage
1 parent d360e82 commit 6051e12

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/perform_step/low_order.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,9 @@ end
9898
integrator.g(gtmp2, tmp, p, t+dt)
9999

100100
if is_diagonal_noise(integrator.sol.prob)
101-
@.. nrtmp=(1/2)*W.dW*(gtmp1+gtmp2)
101+
@.. nrtmp = (0.5) * W.dW * (gtmp1 + gtmp2)
102102
else
103-
@.. gtmp1 = (1/2)*(gtmp1+gtmp2)
104-
mul!(nrtmp, gtmp1, W.dW)
103+
mul!(nrtmp, gtmp2, W.dW, 0.5, 0.5)
105104
end
106105

107106
dto2 = dt / 2

0 commit comments

Comments
 (0)