Hi all,
please consider the following MWE:
from mpi4py import MPI
from dolfinx import mesh, fem
from basix.ufl import element
import numpy as np
def main():
n = 6
domain = mesh.create_unit_square(MPI.COMM_WORLD, n, n, mesh.CellType.quadrilateral)
tdim = domain.topology.dim
fdim = tdim - 1
def right(x):
return np.isclose(x[0], 1.)
facets = mesh.locate_entities_boundary(domain, fdim, right)
submesh, entity_map, vertex_map, geom_map = mesh.create_submesh(domain, fdim, facets)
degree = 1
fe = element("P", submesh.basix_cell(), degree, shape=())
V = fem.functionspace(submesh, fe) # raises ValueError
if __name__ == "__main__":
main()
I am currently on dolfinx version 0.7.1 and get ValueError: Non-matching UFL cell and mesh cell shapes.
If the submesh is of codimension 0, i.e. the submesh also consists of quadrilaterial cells, it works.
Is this a bug?
Best wishes,
Philipp