Closed masonamccallum closed 1 year ago
Thanks for catching this! I think to make things flexible, it might be best to add a tol
keyword argument to build_periodic_boundary_maps
and make_periodic
. I should have a fix up in a sec.
What Gmsh mesh does the old tolerance fail for?
Added in https://github.com/jlchan/StartUpDG.jl/commit/a8572c051313c206e07f5fa1fade2ad7c675361d.
If it's easy to add the Gmsh mesh for which periodicity fails, let me know - I'd like to add it in the test suite.
@masonamccallum this should be available in https://github.com/JuliaRegistries/General/pull/71246 when the new version is accepted.
Looking at the Gmsh file, it seems like the coordinates just have a little more roundoff error in them than the uniform_mesh
es that we create by hand.
In build_periodic_boundary_maps! NODETOL seems to be too tight of a tolerance. When using uniform_mesh(Tri(),16)...,rd) I get the required tolerance to successfully build periodic boundary maps 4e-14. When importing via GMSH I Get only 4e-12.
src/connectivity_functions.jl
Current code:
Line 160: NODETOL = 100 * max(eps.((LX, LY))...)
Potential fix:Line 160: NODETOL = 10000 * max(eps.((LX, LY))...)