Calculate shape functions using FEMBasis.jl

A lot of code is moved to FEMBasis.jl regarding
calculating basis / shape functions of finite elements.

* add FEMBasis to REQUIRE
* remove obsolete files
* remove obsolete test files
* make integration point iterable
* loosen type definitions
* get length of element rather from basis than connectivity
* calculate midpoint of reference element
* wrong input argument to eval_basis! fixed
This commit is contained in:
Jukka Aho
2017-08-05 11:33:43 +03:00
parent dcd24e8e01
commit fffb0071a0
16 changed files with 85 additions and 1231 deletions
+15 -4
View File
@@ -1,9 +1,7 @@
# This file is a part of JuliaFEM.
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
abstract type AbstractElement end
type Element{E<:AbstractElement}
type Element{E<:AbstractBasis}
id :: Int
connectivity :: Vector{Int}
integration_points :: Vector{IP}
@@ -17,10 +15,23 @@ Examples
--------
julia> element = Element(Tri3, [1, 2, 3])
"""
function Element{E<:AbstractElement}(::Type{E}, connectivity::Vector{Int})
function Element{E<:AbstractBasis}(::Type{E}, connectivity::Vector{Int})
return Element{E}(-1, connectivity, [], Dict(), E())
end
"""
length(element::Element)
Return the number of nodes in element.
"""
function length{B}(element::Element{B})
return length(B)
end
function size{B}(element::Element{B})
return size(B)
end
function getindex(element::Element, field_name::AbstractString)
return element.fields[field_name]
end