Open ahniemi opened 6 years ago
Interestingly, this is actually not breaking the code. During interpolation, we loop through the number of basis functions, so this is working:
using FEMBase
el = Element(Quad4, [1, 2, 3, 4, 5])
X = Dict(1=>[0.0,0.0], 2=>[1.0,0.0], 3=>[1.0,1.0], 4=>[0.0,1.0], 5=>[2.0,0.0])
update!(el, "geometry", X)
xi = (0.0, 0.0)
time = 0.0
el("geometry", xi, time)
# output
2-element Array{Float64,1}:
0.5
0.5
In principle, given the geometry locally, the element is working as its own little "unit", without any knowledge about its connectivity:
el2 = Element(Quad4, Int[])
update!(el2, "geometry", ([0.0,0.0], [1.0,0.0], [1.0,1.0], [0.0,1.0]))
el2("geometry", xi, time)
# output
2-element Array{Float64,1}:
0.5
0.5
Maybe should give a warning if there is a length mismatch between the connectivity and length of basis?
Element function allows creation of Quad8 type element with four nodes:
It might good to check compatibility of input arguments here.