mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-22 18:52:16 +00:00
joopa joo.
This commit is contained in:
@@ -7,7 +7,7 @@ using JuliaFEM.Core: Element, Quad4, Tri3, Tet4, Seg2, Hex8, update!
|
||||
|
||||
|
||||
# TODO: this should be elsewhere
|
||||
function aster_create_elements(mesh, element_set, element_type=nothing)
|
||||
function aster_create_elements(mesh, element_set, element_type=nothing; reverse_connectivity=false)
|
||||
elements = Element[]
|
||||
mapping = Dict(:QU4 => Quad4, :TR3 => Tri3, :SE2 => Seg2, :HE8 => Hex8, :TE4 => Tet4)
|
||||
for (elid, (eltype, elset, elcon)) in mesh["connectivity"]
|
||||
@@ -24,6 +24,9 @@ function aster_create_elements(mesh, element_set, element_type=nothing)
|
||||
continue
|
||||
end
|
||||
end
|
||||
if reverse_connectivity
|
||||
elcon = reverse(elcon)
|
||||
end
|
||||
element = mapping[eltype](elcon)
|
||||
push!(elements, element)
|
||||
end
|
||||
@@ -358,4 +361,3 @@ function parse_aster_med_file(fn::ASCIIString, mesh_name=nothing)
|
||||
result["connectivity"] = conn
|
||||
return result
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user