Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# -*- coding: utf-8 -*-
chemreac.util.grid ------------------ Grid related utilities for one dimensional grid of arbitrary spacing. """
else: elif random > 1.0 or random <= 0.0: raise ValueError("0 < random <= 1.0, or True => 1.0")
""" Parameters ========== x: sequence strictly monotonically increasing sequence of positions of bin separators. nsidep: integer number of padding bins: (nstencil-1)/2 """ 2*x[0]-xc[:nsidep][::-1], xc, 2*x[-1]-xc[-nsidep:][::-1] ))
""" 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.
""" range(N-1, N-nsidep-1, -1))
""" 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 """ for i in range(N)] |