Mesh.refine errror: Refinement only defined for simplices

Hi Everyone,

I am running into a runtime error when trying to uniformly refine a rectangular mesh.
Just running the snippet of code below gives me the error message ‘RuntimeError: Refinement only defined for simplices’:

Any idea what is causing it and how to solve it? I am new to FEniCSx so please bear with this simplistic question, thanks!

from mpi4py import MPI
from dolfinx import mesh
domain = mesh.create_unit_square(MPI.COMM_WORLD, 8, 8, cell_type=mesh.CellType.quadrilateral)
domain=mesh.refine(domain, redistribute=False)

We have not added support for refinement of quadrilateral/hexahedron yet. As uniformly refining a NxN unit square is simply creating a 2Nx2N unit square you could just do that instead.

Thank you for your answer, that makes sense!