discretize.TreeMesh.TreeCell

class discretize.TreeMesh.TreeCell

Bases: object

A Cell of the TreeMesh

This cannot be created in python, it can only be accessed by indexing the TreeMesh object.

This is also the object that is passed to the user defined refine function when calling TreeMesh.refine(func).

Notes

When called as part of the refine function, only the x0, center, and h properties are valid.

Attributes:
center

numpy.array of length dim

dim

“int dimension of cell

edges

indexes of this cell’s edges

faces

indexes of this cell’s faces

h

numpy.array of length dim

index

integer index of this cell

neighbors

The indexes of this cell’s neighbors

nodes

indexes of this cell’s nodes

x0

numpy.array of length dim

Attributes

TreeCell.center

numpy.array of length dim

TreeCell.dim

“int dimension of cell

TreeCell.edges

indexes of this cell’s edges

Returns:
Return type:list of ints
TreeCell.faces

indexes of this cell’s faces :returns: :rtype: list of ints

TreeCell.h

numpy.array of length dim width of this cell

TreeCell.index

integer index of this cell

TreeCell.neighbors

The indexes of this cell’s neighbors

Indexes of this cell’s neighbors. If a cell has more than one neighbor in a certain direction (i.e. when a level changes between adjacent cells), then that entry will also be a list of all of those neighbor indices. The list is order -x, +x, -y, +y, -z, +z. If a cell has no neighbor in that direction, the value will be -1.

Returns:
Return type:list of ints or list of ints
TreeCell.nodes

indexes of this cell’s nodes

Returns:
Return type:list of ints
TreeCell.x0

numpy.array of length dim

Methods