Home

StencilDifferenzen

StencilDifferenzen, often referred to in English as stencil differences, denote a family of numerical techniques for approximating derivatives by forming linear combinations of function values at a fixed pattern of grid points, called a stencil, centered at the point where the derivative is to be estimated. The weights of the combination are chosen to match the derivative up to a desired order of accuracy and to respect the geometry of the grid.

In one dimension, a simple central first-derivative stencil uses three points: (u_{i+1} − u_{i−1})/(2h), yielding a second-order

In two dimensions, the standard five-point stencil for the discrete Laplacian at (i,j) is (u_{i+1,j} + u_{i−1,j}

Stencils are linear operators and can be viewed as convolutions on regular grids or as sparse matrices

StencilDifferenzen underpin finite difference methods for solving partial differential equations, including Poisson, heat, and wave equations,

accurate
approximation.
The
second-derivative
central
stencil
is
(u_{i+1}
−
2u_i
+
u_{i−1})/h^2,
also
second-order
accurate.
Higher-order
stencils
employ
more
grid
points,
trading
a
wider
stencil
for
higher-order
error
terms.
+
u_{i,j+1}
+
u_{i,j−1}
−
4u_{i,j})/h^2,
with
O(h^2)
error.
Nine-point
variants
add
diagonal
neighbors
to
improve
isotropy
or
accuracy.
Stencil
patterns
extend
similarly
to
three
dimensions.
in
a
finite-difference
discretization.
Near
boundaries,
one-sided
stencils
or
ghost
points
are
used,
and
on
nonuniform
grids
the
weights
depend
on
local
spacing.
offering
a
simple
and
efficient
approach
on
structured
grids.