# PDE discretization on triangular domain

Given the 2D Poisson equation

$$\Delta u = f\\ u(x,0) = g_1(x), 0

defined on the domain $$\Omega := \{(x,y) \in \mathbb{R}^2_+: x+y<1\}$$, discretize the equation using Shortley-Weller approximation with 5-point stencils.

On this domain, however, it appears that all near-boundary points use standard 5-point stencils. Is my understanding correct? I.e., with a uniform mesh non-boundary points' descritization uses the same step $$h$$ in all directions.

I'm, however, puzzled about the Neumann condition. Is this where Shortley-Weller approximation actually applied? I would appreciate some help with pointing me in the right direction towards discretizing the Neumann condition, and this equation as a whole.

Update: I figure the Neumann condition for this domain can be discretized as follows: since $$\partial_n u = \nabla u \cdot n$$, we have $$\partial_{n} u_{i,j} = \frac{u_{i, j+1}-u_{i,j-1}+u_{i+1,j}-u_{i-1,j}}{h}=0$$ (because $$n=(1, 1)^T$$). Now it looks like we encounter two ghost shells in each case. Am I on the right track?

• Does this question answer it? scicomp.stackexchange.com/q/7508/20688 – Anton Menshov Feb 22 '19 at 14:12
• @AntonMenshov I've read it but I'm still puzzled about the Neumann condition discretization. – sequence Feb 22 '19 at 14:21
• @sequence, could you tell me what is the practical interest in Shortley-Welley approximation? It looks so artificial and there are so many other algorithms which could be potentially a better fit. – VorKir Feb 23 '19 at 3:50
• @VorKir I don't really see how Shortley-Weller could be applied here, since the domain is not that "general". It looks like the usual rectangular grid discretization approach can be applied here, with slight modifications. – sequence Feb 23 '19 at 15:14
• @sequence I’d say that Shortley-Weller is by itself a standard rectangular grid discretization with slight modifications near the boundary. I agree that in your case the boundary aligns too well with the rectangular grid. I don’t know how S-W handles the Neumann boundary conditions, maybe one should use one-sided derivative approximations which will help avoiding the ghost cells. Upd: in this paper the authors suggest a way to treat the mixed boundary conditions, take a look. citeseerx.ist.psu.edu/viewdoc/… – VorKir Feb 23 '19 at 18:55