Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/CompScienceMeshes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@ export dimension, universedimension
export volume
export neighborhood
export quadpoints
export meshorder

export isinside, isinclosure, overlap

# specific to simplicial charts
export simplex, center, vertices
export simplex, center, vertices, nodes
export faces, edges, circumcenter
export barytocart, carttobary

Expand Down Expand Up @@ -122,6 +123,14 @@ include("isinside.jl")
include("findchart.jl")
include("neighborhood.jl")
include("subd_neighborhood.jl")

include("meshes/curvilinear_silvester.jl")
include("meshes/curvilinear_gmsh_line.jl")
include("meshes/curvilinear_gmsh_triangle.jl")
include("meshes/curvilinear_mesh.jl")
include("meshes/curvilinear_chart.jl")
include("meshes/curvilinear_neighborhood.jl")

include("quadpoints.jl")

include("submesh.jl")
Expand Down
7 changes: 5 additions & 2 deletions src/charts.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#export Simplex

abstract type AbstractSimplex{U,D}
end

# U: the dimension of the universe
# D: the dimension of the manifold
# N: the number of vertices
# T: the type of the coordinates
# C: the complimentary dimension (should always be U-D)
struct Simplex{U,D,C,N,T}
struct Simplex{U,D,C,N,T} <: AbstractSimplex{U,D}
vertices::SVector{N,SVector{U,T}}
tangents::SVector{D,SVector{U,T}}
normals::SVector{C,SVector{U,T}}
Expand Down Expand Up @@ -481,6 +482,8 @@ tangents(splx::Simplex, u) = hcat((splx.tangents)...)
# vertices(splx::Simplex) = hcat((splx.vertices)...)
function vertices(s::Simplex) s.vertices end

function nodes(s::Simplex) s.vertices end

"""
verticeslist(simplex)

Expand Down
4 changes: 4 additions & 0 deletions src/fileio/gmsh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ function load_gmsh_mesh(meshfile;
# TODO: once we support hexahedrons, we need to catch that one too
if element == :quadrangle
return QuadMesh(vertices, elements)
elseif element == :line && order > 1
return CurvilinearMesh(vertices, elements, 1, order)
elseif element == :triangle && order > 1
return CurvilinearMesh(vertices, elements, 2, order)
else
return Mesh(vertices, elements)
end
Expand Down
2 changes: 1 addition & 1 deletion src/mesh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ function skeleton(mesh, dim::Int; sort=:spacefillingcurve)
meshdim = dimension(mesh)
@assert 0 <= dim <= meshdim

if dim == meshdim
if dim == meshdim && (mesh isa Mesh || mesh isa QuadMesh)
return mesh
end

Expand Down
Loading