Files
JuliaFEM.jl/src/api.jl
T

126 lines
2.0 KiB
Julia
Raw Normal View History

2015-11-28 13:02:56 +02:00
# This file is a part of JuliaFEM.
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
2015-11-29 19:59:47 +02:00
abstract BoundaryCondition
2015-11-29 19:59:47 +02:00
type NeumannBC <: BoundaryCondition
value
end
type DirichletBC <: BoundaryCondition
end
typealias DisplacementBC DirichletBC
typealias TemperatureBC DirichletBC
2015-11-29 19:59:47 +02:00
typealias ForceBC NeumannBC
typealias HeatFluxBC NeumannBC
"""
"""
type Material
2015-11-29 14:38:04 +02:00
name :: AbstractString
scalar_data :: Dict{AbstractString, Float64}
owners :: Vector
end
2015-11-28 13:02:56 +02:00
2015-11-29 19:59:47 +02:00
# Base.set_index(...) = ...
# m = Material(jotian)
# m["youngs modulus"] = 200e3
"""
"""
type Node{T<:Real}
2015-11-28 13:02:56 +02:00
id::Integer
coords::Array{T, 1}
end
2015-11-29 19:59:47 +02:00
#"""
#"""
#type MElement{I <: Integer} #, T <: AbstractElement}
# id :: Integer
# connectivity :: Array{I, 1}
# element_type :: Tet4
#end
"""
"""
type NodeSet
name :: AbstractString
node_ids :: Array{Integer, 1}
2015-11-28 13:02:56 +02:00
end
2015-11-29 19:59:47 +02:00
"""
"""
type ElementSet
2015-11-29 14:38:04 +02:00
name :: AbstractString
element_ids :: Array{Integer, 1}
2015-11-28 13:02:56 +02:00
end
2015-11-29 19:59:47 +02:00
type LoadCase{ T <: AbstractProblem }
problem :: T
boundary_conditions :: Vector{BoundaryProblem}
2015-11-29 14:38:04 +02:00
end
2015-11-29 19:59:47 +02:00
"""
"""
type Model
nodes :: Vector{Node}
elements :: Vector{Element}
sets :: Dict{AbstractString, Union{NodeSet, ElementSet}}
material :: Dict{AbstractString, Material}
load_cases :: Vector{LoadCase}
# settings :: Dict{AbstractString, Real}
2015-11-29 14:38:04 +02:00
end
2015-11-29 19:59:47 +02:00
Model() = Model(Node[],
Element[],
Dict{AbstractString, Union{NodeSet, ElementSet}}(),
Dict{AbstractString, Material}(),
LoadCase[],
)
2015-11-29 14:38:04 +02:00
2015-11-29 19:59:47 +02:00
"""
"""
2015-11-29 14:38:04 +02:00
function build_core_elements()
end
2015-11-29 19:59:47 +02:00
"""
"""
2015-11-29 14:38:04 +02:00
function set_core_element_material()
end
2015-11-29 19:59:47 +02:00
"""
element_has_type( ::Type{Val{:C3D4}}) = Tet4
"""
2015-11-29 14:38:04 +02:00
function create_problems()
end
2015-11-29 19:59:47 +02:00
"""
"""
2015-11-29 14:38:04 +02:00
function add_problems!()
end
2015-11-29 19:59:47 +02:00
"""
"""
function add_element!(model, element)
push!(model.elements, element)
end
"""
"""
function add_node!(model, node)
push!(model.nodes, node)
end
"""
"""
function add_set(model, set)
model.sets[set.name] = set
end