iwopy.utils.RegularDiscretizationGrid.grad_coeffs_gridpoints(inds, vars, order=2, orderb=1)[source]

Calculates the gradient coefficients at grid points.

Parameters

inds: numpy.ndarray

The integer grid point indices, shape: (n_inds, n_dims)

vars: list of int, optional

The dimensions representing the variables wrt which to differentiate, shape: (n_vars,). Default is all dimensions

order: int or list of int

The finite difference order, 1 = forward, -1 = backward, 2 = centre

orderb: int list of int

The finite difference order at boundary points

Returns

gpts: numpy.ndarray

The grid points relevant for coeffs, shape: (n_gpts, n_dims)

coeffs: numpy.ndarray

The gradient coefficients, shape: (n_inds, n_vars, n_gpts)