Skip to content

Conversation

@jorgensd
Copy link
Member

Bug reported at discourse
MWE:

import dolfinx
import ufl
import numpy as np
points = np.array([[0, 0],  [1.2, 0],  [1.5, 1],  [0.2, 1]])
cells = np.array([[0, 1, 2],  [0, 2, 3]])
cell = ufl.Cell("triangle", geometric_dimension=2)
domain = ufl.Mesh(ufl.VectorElement("Lagrange", cell, 1))
mesh = dolfinx.mesh.create_mesh(MPI.COMM_WORLD, cells, points, domain)
print(mesh.topology.dim, mesh.geometry.dim)  # 2   2

mesh2=refine(mesh)
print(mesh2.topology.dim, mesh2.geometry.dim)  # 2 3

This is the least intrusive way of slicing the new_vertex_coordinates, as the returned midpoints are 3D.

@jorgensd jorgensd requested a review from chrisrichardson June 11, 2020 08:40
@chrisrichardson chrisrichardson merged commit d2aeab4 into master Jun 11, 2020
@chrisrichardson chrisrichardson deleted the dokken/fix-refine-2D branch June 11, 2020 09:27
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