I am using Dolfinx and when I implement the codes in Fenicsx tutorial “component-wise dirichlet boundary condition”, I meet errors with these codes
domain=mesh.create_rectangle(MPI.COMM_WORLD,np.array([[0,0],[L,H]]),[30,30],cell_type=mesh.CellType.triangle)
element=VectorElement("CG",domain.ufl_cell(),1)
V=fem.FunctionSpace(mesh,element)
And errors are
File "/usr/lib/petsc/lib/python3/dist-packages/dolfinx/fem/function.py", line 450, in __init__
super().__init__(mesh.ufl_domain(), element)
AttributeError: module 'dolfinx.mesh' has no attribute 'ufl_domain'
and I don’t know why.
In addition, I also look into the dolfinx/mesh.py on my computer and I see
the line with waves says that cpp.mesh cannot be resolved by pylance.So can I just change this to dolfinx.mesh ?