Skip to content

Conversation

@pjaap
Copy link
Member

@pjaap pjaap commented Dec 8, 2025

This creates a grid without any adjacency information form a given grid.

Cells are duplicated and each cell has independent nodes. Some properties like

  • CellRegions
  • BFaceRegion
  • BFaceCells

are also transferred.

I intend to use it for broken VTK exports.

@pjaap
Copy link
Member Author

pjaap commented Dec 9, 2025

The Pr is ready now. We can now do the following with Paraview:

grid = uniform_refine( grid_unitsquare( Triangle2D ), 3)

# explode the grid
ex_grid = explode( grid )

# write cell-wise random node data (e.g.,  discontinuous higher order data)
writeVTK("result.vtu", ex_grid, :some_random_node_data => rand(num_nodes(ex_grid)))

This results in

grafik

@j-fu what do you think?

@j-fu
Copy link
Member

j-fu commented Dec 10, 2025

  • For me, the name seems a bit misleading. Something related to "broken" as in "broken FE space" might be more clear
  • Dont't wee need an accompanying method which lifts fe functions from the continuous to the broken space

@chmerdon
Copy link
Member

A broken FE space does not require a broken/exploded grid (in the sense that there are no shared vertex ids). In fact broken and continuous FE spaces are equal on broken/exploded grids. However, the usual DG operators in ExtendableFEM would not work on the exploded grid (since every face is now twice in FaceNodes and only has one cell neighbour), for that one would have to glue the cells together again to restore the neighbourhood information. I think @pjaap solely wants this to prepare piecewise plotting data for paraview, but not for any actual discretization schemes. Therefore, I think it is okay to call it exploded and not broken. Concerning the lifting, the usual lazy_interpolate! function allows to interpolate any FE function from the original grid to (any FESpace on) the exploded grid.

@pjaap
Copy link
Member Author

pjaap commented Dec 11, 2025

The naming was suggested by an LLM^^ When I investigated how to pass piecewise linear cell data to Paraview.
And yes, as @chmerdon assumes, the method is simply a tool for postprocessing and Paraview export.

  • since parent information is generated and stored, I also see it as similar to uniform_refine
  • this method also enables us to export second order cell information to Paraview by interpolating a result on grid |> explode |> uniform_refine
  • other possible names: crack or shatter ?

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.

4 participants