chemreac.util.grid¶
Grid related utilities for one dimensional grid of arbitrary spacing.
- chemreac.util.grid.padded_centers(x, nsidep)[source]¶
Parameters: x: sequence
strictly monotonically increasing sequence of positions of bin separators.
nsidep: integer
number of padding bins: (nstencil-1)/2
- chemreac.util.grid.pxci_to_bi(nstencil, N)[source]¶
Generates a translation list converting x center indicesex starting at 0, which includes padding bins and into bin indices.
Parameters: nstencil: integer
Number of stencil points used
N: integer
Number of bins
Returns: list of bin indices.
- chemreac.util.grid.stencil_pxci_lbounds(nstencil, N, lrefl=False, rrefl=False)[source]¶
Generates a list of lower bounds in padded centers for each bin index for use in fintie difference scheme.
Parameters: nstencil: int
Number of stencil points used
N: int
Number of bins
lrefl, rrefl: bool
left and right reflective boundaries