Dear all,
my dolfinx.mesh cannot work even for the simplest unit interval mesh generation. Here is the code:
from mpi4py import MPI
import numpy as np
import ufl
from dolfinx import mesh
comm = MPI.COMM_WORLD
nx = 20
msh = mesh.create_unit_interval(comm,nx)
and here is the error message:
Exception has occurred: TypeError
create_interval_float64(): incompatible function arguments. The following argument types are supported:
1. create_interval_float64(comm: MPICommWrapper, n: int, p: collections.abc.Sequence[float], ghost_mode: dolfinx.cpp.mesh.GhostMode, partitioner: collections.abc.Callable[[MPICommWrapper, int, collections.abc.Sequence[dolfinx.cpp.mesh.CellType], collections.abc.Sequence[numpy.ndarray[dtype=int64, writable=False]]], dolfinx.cpp.graph.AdjacencyList_int32] | None) → dolfinx.cpp.mesh.Mesh_float64Invoked with types: Intracomm, int, list, dolfinx.cpp.mesh.GhostMode, NoneType
File “/home/yjin6/Work/FEnicsX demo/import ufl.py”, line 8, in
msh = mesh.create_unit_interval(comm,nx)
TypeError: create_interval_float64(): incompatible function arguments. The following argument types are supported:
1. create_interval_float64(comm: MPICommWrapper, n: int, p: collections.abc.Sequence[float], ghost_mode: dolfinx.cpp.mesh.GhostMode, partitioner: collections.abc.Callable[[MPICommWrapper, int, collections.abc.Sequence[dolfinx.cpp.mesh.CellType], collections.abc.Sequence[numpy.ndarray[dtype=int64, writable=False]]], dolfinx.cpp.graph.AdjacencyList_int32] | None) → dolfinx.cpp.mesh.Mesh_float64Invoked with types: Intracomm, int, list, dolfinx.cpp.mesh.GhostMode, NoneType
I have tested my py4mpi that worked well. I am very confused which argument type is not accepted for the mesh generation.