mesh.cells() RuntimeError: array is not writeable
Hi everyone
Here is a sample code adapted from the mesh editor tutoral, when I run it then I get the error "RuntimeError: array is not writeable" with reference to the cells() command. Are there settings/flags to change this to writeable, or is this the wrong way to go about inputing cells into a mesh from generated arrays so they are protected?
from dolfin import *
coor = [[ 0, 0],
[ 1, 0],
[ 1, 1],
[ 0, 1]]
cell = [[0, 1, 2],
[0, 2, 3]]
mesh = Mesh()
editor = MeshEditor()
editor.
editor.
editor.
mesh.coordinate
mesh.cells()[:,:] = cell
editor.close()
Traceback (most recent call last):
File "/home/
mesh.
RuntimeError: array is not writeable
Cheers
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Nick Davies
- Solved:
- Last query:
- Last reply: