Skip to content

Commit

Permalink
Update runtests.jl
Browse files Browse the repository at this point in the history
add tests with different types (of indices & coordinates) for gmsh Y ExtendableGrids
  • Loading branch information
jotaraz authored Aug 28, 2023
1 parent 3a9c5df commit 708b606
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ end
grid1 = simplexgrid(X, Y) #ExtendableGrids.simplexgrid_from_gmsh(path*"sto_2d.msh")

ExtendableGrids.load_simplexgrid_to_gmsh(grid1; filename=path*"testfile.msh")
grid2 = ExtendableGrids.simplexgrid_from_gmsh(path*"testfile.msh")
grid2 = ExtendableGrids.simplexgrid_from_gmsh(path*"testfile.msh"; Tc=Float32, Ti=Int64)
#gmsh.finalize()

@test seemingly_equal_with_sort(grid2, grid1;confidence=:low)
Expand All @@ -127,21 +127,21 @@ end
gmsh.clear()


grid1 = ExtendableGrids.simplexgrid_from_gmsh(path*"sto_2d.msh")
grid1 = ExtendableGrids.simplexgrid_from_gmsh(path*"sto_2d.msh"; Tc=Float64, Ti=Int64)
gmsh.clear()
ExtendableGrids.load_simplexgrid_to_gmsh(grid1; filename=path*"testfile.msh")
grid2 = ExtendableGrids.simplexgrid_from_gmsh(path*"testfile.msh")
grid2 = ExtendableGrids.simplexgrid_from_gmsh(path*"testfile.msh"; Tc=Float64, Ti=Int64)
#gmsh.finalize()

@test seemingly_equal_with_sort(grid1, grid2;confidence=:low)
@test seemingly_equal_with_sort(grid1, grid2;confidence=:full)

gmsh.clear()

grid1 = ExtendableGrids.simplexgrid_from_gmsh(path*"sto_3d.msh")
grid1 = ExtendableGrids.simplexgrid_from_gmsh(path*"sto_3d.msh"; Tc=Float32, Ti=Int64)
gmsh.clear()
ExtendableGrids.load_simplexgrid_to_gmsh(grid1; filename=path*"testfile.msh")
grid2 = ExtendableGrids.simplexgrid_from_gmsh(path*"testfile.msh")
grid2 = ExtendableGrids.simplexgrid_from_gmsh(path*"testfile.msh"; Tc=Float64, Ti=Int32)
#gmsh.finalize()

@test seemingly_equal_with_sort(grid1, grid2;confidence=:low)
Expand All @@ -153,7 +153,7 @@ end
gmsh.clear()
#grid2 =
#simplexgrid([0, 1, 2], [3, 4, 5])
grid2 = ExtendableGrids.simplexgrid_from_gmsh(path*"sto_3d.msh")
grid2 = ExtendableGrids.simplexgrid_from_gmsh(path*"sto_3d.msh"; Tc=Float32, Ti=Int32)
#gmsh.finalize()

@test !seemingly_equal_with_sort(grid1, grid2;confidence=:low)
Expand Down Expand Up @@ -204,10 +204,10 @@ end
gmsh.option.setNumber("General.Verbosity", 0)

path = ""
grid1 = ExtendableGrids.mixedgrid_from_gmsh(path*"mixedgrid_2d.msh")
grid1 = ExtendableGrids.mixedgrid_from_gmsh(path*"mixedgrid_2d.msh"; Tc=Float64, Ti=Int64)
gmsh.clear()
ExtendableGrids.load_mixedgrid_to_gmsh(grid1; filename=path*"testfile.msh")
grid2 = ExtendableGrids.mixedgrid_from_gmsh(path*"testfile.msh")
grid2 = ExtendableGrids.mixedgrid_from_gmsh(path*"testfile.msh"; Tc=Float32, Ti=UInt64)
gmsh.finalize()

@test seemingly_equal_with_sort(grid1, grid2;confidence=:low)
Expand All @@ -220,7 +220,6 @@ end




### Original tests:


Expand Down

0 comments on commit 708b606

Please sign in to comment.