discretize.TensorMesh.cell_nodes#

property TensorMesh.cell_nodes#

The index of all nodes for each cell.

The nodes for each cell are listed following an “F” order: the first coordinate (x) changes faster than the second one (y). If the mesh is 3D, the second coordinate (y) changes faster than the third one (z).

Returns:
numpy.ndarray of int

Index array of shape (n_cells, 4) if 2D, or (n_cells, 8) if 3D

Notes

For a 2D mesh, the nodes indices for a single cell are returned in the following order:

2 -- 3
|    |
0 -- 1

For a 3D mesh, the nodes indices for a single cell are returned in the following order:

  6-----7
 /|    /|
4-----5 |
| |   | |
| 2---|-3
|/    |/
0-----1