The sequence of subdomains.array()

Hello,

I generated a mesh like this


and tried to set red areas and blue areas with different values.

So I used

subdomains.array()

but the output of this code is
image

I was wondering why the output was in this sequence. Is there a way to check the one-one correspondence between this array and the mesh.

Is anyone know this? Thank you in advance.

A mesh has cells. You can loop through them with dolfin.cells(mesh) to extract information such as the midpoint etc.

You need to consider that your mesh is unstructured, so the way its ordered is up to the mesh partitioner/mesh creation algorithm.