Skip to content

Conversation

@pjaap
Copy link
Member

@pjaap pjaap commented Jun 24, 2025

We need an additional / after the q flag, as stated in 10.20347/WIAS.TECHREPORT.13 in section 4.2.3.

The old default of 20 seems to large for me. I adjusted it to 10 for TetGen.

Small demo code generating two unit cubes with different maxvolume constains:


function foogrid(;
        h = 1.0,
        H = 2.0
    )

    builder = SimplexGridBuilder(; Generator = TetGen)

    # bottom
    p01 = point!(builder, 0, 0, 0)
    p02 = point!(builder, 1, 0, 0)
    p03 = point!(builder, 1, 1, 0)
    p04 = point!(builder, 0, 1, 0)
    facet!(builder, p01, p02, p03, p04)

    # central intersection
    p11 = point!(builder, 0, 0, 1)
    p12 = point!(builder, 1, 0, 1)
    p13 = point!(builder, 1, 1, 1)
    p14 = point!(builder, 0, 1, 1)
    facet!(builder, p11, p12, p13, p14)

    # top
    p21 = point!(builder, 0, 0, 2)
    p22 = point!(builder, 1, 0, 2)
    p23 = point!(builder, 1, 1, 2)
    p24 = point!(builder, 0, 1, 2)
    facet!(builder, p21, p22, p23, p24)


    # front face
    facet!(builder, p01, p02, p12, p11)
    facet!(builder, p11, p12, p22, p21)

    # right face
    facet!(builder, p02, p03, p13, p12)
    facet!(builder, p12, p13, p23, p22)

    # back face
    facet!(builder, p03, p04, p14, p13)
    facet!(builder, p13, p14, p24, p23)

    # left face
    facet!(builder, p04, p01, p11, p14)
    facet!(builder, p14, p11, p21, p24)


    # upper cell region
    cellregion!(builder, 1)
    maxvolume!(builder, h)
    regionpoint!(builder, 0.5, 0.5, 1.5)

    # lower cell region
    cellregion!(builder, 2)
    maxvolume!(builder, H)
    regionpoint!(builder, 0.5, 0.5, 0.5)

    options!(builder; minangle = 10)

    return simplexgrid(builder)
end

gridplot(foogrid(h = 0.0001, H=1), Plotter=GLMakie, yplanes = [0.5], scene3d = :LScene)

This was the situation before, very poor quality, angle was not respected
before

This is the situation with minangle = 20
after

This is the situation with minangle = 10
after_10

pjaap added 2 commits June 24, 2025 15:24
We need an additional "/" after the "q" flag, as stated in 10.20347/WIAS.TECHREPORT.13 chapter 4.2.3.

The previous default of "20" produces impractical results, so adjest the default to 10.
@pjaap pjaap requested a review from j-fu June 24, 2025 13:33
@pjaap
Copy link
Member Author

pjaap commented Jun 24, 2025

Tests need adjustments to the new meshing. Will change that after the new default etc is approved

@pjaap
Copy link
Member Author

pjaap commented Jun 24, 2025

Test values are updated. Is ready for final review and merge

@j-fu
Copy link
Member

j-fu commented Jun 24, 2025

LGTM

@pjaap pjaap merged commit fad46ec into master Jun 24, 2025
8 checks passed
@pjaap pjaap deleted the fix/tetgen-minangle branch June 24, 2025 15:06
chmerdon added a commit to WIAS-PDELib/ExtendableFEM.jl that referenced this pull request Jun 25, 2025
pjaap pushed a commit to WIAS-PDELib/ExtendableFEM.jl that referenced this pull request Jun 25, 2025
- changed test value due to change in grid from WIAS-PDELib/SimplexGridFactory.jl#26
- Interesse tolerante for macos tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants