Stencil Codes - Stencils

Stencils

The shape of the neighborhood used during the updates depends on the application itself. The most common stencils are the 2D or 3D versions of the von Neumann neighborhood and Moore neighborhood. The example above uses a 2D von Neumann stencil while LBM codes generally use its 3D variant. Conway's Game of Life uses the 2D Moore neighborhood. That said, other stencils such as a 25-point stencil for seismic wave propagation can be found, too.

5-point 2D stencil 6-point 3D stencil 25-point 3D stencil A selection of stencils used in various scientific applications.

Read more about this topic:  Stencil Codes