From b238f38d61c16d57d3c1267553d04dbc554d485b Mon Sep 17 00:00:00 2001 From: Jukka Aho Date: Sat, 25 Feb 2017 07:18:51 +0200 Subject: [PATCH] bugfix: maximum dimension of problem was miscalculated nnodes*dim, correct way is max_node_id*dim, this was causing bugs when node ids is not starting from 1 --- src/solvers.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/solvers.jl b/src/solvers.jl index b3aecb2..d3a991c 100644 --- a/src/solvers.jl +++ b/src/solvers.jl @@ -387,7 +387,7 @@ function initialize!(solver::Solver; show_info=true) end nnodes = length(nodes) info("Total number of nodes in problems: $nnodes") - maxdof = maximum(nnodes)*field_dim + maxdof = maximum(nodes)*field_dim info("# of max dof (=size of solution vector) is $maxdof") solver.u = zeros(maxdof) solver.la = zeros(maxdof)