Deprecate assemble!(problem, time, Val{:mass_matrix})

Use function assemble_mass_matrix!(problem, time)
This commit is contained in:
Jukka Aho
2017-08-20 19:16:23 +03:00
parent 5f6cdb8d31
commit f70209f17e
3 changed files with 10 additions and 2 deletions
+2
View File
@@ -147,4 +147,6 @@ export calc_nodal_values!, get_nodal_vector, get_nodal_dict, copy_field!,
calculate_second_moment_of_mass, extract
end
include("deprecations.jl")
end
+2 -2
View File
@@ -52,7 +52,7 @@ function assemble!(assembly::Assembly, problem::Problem, elements::Vector{Elemen
return nothing
end
function assemble!(problem::Problem, time, ::Type{Val{:mass_matrix}})
function assemble_mass_matrix!(problem::Problem, time)
if !isempty(problem.assembly.M)
info("Mass matrix for $(problem.name) is already assembled, skipping assemble routine")
return
@@ -73,7 +73,7 @@ function assemble_mass_matrix!{Basis}(problem::Problem, elements::Vector{Element
ldofs = zeros(Int, nnodes)
for element in elements
fill!(M, 0.0)
for ip in get_integration_points(element, 1)
for ip in get_integration_points(element, 2)
detJ = element(ip, time, Val{:detJ})
rho = element("density", time)
w = ip.weight*rho*detJ
+6
View File
@@ -0,0 +1,6 @@
# This file is a part of JuliaFEM.
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
function assemble!(problem::Problem, time, ::Type{Val{:mass_matrix}})
assemble_mass_matrix!(problem, time)
end