postgkyl.local_poly

postgkyl.local_poly(data, *, npoints=2, inplace=False, tag=None, label=None)

Evaluate the DG polynomial cell-by-cell onto a plotting mesh that keeps every inter-cell discontinuity visible, instead of the continuous refined mesh interpolate produces.

npoints reference points span the whole cell ([-1, 1], endpoints included) and a NaN is spliced in at every cell interface, so a plot breaks the curve there rather than drawing a spuriously smooth line across it.

Basis, polynomial order, and value_form are properties of data itself, fixed at load time, same as interpolate. The result is flagged interpolated=True so it becomes safe for element-wise math.

Parameters:
  • data – Dataset containing modal coefficients or cell-local DG nodal values.

  • npoints – Evaluation points in each cell and direction.

  • inplace – Mutate and return data instead of creating a dataset.

  • tag – Optional tag for the returned dataset.

  • label – Optional label for the returned dataset.

CLI: local_poly