Skip to content

Bug in cellmask! after uniform_refine a 3D grid #119

@pjaap

Description

@pjaap

MWE: create a cube and edit the region of the upper half

using ExtendableGrids, GridVisualize, GLMakie

The following code

grid = uniform_refine(grid_unitcube(Tetrahedron3D))
cellmask!(grid, [0.0, 0.0, 0.5], [1.0, 1.0, 1.0], 2) # upper half should be = 2
gridplot(grid, Plotter = GLMakie, xplanes = [0.0001])

results in
Image
...which is wrong (see the missing green tetrahedron)
While creating the grid "directly"

grid = simplexgrid(0:0.5:1, 0:0.5:1, 0:0.5:1)
cellmask!(grid, [0.0, 0.0, 0.5], [1.0, 1.0, 1.0], 2) # upper half should be = 2
gridplot(grid, Plotter = GLMakie, xplanes = [0.0001])

results in
Image
...which looks correct

@hadjimy fyi (this causes the weird demo results in our session)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions