Skip to content
Projects

mhd_sandbox.grid

A periodic, cell-centred rectangular grid.

Classes

NameDescription
GridA box lower_bound to upper_bound split into num_gridpoints cells.

Gridclassdataclass#

class Grid(lower_bound: tuple[float, ...], upper_bound: tuple[float, ...], num_gridpoints: tuple[int, ...])

A box lower_bound to upper_bound split into num_gridpoints cells.

The values live at the cell centres; every axis is periodic.

lower_boundattributeinstance attribute#

lower_bound: tuple[float, ...]

num_gridpointsattributeinstance attribute#

num_gridpoints: tuple[int, ...]

upper_boundattributeinstance attribute#

upper_bound: tuple[float, ...]

ndimproperty#

ndim: int

Return the number of axes.

spacingproperty#

spacing: tuple[float, ...]

Return the cell widths.