Skip to content
Merged
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes

## v2.7.0 October 10, 2026
- Allow for TetGen.jl version 3. Consult the [TetGen.jl README](https://github.com/JuliaGeometry/TetGen.jl/blob/master/README.md) for
information on the different versions the upstream C++ TetGen code and its Julia binary package TetGen_jll.jl.

## v2.6.0 June 24, 2025

- Fixed `minangle` parameter forwarding to TetGen
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SimplexGridFactory"
uuid = "57bfcd06-606e-45d6-baf4-4ba06da0efd5"
version = "2.7.0"
authors = ["Juergen Fuhrmann <juergen.fuhrmann@wias-berlin.de>", "Patrick Jaap <patrick.jaap@wias-berlin.de>"]
version = "2.6.1"

[deps]
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Expand All @@ -26,6 +26,6 @@ GridVisualize = "1.7.0"
LinearAlgebra = "1.9"
MeshIO = "0.4, 0.5"
Printf = "1.6"
TetGen = "1.5,2"
TetGen = "1.5,2,3"
Triangulate = "2.3.1, 3"
julia = "1.9"
1 change: 1 addition & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TetGen = "c5d3f3f7-f850-59f6-8a2e-ffc6dc1317ea"
TetGen_jll = "b47fdcd6-d2c1-58e9-bbba-c1cee8d8c179"
Triangulate = "f7e6ffb2-c36d-4f8f-a77e-16e897189344"
50 changes: 37 additions & 13 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ using ExtendableGrids
using CairoMakie
using GridVisualize
using Triangulate
using TetGen
using TetGen, TetGen_jll
using LinearAlgebra


Expand Down Expand Up @@ -47,7 +47,7 @@ CairoMakie.activate!(; visible = false)
# Generated point numbers depend on floating point operations,
# so we don't insist in exact matches
function testgrid(grid::ExtendableGrid, testdata)
return all(isapprox.((num_nodes(grid), num_cells(grid), num_bfaces(grid)), testdata, rtol = 0.1))
return all(isapprox.((num_nodes(grid), num_cells(grid), num_bfaces(grid)), testdata, rtol = 0.2))
end
testgrid(builder::SimplexGridBuilder, testdata) = testgrid(simplexgrid(builder), testdata)

Expand Down Expand Up @@ -91,6 +91,7 @@ testgrid(builder::SimplexGridBuilder, testdata) = testgrid(simplexgrid(builder),

grid = simplexgrid(points, cells, cellregions, bfaces, bfaceregions)
end

@test testgrid(test_ctriangulateio(), (177, 319, 33))

function test_triangulateio()
Expand Down Expand Up @@ -225,11 +226,18 @@ end
grid = simplexgrid(SimplexGridFactory.TetGenType, TetGen, tio; kwargs...)
end

@test testgrid(test_simplecube(), (109, 286, 198))
@test testgrid(test_simplecube(; flags = "pAaqQD"), (109, 286, 198))
@test testgrid(test_simplecube(; maxvolume = 0.05), (50, 68, 96))
if pkgversion(TetGen_jll) < v"1.6.0"
@test testgrid(test_simplecube(), (109, 286, 198))
@test testgrid(test_simplecube(; flags = "pAaqQD"), (109, 286, 198))
@test testgrid(test_simplecube(; maxvolume = 0.05), (50, 68, 96))
@test testgrid(test_simplecube(; unsuitable = test_tetunsuitable), (242, 1095, 198))
else
@test testgrid(test_simplecube(), (63, 192, 96))
@test testgrid(test_simplecube(; flags = "pAaqQD"), (63, 192, 96))
@test testgrid(test_simplecube(; maxvolume = 0.05), (14, 24, 24))
@test testgrid(test_simplecube(; unsuitable = test_tetunsuitable), (167, 788, 110))

@test testgrid(test_simplecube(; unsuitable = test_tetunsuitable), (242, 1095, 198))
end
end

@testset "SimplexGridBuilder 3d" begin
Expand Down Expand Up @@ -269,7 +277,11 @@ end
end

@test SimplexGridFactory.tetgenio(test_buildercube0()) isa RawTetGenIO
@test testgrid(test_buildercube(; unsuitable = test_tetunsuitable), (242, 1095, 198))
if pkgversion(TetGen_jll) < v"1.6.0"
@test testgrid(test_buildercube(; unsuitable = test_tetunsuitable), (242, 1095, 198))
else
@test testgrid(test_buildercube(; unsuitable = test_tetunsuitable), (167, 788, 110))
end
end

@testset "examples2d.jl" begin
Expand All @@ -286,10 +298,17 @@ end;

@testset "examples3d.jl" begin
include("../examples/examples3d.jl")
@test testgrid(tetrahedralization_of_cube(), (718, 2456, 1094))
@test testgrid(tet_cube_with_primitives(), (5658, 27324, 6888))
@test testgrid(glue_3d(), (29832, 173202, 13200))
@test testgrid(stl_3d(), (5979, 20640, 9818))
if pkgversion(TetGen_jll) < v"1.6.0"
@test testgrid(tetrahedralization_of_cube(), (718, 2456, 1094))
@test testgrid(tet_cube_with_primitives(), (5658, 27324, 6888))
@test testgrid(glue_3d(), (29832, 173202, 13200))
@test testgrid(stl_3d(), (5979, 20640, 9818))
else
@test testgrid(tetrahedralization_of_cube(), (417, 1755, 484))
@test testgrid(tet_cube_with_primitives(), (4186, 21037, 3830))
@test testgrid(glue_3d(), (29832, 173202, 13200))
@test testgrid(stl_3d(), (2869, 10116, 4584))
end
end;

# @testset " PlutoGridFactory.jl" begin
Expand Down Expand Up @@ -387,8 +406,13 @@ end;
end
@test testgrid(prim2d(), (106, 179, 50))
@test testgrid(prim2d_lineto(), (24, 30, 16))
@test testgrid(prim3d(), (591, 2872, 822))
@test testgrid(prim3d_moveto(), (207, 564, 368))
if pkgversion(TetGen_jll) < v"1.6.0"
@test testgrid(prim3d(), (591, 2872, 822))
@test testgrid(prim3d_moveto(), (207, 564, 368))
else
@test testgrid(prim3d(), (509, 2705, 652))
@test testgrid(prim3d_moveto(), (137, 446, 214))
end
end

@testset "builderplot" begin
Expand Down
Loading