Skip to content

Commit

Permalink
Fix in block_krylov_solvers.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Nov 1, 2024
1 parent 2ff8f76 commit 7628c55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/block_krylov_solvers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function BlockGmresSolver(m, n, p, memory, SV, SM)
H = SM[SM(undef, 2p, p) for i = 1 : memory]
τ = SV[SV(undef, p) for i = 1 : memory]
tmp = C isa Matrix ? SM(undef, 0, 0) : SM(undef, p, p)
stats = SimpleStats(0, false, false, T[], T[], T[], 0.0, "unknown")
stats = SimpleStats(0, false, false, T[], T[], T[], 0, 0.0, "unknown")
solver = BlockGmresSolver{T,FC,SV,SM}(m, n, p, ΔX, X, W, P, Q, C, D, V, Z, R, H, τ, tmp, false, stats)
return solver
end
Expand Down Expand Up @@ -103,8 +103,8 @@ for (KS, fun, nsol, nA, nAt, warm_start) in [
end

function ksizeof(attribute)
if isa(attribute, Vector) && isa(eltype(attribute), Vector) && !isempty(attribute)
# A vector of vectors is a vector of pointers in Julia.
if isa(attribute, Vector) && !isempty(attribute)
# A vector of arrays is a vector of pointers in Julia.
# All vectors inside a vector have the same size in Krylov.jl
size_attribute = sizeof(attribute) + length(attribute) * ksizeof(attribute[1])
else
Expand Down

0 comments on commit 7628c55

Please sign in to comment.