Understanding Stencils in Finite Difference Methods

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 5K views
alecrimi
Messages
18
Reaction score
0
Hi
Sorry for the stupid question, but what is exactly a "stencil" in finite difference methods ?
Is the results of the expansion points ?
Cheers
Alex
 
Physics news on Phys.org
This is also called a computational molecule in some texts, it basically is the recurrence relation that you use to calculate the next point in your calculation, so for example a stencil for the Euler method for the ODE [itex]\frac{du}{dx}=f(x,u)[/itex] would be:
[tex] u_{n+1}=u_{n}+hf(x_{n},u_{n})[/tex]
For PDEs it would be something more complicated. I hope you get the general idea.