Add another loop to assembly procedure

Yet another loop, but this way we can preallocate matrices when
constructiong local matrices of elements with same dimensions (which is
the case in practice)
This commit is contained in:
Jukka Aho
2017-08-13 21:43:25 +03:00
parent dc75cfda03
commit 8c955d2b5f
+8
View File
@@ -73,3 +73,11 @@ function assemble!(problem::Problem, time::Real, ::Type{Val{:mass_matrix}}; dens
end
end
function assemble!(assembly::Assembly, problem::Problem, elements::Vector{Element}, time::Real)
warn("assemble!() this is default assemble operation, decreased performance can be expected without preallocation of memory!")
for element in elements
assemble!(assembly, problem, element, time)
end
return nothing
end