<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Compact_stencil</id>
	<title>Compact stencil - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Compact_stencil"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Compact_stencil&amp;action=history"/>
	<updated>2026-05-12T15:52:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Compact_stencil&amp;diff=7073839&amp;oldid=prev</id>
		<title>imported&gt;Citation bot: Alter: url, via. URLs might have been anonymized. | Use this bot. Report bugs. | Suggested by Awkwafaba | #UCB_webform 137/500</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Compact_stencil&amp;diff=7073839&amp;oldid=prev"/>
		<updated>2025-04-22T01:39:18Z</updated>

		<summary type="html">&lt;p&gt;Alter: url, via. URLs might have been anonymized. | &lt;a href=&quot;/wiki143/index.php?title=En:WP:UCB&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;En:WP:UCB (page does not exist)&quot;&gt;Use this bot&lt;/a&gt;. &lt;a href=&quot;/wiki143/index.php?title=En:WP:DBUG&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;En:WP:DBUG (page does not exist)&quot;&gt;Report bugs&lt;/a&gt;. | Suggested by Awkwafaba | #UCB_webform 137/500&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{refimprove|date=July 2008}}&lt;br /&gt;
[[Image:CompactStencil.svg|right|thumb|150px|A 2D compact stencil using all 8 adjacent nodes, plus the center node (in red).]]&lt;br /&gt;
&lt;br /&gt;
In [[mathematics]], especially in the areas of [[numerical analysis]] called [[numerical partial differential equations]], a &amp;#039;&amp;#039;&amp;#039;compact stencil&amp;#039;&amp;#039;&amp;#039; is a type of [[stencil (numerical analysis)|stencil]] that uses only nine nodes for its [[discretization]] method in two dimensions.  It uses only the center node and the [[Adjacent (graph theory)|adjacent]] nodes. For any [[structured grid]] utilizing a compact stencil in 1, 2, or 3 [[dimension]]s the maximum number of [[Node (graph theory)|nodes]] is 3, 9, or 27 respectively. Compact stencils may be compared to [[non-compact stencil|non-compact stencils]]. Compact stencils are currently implemented in many [[partial differential equation]] solvers, including several in the topics of CFD, FEA, and other mathematical solvers relating to PDE&amp;#039;s&amp;lt;ref&amp;gt;{{Cite journal |last=Spotz |first=William F. |date=1996 |title=High-Order Compact Finite Difference Schemes for Computational Mechanics |url=https://www.researchgate.net/publication/2591103 |journal=The University of Texas at Austin |via=ResearchGate}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Communications in Numerical Methods in Engineering, Copyright © 2008 John Wiley &amp;amp; Sons, Ltd.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Two Point Stencil Example==&lt;br /&gt;
The two point stencil for the &amp;#039;&amp;#039;first derivative&amp;#039;&amp;#039; of a function is given by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
f&amp;#039;(x_0)=\frac{f\left(x_0 + h\right) - f\left(x_0 - h\right)}{2h} + O\left(h^2\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is obtained from the [[Taylor series]] expansion of the first derivative of the function given by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\begin{array} {l}&lt;br /&gt;
f&amp;#039;(x_0)=\frac{f\left(x_0 + h\right) - f(x_0)}{h} -\frac{f^{(2)}(x_0)}{2!}h - \frac{f^{(3)}(x_0)}{3!}h^2 - \frac{f^{(4)}(x_0)}{4!}h^3 + \cdots&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt;, we have:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\begin{array} {l}&lt;br /&gt;
f&amp;#039;(x_0)=-\frac{f\left(x_0 - h\right) - f(x_0)}{h} + \frac{f^{(2)}(x_0)}{2!}h - \frac{f^{(3)}(x_0)}{3!}h^2 + \frac{f^{(4)}(x_0)}{4!}h^3 + \cdots &lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Addition of the above two equations together results in the cancellation of the terms in odd powers of &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\begin{array} {l}&lt;br /&gt;
2f&amp;#039;(x_0)=&lt;br /&gt;
\frac{f\left(x_0 + h\right) - f(x_0)}{h}&lt;br /&gt;
-\frac{f\left(x_0 - h\right) - f(x_0)}{h}&lt;br /&gt;
-2\frac{f^{(3)}(x_0)}{3!}h^2 + \cdots&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\begin{array} {l}&lt;br /&gt;
f&amp;#039;(x_0)=&lt;br /&gt;
\frac{f\left(x_0 + h\right) - f\left(x_0 - h\right)}{2h} - \frac{f^{(3)}(x_0)}{3!}h^2 + \cdots&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\begin{array} {l}&lt;br /&gt;
f&amp;#039;(x_0)=&lt;br /&gt;
\frac{f\left(x_0 + h\right) - f\left(x_0 - h\right)}{2h} + O\left(h^2\right)&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Three Point Stencil Example==&lt;br /&gt;
For example, the three point stencil for the &amp;#039;&amp;#039;second derivative&amp;#039;&amp;#039; of a function is given by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\begin{array} {l}&lt;br /&gt;
f^{(2)}(x_0)=&lt;br /&gt;
\frac{f\left(x_0 + h\right) + f\left(x_0 - h\right) - 2f(x_0)}{h^2} + O\left(h^2\right)&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is obtained from the [[Taylor series]] expansion of the first derivative of the function given by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\begin{array} {l}&lt;br /&gt;
f&amp;#039;(x_0)=\frac{f\left(x_0 + h\right) - f(x_0)}{h} -\frac{f^{(2)}(x_0)}{2!}h - \frac{f^{(3)}(x_0)}{3!}h^2 - \frac{f^{(4)}(x_0)}{4!}h^3 + \cdots&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt;, we have:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\begin{array} {l}&lt;br /&gt;
f&amp;#039;(x_0)=-\frac{f\left(x_0 - h\right) - f(x_0)}{h} + \frac{f^{(2)}(x_0)}{2!}h - \frac{f^{(3)}(x_0)}{3!}h^2 + \frac{f^{(4)}(x_0)}{4!}h^3 + \cdots &lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Subtraction of the above two equations results in the cancellation of the terms in even powers of &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\begin{array} {l}&lt;br /&gt;
0=&lt;br /&gt;
\frac{f\left(x_0 + h\right) - f(x_0)}{h}&lt;br /&gt;
+\frac{f\left(x_0 - h\right) - f(x_0)}{h}&lt;br /&gt;
- 2\frac{f^{(2)}(x_0)}{2!}h - 2\frac{f^{(4)}(x_0)}{4!}h^3 + \cdots&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\begin{array} {l}&lt;br /&gt;
f^{(2)}(x_0)=&lt;br /&gt;
\frac{f\left(x_0 + h\right) + f\left(x_0 - h\right) - 2f(x_0)}{h^2} - 2\frac{f^{(4)}(x_0)}{4!}h^2 + \cdots&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\begin{array} {l}&lt;br /&gt;
f^{(2)}(x_0)=&lt;br /&gt;
\frac{f\left(x_0 + h\right) + f\left(x_0 - h\right) - 2f(x_0)}{h^2} + O\left(h^2\right)&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Stencil (numerical analysis)]]&lt;br /&gt;
*[[Non-compact stencil]]&lt;br /&gt;
*[[Five-point stencil]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Numerical differential equations]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Citation bot</name></author>
	</entry>
</feed>