Skip to content

Commit 0674fff

Browse files
committed
Fix allocate_if in USYMLQR
1 parent 2d947c2 commit 0674fff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/usymlqr.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ kwargs_usymlqr = (:transfer_to_usymcg, :M, :N, :ldiv, :atol, :rtol, :itmax, :tim
163163
Aᴴ = A'
164164

165165
# Set up workspace.
166-
allocate_if(!MisI, workspace, :uₖ, S, m)
167-
allocate_if(!NisI, workspace, :vₖ, S, n)
166+
allocate_if(!NisI, workspace, :vₖ, S, workspace.x) # The length of vₖ is n
167+
allocate_if(!MisI, workspace, :uₖ, S, workspace.y) # The length of uₖ is m
168168
Δxz, Δry = workspace.Δx, workspace.Δy
169169
M⁻¹uₖ₋₁, M⁻¹uₖ, N⁻¹vₖ₋₁, N⁻¹vₖ = workspace.M⁻¹uₖ₋₁, workspace.M⁻¹uₖ, workspace.N⁻¹vₖ₋₁, workspace.N⁻¹vₖ
170170
rₖ, xₖ, yₖ, zₖ, p, q = workspace.r, workspace.x, workspace.y, workspace.z, workspace.p, workspace.q

0 commit comments

Comments
 (0)