Skip to content

Commit 0af32d1

Browse files
committed
start some docstrings
1 parent 2562da1 commit 0af32d1

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/distmeshnd.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ function distmesh(fdist::Function,
3535
distmesh(fdist, fh, h, setup, o, w, fp, Val(stats), VT)
3636
end
3737

38+
"""
39+
DistMeshResult
3840
41+
A struct returned from the `distmesh` function that includes point, simplex,
42+
and interation statistics.
43+
"""
3944
struct DistMeshResult{PT, TT, STATS}
4045
points::Vector{PT}
4146
tetrahedra::Vector{TT}
@@ -183,6 +188,16 @@ function distmesh(fdist::Function,
183188
end
184189
end
185190

191+
"""
192+
retriangulate!
193+
194+
195+
Given a point set, generate a delaunay triangulation, and other requirements.
196+
This includes:
197+
- Spatial sorting of points
198+
- Delaunay triangulation
199+
- Filtering of invalid tetrahedra outside the boundary
200+
"""
186201
function retriangulate!(fdist, result::DistMeshResult, geps, setup, triangulationcount, pt_dists)
187202
# use hilbert sort to improve cache locality of points
188203
if setup.sort && iszero(triangulationcount % setup.sort_interval)

src/hilbertsort.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,9 @@ end
137137

138138
#hilbertsort!(a::Array{T,1}) where {T<:AbstractPoint2D} = hilbertsort!(backward, backward, coordinatey, a, 1, length(a))
139139
#hilbertsort!(a::Array{T,1}, lo::Int64, hi::Int64, lim::Int64) where {T<:AbstractPoint2D} = hilbertsort!(backward, backward, coordinatey, a, lo, hi, lim)
140+
"""
141+
Hilbert Sorting. If `carry` is specified, this array will be permuted in line with the
142+
specified array.
143+
"""
140144
hilbertsort!(a::Vector, carry=nothing) = hilbertsort!(backward, backward, backward, coordinatez, a, 1, length(a), 8, carry)
141145
hilbertsort!(a::Vector, lo::Int64, hi::Int64, lim::Int64) = hilbertsort!(backward, backward, backward, coordinatey, a, lo, hi, lim)

0 commit comments

Comments
 (0)