from dolfinx import mesh
from dolfinx.fem import FunctionSpace
from mpi4py import MPI
import numpy as np
Lx,Ly = 1,1.1
xL=[0,0]
xR=[Lx,Ly]
points = [0., 8.]
mesh = mesh.create_interval(MPI.COMM_WORLD,8,points)
domain = mesh.create_rectangle(MPI.COMM_WORLD,[np.array(xL), np.array(xR)],[4, 4], mesh.CellType.triangle)
V = FunctionSpace(mesh,("CG", 2))
There is a create_rectangle in my mesh.py. For some reason I get:
AttributeError: 'Mesh' object has no attribute 'create_rectangle'
for an Anaconda installation to a virtual environment “fenicsx-env”. Anyone can shed some light on what to do to create_rectangle?
I’m using Visual Studio Code and so far the autocomplete dropdown does see create_interval but not create_rectangle although mesh.py does have create_rectangle defenition…