Updated concept of elements.

This commit is contained in:
Jukka Aho
2015-08-22 20:55:24 +03:00
parent 1ad2e9b69c
commit fc549184b4
7 changed files with 1218 additions and 632 deletions
+15 -8
View File
@@ -1,6 +1,8 @@
# This file is a part of JuliaFEM.
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
export IntegrationPoint, Element, Assembly, FunctionSpace
"""
Integration point
@@ -18,18 +20,21 @@ type IntegrationPoint
attributes :: Dict{ASCIIString, Any}
end
type Element
id :: Int
# element_type :: Int
node_ids :: Array{Int, 1}
type FunctionSpace
basis :: Function
dbasis :: Function
integration_points :: Array{IntegrationPoint, 1}
attributes :: Dict{ASCIIString, Any}
# ipoints :: Array{Float64, 2}
# iweights :: Array{Float64, 1}
end
abstract Element
#type Element
# id :: Int
# node_ids :: Array{Int, 1}
# shape_functions :: FunctionSpace
# integration_points :: Array{IntegrationPoint, 1}
# attributes :: Dict{ASCIIString, Any}
#end
type Assembly
# LHS
@@ -42,4 +47,6 @@ type Assembly
# global dofs for each element
gdofs :: Dict{Int64, Array{Int64, 1}}
end
Assembly() = Assembly(Int64[], Int64[], Float64[], Int64[], Float64[], Dict{Int64,Array{Int64,1}}())
Assembly(gdofs::Dict{Int64,Array{Int64,1}}) = Assembly(Int64[], Int64[], Float64[], Int64[], Float64[], gdofs)