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

This commit is contained in:
Jukka Aho
2017-02-25 07:18:51 +02:00
parent bb06b151cb
commit 87874cd570
+1 -1
View File
@@ -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)