Implement new function create_nodal_elements

This function can be used to create elements from node set defined
in mesh. Resulting elements are of type Poi1, that is, they don't
have any volume but it's still possible to add boundary conditions
to them which are then enforced in discrete sense.
This commit is contained in:
Jukka Aho
2017-08-17 15:19:00 +03:00
committed by maikkirapo
parent 741bb8d057
commit b1cf7eacb9
3 changed files with 33 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
# This file is a part of JuliaFEM.
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
using Base.Test
using JuliaFEM
using JuliaFEM.Preprocess
@testset "test create nodal elements" begin
m = Mesh()
add_node!(m, 1, [0.0, 0.0])
add_node_to_node_set!(m, :test, 1)
els = create_nodal_elements(m, "test")
fel = first(els)
@test fel.connectivity == [1]
end