# mhd_sandbox.grid

*module*

A periodic, cell-centred rectangular grid.

[View source](https://github.com/max-models/mhd-sandbox/blob/devel/src/mhd_sandbox/grid.py#L1-L1)

## mhd_sandbox.grid.Grid

*class* · *dataclass*

```python
class Grid
```

A box ``lower_bound`` to ``upper_bound`` split into ``num_gridpoints`` cells.

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

[View source](https://github.com/max-models/mhd-sandbox/blob/devel/src/mhd_sandbox/grid.py#L8-L47)

### mhd_sandbox.grid.Grid.lower_bound

*attribute* · *instance attribute*

```python
lower_bound: tuple[float, ...]
```

[View source](https://github.com/max-models/mhd-sandbox/blob/devel/src/mhd_sandbox/grid.py#L15-L15)

### mhd_sandbox.grid.Grid.num_gridpoints

*attribute* · *instance attribute*

```python
num_gridpoints: tuple[int, ...]
```

[View source](https://github.com/max-models/mhd-sandbox/blob/devel/src/mhd_sandbox/grid.py#L17-L17)

### mhd_sandbox.grid.Grid.upper_bound

*attribute* · *instance attribute*

```python
upper_bound: tuple[float, ...]
```

[View source](https://github.com/max-models/mhd-sandbox/blob/devel/src/mhd_sandbox/grid.py#L16-L16)

### mhd_sandbox.grid.Grid.ndim

*property*

```python
ndim: int
```

Return the number of axes.

[View source](https://github.com/max-models/mhd-sandbox/blob/devel/src/mhd_sandbox/grid.py#L35-L37)

### mhd_sandbox.grid.Grid.spacing

*property*

```python
spacing: tuple[float, ...]
```

Return the cell widths.

[View source](https://github.com/max-models/mhd-sandbox/blob/devel/src/mhd_sandbox/grid.py#L40-L47)
