Jump to content

Nine-point stencil

From Wikipedia, the free encyclopedia

Innumerical analysis,given asquare gridin two dimensions, thenine-point stencilof a point in the grid is astencilmade up of the point itself together with its eight "neighbors". It is used to writefinite differenceapproximations toderivativesat grid points. It is an example fornumerical differentiation.This stencil is often used to approximate theLaplacianof a function of two variables.

An illustration of the nine-point stencil in two dimensions.

Motivation

[edit]

If we discretize the 2DLaplacianby usingcentral-difference methods,we obtain the commonly usedfive-point stencil,represented by the followingconvolutionkernel:

Starting from homogeneous initial conditions with only one point-like perturbation, the correct growth process would yield a circle (left). If growth is faster along the coordinate axes, which is caused by the anisotropic effect of central difference discretization, the circle would turn into star-shaped structure, as the errors propagate (right):[1].

Even though it is simple to obtain and computationally lighter, the centraldifference kernelpossess an undesired intrinsicanisotropicproperty, since it doesn't take into account the diagonal neighbours. This intrinsic anisotropy poses a problem when applied on certain numerical simulations or when more accuracy is required, by propagating the Laplacian effect faster in thecoordinate axesdirections and slower in the other directions, thus distortiong the final result.[1]

This drawback calls for finding better methods for discretizing the Laplacian, reducing or eliminating the anisotropy.

Implementation

[edit]

The two most commonly usedisotropicnine-point stencils are displayed below, in their convolution kernel forms. They can be obtained by the following formula:[2][3]

The first one is known by Oono-Puri,[4][5][6][7][8]and it is obtained when γ=1/2.[2]

The second one is known by Patra-Karttunen or Mehrstellen,[1][7][8][9][10]and it is obtained when γ=1/3.[2]

Both are isotropic forms ofdiscrete Laplacian,[8]and in the limit of small Δx, they all become equivalent,[11]as Oono-Puri being described as the optimally isotropic form of discretization,[8]displaying reduced overall error,[2]and Patra-Karttunen having been systematically derived by imposing conditions of rotational invariance,[9]displaying smallest error around the origin.[2]

Desired anisotropy

[edit]

On the other hand, if controlledanisotropiceffects are a desired feature, when solvinganisotropic diffusionproblems for example, it is also possible to use the 9-point stencil combined withtensorsto generate them.

Consider the laplacian in the following form:

Where c is just a constant coefficient. Now if we replace c by the2nd rank tensorC:

Where c1 is the constant coefficient for the principal direction in x axis, and c2 is the constant coefficient for the secondary direction in y axis. In order to generate anisotropic effects, c1 and c2 must be different.

By multiplying it by therotation matrixQ, we obtain C', allowing anisotropic propagations in arbitrary directions other than thecoordinate axes.[12][13]

Which is very similar to theCauchy stress tensorin 2 dimensions. The anglecan be obtained by generating avector fieldin order to orientate the pattern as desired.[13]Then:

Or, for different anisotropic effects using the same vector field[14]

It is important to note that, regardless of the values of,the anisotropic propagation will occur parallel to the secondary direction c2 and perpendicular to the principal direction c1:[15].The resulting convolution kernel is as follows[13]

If, for example, c1=c2=1, the cxy component will vanish, resulting in the simplefive-point stencil,rendering no controlled anisotropy.

If c2>c1 and=0, the anisotropic effects will be more pronounced in the vertical axis.

if c2>c1 and=45 degrees, the anisotropic effects will be more pronounced in the upper-right / lower-left diagonal.

References

[edit]
  1. ^abcPatra, Michael; Karttunen, Mikko (2006). "Stencils with isotropic discretization error for differential operators".Numerical Methods for Partial Differential Equations.22(4): 3–7.doi:10.1002/num.20129.S2CID123145969.
  2. ^abcdeFomel, Sergey; Claerbout, Jon F. (9 October 1997)."Constructing anisotropicLaplacian operator ".Exploring three-dimensional implicit wavefield extrapolation with the helix transform.Stanford Exploration Project.
  3. ^Lindeberg, Tony."Scale-Space for Discrete Signals"(PDF).Stockholm: Royal Institute of Technology. pp. 22–23.
  4. ^Oono, Y.; Puri, S. (1987)."Computationally efficient modeling of ordering of quenched phases"(PDF).Physical Review Letters.58(8): 837.Bibcode:1987PhRvL..58..836O.doi:10.1103/PhysRevLett.58.836.PMID10035049.Free access icon
  5. ^Oono, Y.; Puri, S. (1988)."Study of phase-separation dynamics by use of cell dynamical systems. I. Modeling"(PDF).Physical Review A.38(1): 436.Bibcode:1988PhRvA..38..434O.doi:10.1103/PhysRevA.38.434.PMID9900182.Free access icon
  6. ^Sevink, G. J. A. (2015)."Rigorous embedding of cell dynamics simulations in the Cahn-Hilliard-Cook framework: Imposing stability and isotropy".Physical Review E.91(5): 4.Bibcode:2015PhRvE..91e3309S.doi:10.1103/PhysRevE.91.053309.hdl:1887/3194035.PMID26066281.Free access icon
  7. ^ab"Rotation-invariant Laplacian for 2D grids".21 March 2021.
  8. ^abcd"Investigation of Isotropic Laplacian Operators by Computer Simulation for A-B Diblock Copolymers"(PDF).IJCSNS International Journal of Computer Science and Network Security.18(5): 102–103. May 2018.Free access icon
  9. ^abThampi, Sumesh P.; Ansumali, Santosh; Adhikari, R.; Succi, Sauro (2013), "Isotropic discrete Laplacian operators from lattice hydrodynamics",Journal of Computational Physics,234:3–7,arXiv:1202.3299,Bibcode:2013JCoPh.234....1T,doi:10.1016/j.jcp.2012.07.037,S2CID14633171
  10. ^Lynch, Robert (7 January 1992),"Fundamental Solutions of 9-point Discrete Laplacians; Derivation and Tables",Department of Computer Science Technical Reports:2Free access icon
  11. ^Provatas, Nikolas; Elder, Ken (2010),Phase-Field Methods in Materials Science and Engineering(PDF),p. 219,doi:10.1002/9783527631520,ISBN9783527631520Free access icon
  12. ^McGinty, Bob (2012)."Coordinate Transforms".continuummechanics.org.
  13. ^abcWitkin, Andrew; Kass, Michael (1991),"Reaction-diffusion textures"(PDF),ACM SIGGRAPH Computer Graphics,25(4): 3–4,doi:10.1145/127719.122750Free access icon
  14. ^Sanderson, Allen R.; Kirby, Robert M.; Johnson, Chris R.; Yang, Lingfa (2006),"Advanced Reaction-Diffusion Models for Texture Synthesis"(PDF),Journal of Graphics Tools,11(3): 4,doi:10.1080/2151237X.2006.10129222,S2CID13132043
  15. ^Garnier, David-Henri; Schmidt, Martin-Pierre; Rohmer, Damien (2022),"Growth of oriented orthotropic structures with reaction/Diffusion",Structural and Multidisciplinary Optimization,65(11): 7–8,doi:10.1007/s00158-022-03395-7,S2CID253304840