Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow promotion of geometry dimension for built-in mesh creators. #3471

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

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.

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