Closed marc-git closed 7 months ago
Hi, the code in this folder has been tested with dolfinx version 0.6.0. I'm aware that there has been new releases till version 0.7.3, I didn't have the time to update everything. In the coming weeks/months, I will try to update the repo to the latest version with some additional examples.
In the meantime, the error you reported can be solved in different ways:
self.zero_p.x.array[:] = 0.
# Alternatively
self.zero_p.interpolate(lambda x: 0.0 + 0.0 * x[0])
no worries. Looking forward to it. This example is very nicely written.
Hi, the code at Cavity 2D doesn't run anymore as is. Adding the data type to the domain fixes the first error:
self.domain = create_rectangle(MPI.COMM_WORLD,[np.array([0, 0]), np.array([1, 1])], [N, N], CellType.triangle, np.float64, GhostMode.none)
Then I get:
AttributeError: 'Vector' object has no attribute 'set'
related to
self.zero_p.x.set(0.0)