• No results found

There are situations when analytically solving a PDE can be hard or even impossible, or when the data is only known at a certain number of discrete locations. In these situ- ations one has to solve a discrete version of a continuous PDE. In general, a continuous linear boundary value problem in d-dimensions is denoted by:

LΓu(x) =fΓ(x) for x Γ, (2.32) where Ω is a bounded open domain inRd,x= (x

1, . . . , xd)Rdand Γ is its boundary.

Example 2.5.1 One of the most common examples would be the classical Poisson’s equation in a two-dimensional problem with Dirichlet boundary conditions, given by

∆Ωu(x) =fΩ(x) for (x), (2.33)

u(x) =fΓ(x) for (x)Γ, (2.34) Similarly, a continuous nonlinear boundary value problem is defined by:

Nu(x) =fΩ(x) for (x)Ω (2.35)

NΓu(x) =fΓ(x) for (x)Γ, (2.36) whereN is a nonlinear operator.

Example 2.5.2 An example of resulting nonlinear boundary value problems which will be seen in later chapters is the well known variational image denoising model by Rudin, Osher and Fatemi [135], given as follows:

−∇ ·(|∇∇u(x) u(x)| ) +λ(u(x)−u0(x)) = 0 in, (2.37) ∂u(x) ∂n = 0in Ω (2.38)

where λ > 0 is a constant, u0(x) is the noisy image and u(x) is the true image which we wish to recover.

In this thesis we deal with image domains which are usually rectangular and where the values of f are known uniformly distributed points in the domain ΩRd. There- fore, a natural choice for discretising the domain is to use the finite difference method. We will restrict our discussion to Ω = (a, b)×(c, d) R2, which turns out to be easy to extend to higher dimensions.

First, we select the positive integersnand m and divide the intervals (a, b)×(c, d) into (n+ 1)×(m+ 1) grid points including points on the boundary with grid point (i, j) located at (xi, yj) = (a+ih, b+jk) for 0≤i≤nand 0≤j≤m. In this way we

impose a cartesian grid (or mesh) with grid spacing h = (b−a)/n in the x-direction and k= (d−c)/min they-direction. The boundary points Γ are defined as the set of mesh points inR2 which don’t belong to Ω, but which have a nearest neighbour in Ω.

In the so-called vertex-centered discretisation grid points are placed at the vertices. In the so-called cell-centered discretisation, the grid points are placed at the center of the grid cells so that there aren×mgrid points (none lying on the boundary) and the grid point (i, j) is located at (xi, yj) = (a+2i−21h, c+2j21k) for 1≤i≤nand 1≤j≤m.

The interior of the discrete grid is denoted by Ωh and the boundary by Γh or h.

(a) Vertex-centred (b) Cell-centred

Figure 2.6: Vertex-centred and cell-centred discretization of a square domain. Once the grid is in place the operators in the PDE can be approximated locally using Taylor’s series expansion. Using this expansion we can approximate the operator ∂u∂x at the grid point (i, j) in 3 ways, the first order forward and backward difference operators defined respectively by ∆+x(u)i,j h u(x+h, y)−u(x, y) h = (u)i+1,j−(u)i,j h and ∆x(u)i,j h u(x, y)−u(x−h, y) h = (u)i,j−(u)i−1,j h

or the second order central difference approximation ∆cx(u)i,j 2h u(x+h, y)−u(x−h, y) 2h = (u)i+1,j−(u)i−1,j 2h ,

where (u)i,j =u(xi, yj) is the value ofu(x, y) at the grid point (i, j). Similarly using the

Taylor expansion, the approximations to higher order derivatives can be constructed in a similar way. A second order approximation to ∂x2u2 at (i, j) is given by

u′′xx(x, y) u(x+h, y)2u(x, y) +u(x−h, y)

h2

2u

∂y2 can be defined in a similar way.

In this way, substituting the finite difference approximation to the continuous prob- lem on the discrete domain, which is denoted by

Lhuh(x) =fhΩ(x) for (x)h (2.39)

LΓhuh(x) =fhΓ(x) for (x)Γh (2.40)

gives an approximation to the given problem with a truncation error equal to the order of the finite difference approximation. In the above notation uh is a grid function

are discrete representations of fΩ and fΓ. Usually the boundary conditions can be eliminated and (2.39) and (2.40) can be written simply as

Lhuh =fh. (2.41)

Example 2.5.3 Let us consider the Poisson equation (2.33). For simplicity we will consider a very simple domain on the unit square with Dirichlet boundary conditions (2.34). Assume that the domain is discretised using a vertex-centered grid with h =

k= 1/n then at interior grid points which are not adjacent to the boundary a second order central difference approximation is given by

(Lhuh)i,j =

ui+1,j−ui−1,j+ 4ui,j−ui,j+1−ui,j−1

h2 = (f

h)i,j. (2.42)

The scheme is a 5-point difference operator scheme. At points adjacent to the right boundary, for example,(u)n+1,j will be replaced by the boundary value (fhΓ)n, j, i.e.

(Lhuh)n,j = un−1,j+ 4un,j−un,j+1−un,j−1 h2 = (fh)n,j + (fhΓ)n,j h2 . (2.43) Since(fhΓ)n,j = 0 we have (Lhuh)n,j = un−1,j+ 4un,j−un,j+1−un,j−1 h2 = (fh)n,j. (2.44)

Similar considerations giveLhuh at other points adjacent to the boundary, therefore we

haveLhuh =fh where uh is a grid function on the interior grid points only.

We discetise similarly for problems with Neumann boundary conditions. 2.5.1 Boundary Conditions

Boundary conditions define the set of conditions specified for behavior of the solution to a set of differential equations at the boundary of its domain. So far we have only mentioned Dirichlet boundary conditions on vertex-centered grids, out of 13 different categories such as Neumann boundary conditions, Cauchy boundary conditions, Mixed boundary conditions, Periodic boundary conditions. We briefly now describe how to deal with Neumann boundary conditions with vertex and cell-centered grid since this will be used for the rest of the thesis.

Neumann Boundary Conditions for Vertex-centered Grids

The Neumann boundary condition is a type of boundary imposed on an ordinary or a partial differential equation, specifying the values that the derivative of a solution is to take on the boundary of the domain. Let us assume that we have a Neumann boundary condition ∂u∂n(x, y) =fΓ(x, y) on the right boundary of a vertex centered grid. We assume that the discrete equation Lhuh(x, y) = fh(x, y) extends to the points on

outside the domain. These ghost grid points can be eliminated using the Neumann boundary condition (u)n+1,j−(u)n−1,j 2h = (f Γ) n,j.

Example 2.5.4 Going back again to the example of Poisson’s equation (2.33) the unit square then at the right boundary, we have

(Lhuh)n,j = 2un−1,j+ 4un,j−un,j+1−un,j−1 h2 = (fh)n,j+ 2 h(f Γ h)n,j. (2.45)

Neumann Boundary Conditions for Cell-centered Grids

In the case of a cell-centered grids we have no points on the boundary, so in general the equation at interior points which are adjacent to the boundary will involve ghost points outside of the domain, which need to be eliminated using the boundary condition. If we have a Neumann boundary condition at this right boundary, for example, we can write it as (u)n+1,j−(u)n,j h = (f Γ) n+1/2,j. 2.5.2 Nonlinear Equations

Nonlinear PDEs are more difficult to study and there are almost no general techniques that work for all such equations, but they are more attractive since they describe many different phenomena. Nonlinear PDEs have been a greatly successful in image processing for solving problems such as denoising, segmentation, etc.

Nonlinear PDEs are treated in much the same way as linear equations. The various operators in the equation are approximated locally on a discrete grid using the finite difference method. The discrete nonlinear equation is denoted by

Nu(x) =fΩ(x) for (x,)Ω (2.46)

NΓu(x) =fΓ(x) for (x.)Γ (2.47) Similarly, the boundary conditions are usually eliminated and then the discrete nonlin- ear equation can be written simply as

Nh(uh) =fh. (2.48)

It may be possible to write the nonlinear equation in matrix notation, e.g. Ah(uh)uh =

fh,where the some of the matrix entries will depend on uh. Examples of using finite

difference methods for specific nonlinear PDEs will be shown in subsection§2.6.1 and later in Chapter 3 followed by all the other chapters.

Related documents