meanas/docs/api/fdmath.md

26 lines
938 B
Markdown
Raw Normal View History

2026-04-18 15:05:35 -07:00
# fdmath
For Gridlock's default E-field Yee shifts, construct solver spacings as
`dxes = [grid.autoshifted_dxyz(), grid.dxyz]`. The forward E curl needs
distances between adjacent base-cell centers; the backward H curl needs
distances between adjacent upper cell edges. Reversing these two width families
introduces an error on graded grids that uniform grids hide.
If constructing the mesh directly from **forward derivative intervals** `d`,
with H samples at their midpoints, the backward intervals instead follow
`(d + numpy.roll(d, 1)) / 2` for periodic boundaries. These `d` arrays are
already center-to-center distances, whereas `grid.dxyz` contains base-cell
volume widths. Applying this averaging rule to `grid.dxyz` does not fix the
ordering error above.
2026-04-18 15:05:35 -07:00
::: meanas.fdmath
## Functional and sparse operators
::: meanas.fdmath.functional
::: meanas.fdmath.operators
::: meanas.fdmath.vectorization
::: meanas.fdmath.types