Stencil (numerical Analysis)
   HOME

TheInfoList



OR:

In
mathematics Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
, especially the areas of
numerical analysis Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic computation, symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). It is the study of ...
concentrating on the numerical solution of partial differential equations, a stencil is a geometric arrangement of a nodal group that relate to the point of interest by using a numerical approximation routine. Stencils are the basis for many algorithms to numerically solve
partial differential equation In mathematics, a partial differential equation (PDE) is an equation which imposes relations between the various partial derivatives of a Multivariable calculus, multivariable function. The function is often thought of as an "unknown" to be sol ...
s (PDE). Two examples of stencils are the
five-point stencil In numerical analysis, given a square grid in one or two dimensions, the five-point stencil of a point in the grid is a stencil made up of the point itself together with its four "neighbors". It is used to write finite difference approximations to ...
and the
Crank–Nicolson method In numerical analysis, the Crank–Nicolson method is a finite difference method used for numerically solving the heat equation and similar partial differential equations. It is a second-order method in time. It is implicit in time, can be wri ...
stencil. Stencils are classified into two categories:
compact Compact as used in politics may refer broadly to a pact or treaty; in more specific cases it may refer to: * Interstate compact * Blood compact, an ancient ritual of the Philippines * Compact government, a type of colonial rule utilized in British ...
and non-compact, the difference being the layers from the point of interest that are also used for calculation. In the notation used for one-dimensional stencils n-1, n, n+1 indicate the time steps where timestep n and n-1 have known solutions and time step n+1 is to be calculated. The spatial location of finite volumes used in the calculation are indicated by j-1, j and j+1.


Etymology

Graphical representations of node arrangements and their coefficients arose early in the study of PDEs. Authors continue to use varying terms for these such as "relaxation patterns", "operating instructions", "lozenges", or "point patterns". The term "stencil" was coined for such patterns to reflect the concept of laying out a
stencil Stencilling produces an image or pattern on a surface, by applying pigment to a surface through an intermediate object, with designed holes in the intermediate object, to create a pattern or image on a surface, by allowing the pigment to reach ...
in the usual sense over a computational grid to reveal just the numbers needed at a particular step.


Calculation of coefficients

The
finite difference coefficient In mathematics, to approximate a derivative to an arbitrary order of accuracy, it is possible to use the finite difference. A finite difference can be central, forward or backward. Central finite difference This table contains the coefficients o ...
s for a given stencil are fixed by the choice of node points. The coefficients may be calculated by taking the derivative of the
Lagrange polynomial In numerical analysis, the Lagrange interpolating polynomial is the unique polynomial of lowest degree of a polynomial, degree that polynomial interpolation, interpolates a given set of data. Given a data set of graph of a function, coordinate p ...
interpolating between the node points, by computing the
Taylor expansion In mathematics, the Taylor series or Taylor expansion of a function is an infinite sum of terms that are expressed in terms of the function's derivatives at a single point. For most common functions, the function and the sum of its Taylor serie ...
around each node point and solving a linear system, or by enforcing that the stencil is exact for
monomial In mathematics, a monomial is, roughly speaking, a polynomial which has only one term. Two definitions of a monomial may be encountered: # A monomial, also called power product, is a product of powers of variables with nonnegative integer exponent ...
s up to the degree of the stencil. For equi-spaced nodes, they may be calculated efficiently as the
Padé approximant In mathematics, a Padé approximant is the "best" approximation of a function near a specific point by a rational function of given order. Under this technique, the approximant's power series agrees with the power series of the function it is ap ...
of x^s \cdot (\log x)^m, where m is the order of the stencil and s is the ratio of the distance between the leftmost derivative and the left function entries divided by the grid spacing.{{cite journal, last1=Fornberg, first1=Bengt, title=Classroom Note: Calculation of Weights in Finite Difference Formulas, journal=SIAM Review, date=January 1998, volume=40, issue=3, pages=685–691, doi=10.1137/S0036144596322507, bibcode=1998SIAMR..40..685F


See also

*
Compact stencil In mathematics, especially in the areas of numerical analysis called numerical partial differential equations, a compact stencil is a type of stencil that uses only nine nodes for its discretization method in two dimensions. It uses only the cent ...
*
Non-compact stencil In numerical mathematics, a non-compact stencil is a type of discretization method, where any node surrounding the node of interest may be used in the calculation. Its computational time grows with an increase of layers of nodes used. Non-compact ...
*
Five-point stencil In numerical analysis, given a square grid in one or two dimensions, the five-point stencil of a point in the grid is a stencil made up of the point itself together with its four "neighbors". It is used to write finite difference approximations to ...


References

* W. F. Spotz
High-Order Compact Finite Difference Schemes for Computational Mechanics
PhD thesis, University of Texas at Austin, Austin, TX, 1995. * Communications in Numerical Methods in Engineering, Copyright © 2008 John Wiley & Sons, Ltd. Numerical differential equations