Astrophysics (Index) | About |
A stencil (in numerical methods, i.e., methods to solve mathematical problems through computation) is a pattern indicating the choice of data used to calculate data at a "point". Stencils are used in numerically solving partial differential equations (PDEs).
In the case of PDE variables that refer to space dimensions, e.g., where something across space is changing over time, a stencil can be thought of as the surrounding points in space from which data is used to update the data for a given point. For example, with the use with a cubical grid, a given point's stencil could be the six points consisting of those immediately above, below, on each side, and in front of and behind the given point. An alternate such stencil could be one that includes all 26 points that form a cube surrounding the point in question.
The concept is also used when the "space" being handle includes a time dimension and/or other dimensions (e.g., momentum), i.e., any variables which the specific problem can be treat in a similar way to space. The concept has also been applied to non-regular grids, and for methods using something other than points, e.g., methods that use a grid of volumes.