Skip to content

Conversation

jhale
Copy link
Member

@jhale jhale commented Oct 14, 2024

There is currently no easy way to create e.g. a unit interval living in 2d or
3d geometric space.

After discussion of this implementation I will implement the others the same way.

@jhale jhale requested a review from garth-wells October 14, 2024 15:48
@jhale jhale requested a review from jorgensd October 14, 2024 15:49
@jhale
Copy link
Member Author

jhale commented Oct 15, 2024

I will now do the work on the C++ interface to get this parameter up to Geometry.

@@ -72,7 +72,7 @@ refine(const mesh::Mesh<T>& mesh,

mesh::Mesh<T> mesh1 = mesh::create_mesh(
mesh.comm(), mesh.comm(), cell_adj.array(), mesh.geometry().cmap(),
mesh.comm(), new_vertex_coords, xshape, partitioner);
mesh.comm(), new_vertex_coords, xshape, mesh.geometry().dim(), partitioner);
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn’t xshape[1] and mesh.geometry().dim() be the same?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes - but in terms of the code being correct in meaning, the former is the shape of the geometry data and the latter is the geometric dimension.

Copy link
Member

Choose a reason for hiding this comment

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

Do we check if they match? We should probably add some sanity checks.

@jhale
Copy link
Member Author

jhale commented Jul 18, 2025

Will have to look at this post-release - it would still be very useful to have "affine domain" non-affine mesh so that we can push-forward an affine domain with an analytical map with higher-order accuracy.

@garth-wells
Copy link
Member

Will have to look at this post-release - it would still be very useful to have "affine domain" non-affine mesh so that we can push-forward an affine domain with an analytical map with higher-order accuracy.

I would like to make CoordinateElement as independent of Basix as possible in order to support a range of possible maps. Maybe we should have something like CellMap that is more generic.

Dealing with this could also resolve #3815. We should gave for the mesh module/namespace to have no dependency on the fem module/namespace.

@jorgensd
Copy link
Member

Will have to look at this post-release - it would still be very useful to have "affine domain" non-affine mesh so that we can push-forward an affine domain with an analytical map with higher-order accuracy.

I would like to make CoordinateElement as independent of Basix as possible in order to support a range of possible maps. Maybe we should have something like CellMap that is more generic.

Dealing with this could also resolve #3815. We should gave for the mesh module/namespace to have no dependency on the fem module/namespace.

It would be a good idea to decouple the CoordinateElement from basix. However, to do so, we need a rather large redesign from the C++ side and carefully think about what we need to expose to make the CoordinateElement complete and usable for external packages (dolfinx_mpc, asimov-contact etc), as by currently providing the escape hatch to the basix element, these libraries can access information we do not currently expose in DOLFINx.

As a side note; Many other finite element software do treat the CoordinateElement as any standard finite element.

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