Skip to content

p-refinement of mesh geometry#4205

Draft
jhale wants to merge 21 commits into
mainfrom
jhale/interpolate-mesh-geometry
Draft

p-refinement of mesh geometry#4205
jhale wants to merge 21 commits into
mainfrom
jhale/interpolate-mesh-geometry

Conversation

@jhale
Copy link
Copy Markdown
Member

@jhale jhale commented May 7, 2026

Adds a single free function that can p-refine (and possibly coarsen?) an existing mesh.

Testing a bit limited: P1 to P2 and P1 to P1. Ideas welcome.

@jhale jhale requested a review from jorgensd May 7, 2026 18:37
basix::FiniteElement<T> b_element = basix::create_element<T>(
basix::element::family::P,
mesh::cell_type_to_basix_type(new_cmap.cell_shape()), new_cmap.degree(),
new_cmap.variant(), basix::element::dpc_variant::unset, false);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about this on the way home, and could we potentially here make a DG geometry if we would like to, i.e. have an input option for setting discontinuous to True here?

@jorgensd
Copy link
Copy Markdown
Member

jorgensd commented May 7, 2026

Adds a single free function that can p-refine (and possibly coarsen?) an existing mesh.

Testing a bit limited: P1 to P2 and P1 to P1. Ideas welcome.

See for instance the tests in IO4Dolfinx that goes from 1->3->1 and 1->2->1:
https://github.com/scientificcomputing/io4dolfinx/blob/main/tests/test_mesh.py#L11-L56

@jorgensd
Copy link
Copy Markdown
Member

jorgensd commented May 7, 2026

It's useful for IO as well, as it would allow you to read/write point data on higher order grids (and then linearize the grid after the fact).

Additionally, as the meshes share topology, it is easy to do interpolation between the two grids.

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.

2 participants