This section introduces and analyzes effective relaxation methods for solving (1.3) and its nonlinear problem as shown in (3.10) below.

### 3.1 The linear obstacle problem

We will begin with second-order approximation schemes for \(-\Delta u\). For simplicity, we consider a rectangular domain in \(\mathbb{R}^{2}\), \(\varOmega =(a_{x},b_{x})\times(a_{y},b_{y})\). Then the following second-order FD scheme can be formulated on the grid points:

$$ \mathbf{x}_{pq}:=(x_{p},y_{q}), \quad p=0,1,\ldots,n_{x}, q=0,1,\ldots,n_{y}, $$

(3.1)

where, for some positive integers \(n_{x}\) and \(n_{y}\),

$$x_{p}=a_{x}+p\cdot h_{x},\qquad y_{q}=a_{y}+q\cdot h_{y}; \quad h_{x}= \frac{b_{x}-a_{x}}{n_{x}}, h_{y}=\frac{b_{y}-a_{y}}{n_{y}}. $$

Let \(u_{pq}=u(x_{p},y_{q})\). Then, at each of the interior points \(\mathbf{x}_{pq}\), the five-point FD approximation of \(-\Delta u\) reads

$$ -\Delta_{h} u_{pq}= \frac {-u_{p-1,q}+2u_{pq}-u_{p+1,q}}{h_{x}^{2}} + \frac{-u_{p,q-1}+2u_{pq}-u_{p,q+1}}{h_{y}^{2}}. $$

(3.2)

Multiply both sides of (3.2) by \(h_{x}^{2}\) to have

$$ (-\Delta_{h} u_{pq}) h_{x}^{2} = \bigl(2+2 r_{xy}^{2} \bigr)u_{pq} -u_{p-1,q} -u_{p+1,q} -r_{xy}^{2} u_{p,q-1} -r_{xy}^{2} u_{p,q+1}, $$

(3.3)

where \(r_{xy}=h_{x}/h_{y}\) and \(u_{st}=f_{st}\) at boundary grid points \((x_{s},y_{t})\).

Now, consider the following Jacobi iteration for simplicity. Given an initialization \(u^{0}\), find \(u^{n}\) iteratively as follows.

### Algorithm \(\mathcal{L}_{J}\)

$$ \textstyle\begin{array}{l} \mbox{For } n=1,2,\ldots\\ \quad\mbox{For } q=1:n_{y}-1 \\ \quad\mbox{For } p=1:n_{x}-1 \\ \quad\quad \textstyle\begin{array}{ll} \mbox{(a)} & u_{J,pq} = \frac{1}{2+2 r_{xy}^{2}} (u_{p-1,q}^{n-1} +u_{p+1,q}^{n-1} +r_{xy}^{2} u_{p,q-1}^{n-1} +r_{xy}^{2} u_{p,q+1}^{n-1} ); \\ \mbox{(b)} & u_{pq}^{n} =\max(u_{J,pq},\varphi_{pq}); \end{array}\displaystyle \\ \quad\mbox{end} \\ \quad\mbox{end} \\ \mbox{end} \end{array} $$

(3.4)

where \(u^{n-1}_{st}=f_{st}\) at boundary grid points \((x_{s},y_{t})\).

Note that Algorithm \(\mathcal{L}_{J}\)produces a solution *u* of which the function value at a point is a simple average of four neighboring values, satisfying the constraint \(u\ge\varphi\).

### Theorem 1

*Let*
*û*
*be the limit of the iterates*
\(u^{n}\)
*of Algorithm*
\(\mathcal{L}_{J}\). *Then*
*û*
*satisfies the FD discretization of* (1.3). *That is*,

$$ \textstyle\begin{array}{l@{\quad}l} \left . \textstyle\begin{array}{l} -\Delta_{h} \widehat{u}_{pq}\ge0, \\ \widehat{u}_{pq}\ge\varphi_{pq},\\ (-\Delta_{h} \widehat{u}_{pq})\cdot(\widehat{u}_{pq}-\varphi_{pq})=0, \end{array}\displaystyle \right \} & (x_{p},y_{q})\in \varOmega _{h}^{0}, \\ \widehat{u}_{st}=f_{st}, & (x_{s},y_{t})\in \varGamma _{h}, \end{array} $$

(3.5)

*where*
\(\varOmega _{h}^{0}\)
*denotes the set of interior grid points and*
\(\varGamma _{h}\)
*is the set of boundary grid points*.

### Proof

It is clear to see from Algorithm \(\mathcal{L}_{J}\)that

$$\widehat{u}_{pq}\ge\varphi_{pq} \quad\text{for } (x_{p},y_{q}) \in \varOmega _{h}^{0} \quad \mbox{and} \quad \widehat{u}_{st}=f_{st} \quad\text{for } (x_{s},y_{t})\in \varGamma _{h}. $$

Let \(\widehat{u}_{pq}=\varphi_{pq}\) at an interior point \((x_{p},y_{q})\). Then it follows from (3.4)(b) that

$$ \widehat{u}_{J,pq} = \frac{1}{2+2 r_{xy}^{2}} \bigl( \widehat{u}_{p-1,q} +\widehat{u}_{p+1,q} +r_{xy}^{2} \widehat{u}_{p,q-1} +r_{xy}^{2} \widehat{u}_{p,q+1} \bigr) \le\varphi_{pq}=\widehat{u}_{pq}, $$

(3.6)

which implies that

$$ 0\le\bigl(2+2 r_{xy}^{2} \bigr) \widehat{u}_{pq} -\widehat{u}_{p-1,q} -\widehat{u}_{p+1,q} -r_{xy}^{2} \widehat{u}_{p,q-1} -r_{xy}^{2} \widehat{u}_{p,q+1} = (-\Delta_{h} \widehat{u}_{pq}) \cdot h_{x}^{2}. $$

(3.7)

On the other hand, let \(\widehat{u}_{pq}>\varphi_{pq}\) at \((x_{p},y_{q})\). Then, since \(\widehat{u}_{pq}=\max(\widehat{u}_{J,pq},\varphi_{pq})\), we must have

$$ \widehat{u}_{pq} = \widehat{u}_{J,pq}, $$

(3.8)

which implies that \(-\Delta_{h}\widehat{u}_{pq}=0\). This completes the proof. □

One can easily prove that the algebraic system obtained from (3.3) is irreducibly diagonally dominant and symmetric positive definite. Since its off-diagonal entries are all nonpositive, the matrix must be a Stieltjes matrix and therefore an M-matrix [23]. Thus relaxation methods of regular splittings (such as the Jacobi, the Gauss-Seidel (GS), and the successive over-relaxation (SOR) iterations) are all convergent and their limits are the same as *û* and therefore satisfy (3.5). In this article, variants of Algorithm \(\mathcal{L}_{J}\)for the GS and the SOR would be denoted, respectively, by \(\mathcal{L}_{\mathrm{GS}}\) and \(\mathcal{L}_{\mathrm{SOR}}\)
\((\omega)\), where *ω* is an over-relaxation parameter for the SOR, \(1<\omega<2\). For example, \(\mathcal{L}_{\mathrm{SOR}}\)
\((\omega)\) is formulated as

### Algorithm \(\mathcal{L}_{\mathrm{SOR}}\)
\((\omega)\)

$$ \textstyle\begin{array}{l} \mbox{For } n=1,2,\ldots\\ \quad\mbox{For } q=1:n_{y}-1 \\ \quad\mbox{For } p=1:n_{x}-1 \\ \quad\quad \textstyle\begin{array}{ll} \mbox{(a)} & u_{\mathrm{GS},pq} = \frac{1}{2+2 r_{xy}^{2}} (u_{p-1,q}^{n} +u_{p+1,q}^{n-1} +r_{xy}^{2} u_{p,q-1}^{n} +r_{xy}^{2} u_{p,q+1}^{n-1} ); \\ \mbox{(b)} & u_{\mathrm{SOR},pq}=\omega\cdot u_{\mathrm{GS},pq} +(1-\omega)\cdot u_{pq}^{n-1};\\ \mbox{(c)} & u_{pq}^{n} =\max(u_{\mathrm{SOR},pq},\varphi_{pq}); \end{array}\displaystyle \\ \quad\mbox{end} \\ \quad\mbox{end} \\ \mbox{end} \end{array} $$

(3.9)

where \(u^{n-1}_{st}=u^{n}_{st}=f_{st}\) at boundary grid points \((x_{s},y_{t})\).

Note that the right side of (3.9)(a) involves updated values wherever available. When \(\omega=1\), Algorithm \(\mathcal{L}_{\mathrm{SOR}}\)
\((\omega)\) becomes Algorithm \(\mathcal{L}_{\mathrm{GS}}\); that is, \(\mathcal{L}_{\mathrm{SOR}}\)
\((1)=\mathcal{L}_{\mathrm{GS}}\).

### 3.2 The nonlinear obstacle problem

Applying the same arguments for the linear problem (1.3), the Euler-Lagrange equation for the nonlinear minimization problem (1.1) can be formulated as

$$ \textstyle\begin{array}{l@{\quad}l} \left . \textstyle\begin{array}{l} \mathcal{N}(u) \ge0, \\ u\ge\varphi,\\ \mathcal{N}(u)\cdot(u-\varphi)=0, \end{array}\displaystyle \right \} & \text{in }\varOmega , \\ u=f, & \text{on }\varGamma , \end{array} $$

(3.10)

where

$$ \mathcal{N}(u)=-\nabla\cdot\biggl(\frac{\nabla u}{\sqrt {1+|\nabla u|^{2}}} \biggr). $$

(3.11)

Thus the solution to the nonlinear problem (3.10) can be considered as a minimal surface satisfying the constraint given by the obstacle function *φ*.

Since \(\sqrt{1+|\nabla u|^{2}}\ge1\), the nonlinear obstacle problem (3.10) can equivalently be formulated as

$$ \textstyle\begin{array}{l@{\quad}l} \left . \textstyle\begin{array}{l} \mathcal{M}(u) \ge0, \\ u\ge\varphi,\\ \mathcal{M}(u)\cdot(u-\varphi)=0, \end{array}\displaystyle \right \} & \text{in } \varOmega , \\ u=f, & \text{on }\varGamma , \end{array} $$

(3.12)

where

$$ \mathcal{M}(u)=-\sqrt{1+|\nabla u|^{2}} \nabla\cdot\biggl( \frac{\nabla u}{\sqrt{1+|\nabla u|^{2}}} \biggr). $$

(3.13)

Such a method of gradient-weighting will make algebraic systems simpler and better conditioned, as to be seen below. In order to introduce effective FD schemes for \(\mathcal{M}(u)\), we first rewrite \(\mathcal{M}(u)\) as

$$ \mathcal{M}(u)= - \bigl(\sqrt{1+|\nabla u|^{2}} \bigr)_{1} \biggl( \frac{u_{x}}{\sqrt{1+|\nabla u|^{2}}} \biggr)_{x} - \bigl(\sqrt {1+|\nabla u|^{2}} \bigr)_{2} \biggl(\frac{u_{y}}{\sqrt{1+|\nabla u|^{2}}} \biggr)_{y}, $$

(3.14)

where both \((\sqrt{1+|\nabla u|^{2}} )_{1}\) and \((\sqrt{1+|\nabla u|^{2}} )_{2}\) are the same as \(\sqrt{1+|\nabla u|^{2}}\); however, they will be approximated in a slightly different way. The following numerical schemes are of second-order accuracy and specifically designed for the resulting algebraic system to be simpler and better conditioned.

For the FD scheme at the \((p,q)\)th pixel, we first compute second-order FD approximations of \(\sqrt{1+|\nabla u|^{2}}\) at \(\mathbf{x}_{p-1/2,q} (W)\), \(\mathbf{x}_{p+1/2,q} (E)\), \(\mathbf{x}_{p,q-1/2} (S)\), and \(\mathbf{x}_{p,q+1/2} (N)\):

$$ \begin{aligned} &d_{pq,W}= \bigl[1+(u_{pq}-u_{p-1,q})^{2}/h_{x}^{2} \\ &\hphantom{d_{pq,W}=} +(u_{p-1,q+1}+u_{p,q+1}-u_{p-1,q-1}-u_{p,q-1})^{2}/ \bigl(16h_{y}^{2}\bigr)\bigr]^{1/2}, \\ &d_{pq,E}= d_{p+1,q,W}, \\ &d_{pq,S}= \bigl[1+(u_{pq}-u_{p,q-1})^{2}/h_{y}^{2} \\ &\hphantom{d_{pq,S}=} +(u_{p+1,q}+u_{p+1,q-1}-u_{p-1,q}-u_{p-1,q-1})^{2}/ \bigl(16h_{x}^{2}\bigr)\bigr]^{1/2}, \\ &d_{pq,N}= d_{p,q+1,S}. \end{aligned} $$

(3.15)

Then the directional-derivative terms at the pixel point \(\mathbf{x}_{pq}\) can be approximated by

$$ \begin{aligned} &\biggl(\frac{u_{x}}{\sqrt{1+|\nabla u|^{2}}} \biggr)_{x} (\mathbf{x}_{pq}) \approx\frac{1}{h_{x}^{2}} \biggl[ \frac{1}{d_{pq,W}}u_{p-1,q} +\frac{1}{d_{pq,E}}u_{p+1,q} - \biggl(\frac{1}{d_{pq,W}}+\frac{1}{d_{pq,E}} \biggr)u_{pq} \biggr], \\ &\biggl(\frac{u_{y}}{\sqrt{1+|\nabla u|^{2}}} \biggr)_{y} (\mathbf{x}_{pq}) \approx\frac{1}{h_{y}^{2}} \biggl[ \frac{1}{d_{pq,S}}u_{p,q-1} + \frac{1}{d_{pq,N}}u_{p,q+1} - \biggl( \frac{1}{d_{pq,S}}+\frac{1}{d_{pq,N}} \biggr)u_{pq} \biggr]. \end{aligned} $$

(3.16)

Now, we discretize the surface element as follows:

$$ \begin{aligned} & \bigl(\sqrt{1+|\nabla u|^{2}} \bigr)_{1}(\mathbf{x}_{pq}) \approx\biggl[ \frac{1}{2} \biggl(\frac{1}{d_{pq,W}}+\frac{1}{d_{pq,E}} \biggr) \biggr]^{-1} =\frac{2d_{pq,W}d_{pq,E}}{d_{pq,W}+d_{pq,E}}, \\ & \bigl(\sqrt{1+|\nabla u|^{2}} \bigr)_{2}( \mathbf{x}_{pq}) \approx\biggl[\frac{1}{2} \biggl(\frac{1}{d_{pq,S}}+ \frac{1}{d_{pq,N}} \biggr) \biggr]^{-1} =\frac{2d_{pq,S}d_{pq,N}}{d_{pq,S}+d_{pq,N}}, \end{aligned} $$

(3.17)

where the right-hand sides are harmonic averages of FD approximations of \(\sqrt{1+|\nabla u|^{2}}\) in *x*- and *y*-coordinate directions, respectively. Then it follows from (3.14), (3.16), and (3.17) that

$$\begin{aligned} \mathcal{M}(u) (\mathbf{x}_{pq})\cdot h_{x}^{2} \approx{}& \bigl(2+2 r_{xy}^{2}\bigr) u_{pq}-a_{pq,W}u_{p-1,q}-a_{pq,E}u_{p+1,q} \\ & -r_{xy}^{2}a_{pq,S}u_{p,q-1}-r_{xy}^{2} a_{pq,N}u_{p,q+1}, \end{aligned}$$

(3.18)

where

$$ \begin{aligned} &a_{pq,W}=\frac{2 d_{pq,E}}{d_{pq,W}+d_{pq,E}}, \qquad a_{pq,E}=\frac{2 d_{pq,W}}{d_{pq,W}+d_{pq,E}}, \\ &a_{pq,S}=\frac{2 d_{pq,N}}{d_{pq,S}+d_{pq,N}}, \qquad a_{pq,N}=\frac{2 d_{pq,S}}{d_{pq,S}+d_{pq,N}}. \end{aligned} $$

(3.19)

Note that \(a_{pq,W}+a_{pq,E}=a_{pq,S}+a_{pq,N}=2\). As for the linear problem, it is easy to prove that the algebraic system obtained from (3.18) is an M-matrix.

Given FD schemes for \(\mathcal{M}(u)\) as in (3.18), the nonlinear obstacle problem (3.12) can be solved iteratively by the Jacobi iteration.

### Algorithm \(\mathcal{N}_{J}\)

$$ \textstyle\begin{array}{l} \mbox{For } n=1,2,\ldots\\ \quad\mbox{For } q=1:n_{y}-1 \\ \quad\mbox{For } p=1:n_{x}-1 \\ \quad\quad \textstyle\begin{array}{ll} \mbox{(a)} & u_{J,pq} = \frac{1}{2+2 r_{xy}^{2}} (a_{pq,W}^{n-1}u_{p-1,q}^{n-1} +a_{pq,E}^{n-1}u_{p+1,q}^{n-1} +r_{xy}^{2} a_{pq,S}^{n-1}u_{p,q-1}^{n-1} +r_{xy}^{2} a_{pq,N}^{n-1}u_{p,q+1}^{n-1} ); \\ \mbox{(b)} & u_{pq}^{n} =\max(u_{J,pq},\varphi_{pq}); \end{array}\displaystyle \\ \quad\mbox{end} \\ \quad\mbox{end} \\ \mbox{end} \end{array} $$

(3.20)

where \(u^{n-1}_{st}=f_{st}\) at boundary grid points \((x_{s},y_{t})\).

The superscript \((n-1)\) on the coefficients \(a_{pq,D}\), \(D=W, E, S, N\), indicate that they are obtained using the last iterate \(u^{n-1}\). Algorithm \(\mathcal{N}_{J}\)produces a solution *u* of which the function value at a point is a *weighted* average of four neighboring values, satisfying the constraint \(u\ge\varphi\). One can prove the following corollary, using the same arguments introduced in the proof of Theorem 1.

### Corollary 1

*Let*
*û*
*be the limit of the iterates*
\(u^{n}\)
*of Algorithm*
\(\mathcal{N}_{J}\). *Then*
*û*
*satisfies the FD discretization of* (3.12). *That is*,

$$ \textstyle\begin{array}{l@{\quad}l} \left . \textstyle\begin{array}{l} \mathcal{M}_{h}(\widehat{u})_{pq}\ge0, \\ \widehat{u}_{pq}\ge\varphi_{pq},\\ \mathcal{M}_{h}(\widehat{u})_{pq}\cdot(\widehat{u}_{pq}-\varphi_{pq})=0, \end{array}\displaystyle \right \} & (x_{p},y_{q})\in \varOmega _{h}^{0}, \\ \widehat{u}_{st}=f_{st}, & (x_{s},y_{t})\in \varGamma _{h}, \end{array} $$

(3.21)

*where*
\(\mathcal{M}_{h}(\widehat{u})_{pq}\)
*denotes the FD scheme of*
\(\mathcal{M}(u)(\mathbf{x}_{pq})\)
*as defined in* (3.18) *with*
\(u=\widehat{u}\).

Variants of Algorithm \(\mathcal{N}_{J}\)for the GS and the SOR can be formulated similarly as for the linear obstacle problem; they would be denoted respectively by \(\mathcal{N}_{\mathrm{GS}}\) and \(\mathcal{N}_{\mathrm{SOR}}\)
\((\omega)\). In practice, such symmetric coercive optimization problems, the SOR methods are much more efficient than the Jacobi and Gauss-Seidel methods. We will exploit \(\mathcal{L}_{\mathrm{SOR}}\)
\((\omega)\) and \(\mathcal{N}_{\mathrm{SOR}}\)
\((\omega)\) for numerical comparisons with state-of-the-art methods, by setting the relaxation parameter *ω* optimal.

### 3.3 The optimal relaxation parameter *ω̂*

Consider the standard Poisson equation with a Dirichlet boundary condition

$$ \begin{aligned} &{-}\Delta u=g \quad\mbox{in } \varOmega ,\\ &u=f \quad\mbox{on } \varGamma =\partial \varOmega , \end{aligned} $$

(3.22)

for prescribed functions *f* and *g*. Let \(\varOmega =[0,1]^{2}\), for simplicity, and apply the second-order FD method for the second derivatives on a uniform grid: \(h=h_{x}=h_{y}=1/(m+1)\), for some positive integer. The its algebraic system can be written as

$$ A\mathbf{u}= \mathbf{b}\in \mathbb{R}^{m^{2}}. $$

(3.23)

Then the theoretically optimal relaxation parameter for the SOR method can be determined as [23], Section 4.3,

$$ \widehat{\omega} = \frac{2}{1+\sqrt {1-\rho(T_{J})^{2}}}, $$

(3.24)

where \(\rho(T_{J})\) is the spectral radius of the iteration matrix of the Jacobi method \(T_{J}\). The iteration matrix \(T_{J}\) can be explicitly presented as a block tridiagonal matrix

$$ T_{J}=\frac{1}{4} \operatorname{tridiag}(I_{m},B_{m},I_{m}), $$

(3.25)

where \(I_{m}\) is the *m*-dimensional identity matrix and

$$B=\operatorname{tridiag}(1,0,1) =\left [ \textstyle\begin{array}{lllll} 0 & 1 & && \\ 1 & 0 & 1 & & \\ & \ddots& \ddots& \ddots\\ && 1 & 0 & 1 \\ &&& 1 & 0 \end{array}\displaystyle \right ] \in \mathbb{R}^{m\times m}. $$

For such a matrix \(T_{J}\), it is well known that

$$ \rho(T_{J})=1-ch^{2}, \quad\mbox{for some } c>0. $$

(3.26)

Thus it follows from (3.24) and (3.26) that the optimal SOR parameter corresponding to the mesh size *h*, \(\widehat{\omega}_{h}\), can be expressed as

$$ \widehat{\omega}_{h} =\frac{2}{1+\sqrt {1-(1-ch^{2})^{2}}} = \frac{2}{1+\sqrt{2ch^{2}-c^{2}h^{4}}} \approx\frac{2}{1+c_{0} h}, $$

(3.27)

where \(c_{0}=\sqrt{2c}\). Hence, for general mesh size *h*, the corresponding optimal SOR parameter \(\widehat{\omega}_{h}\) can be found as follows.

$$ \left \{ \textstyle\begin{array}{ll} \mbox{(a)} & \mbox{Determine $\widehat{\omega}_{h_{0}}$ for a prescribed mesh size $h=h_{0}$, } \textit{heuristically}.\\ \mbox{(b)} & \mbox{Find $c_{0}$ by solving (3.27) for $c_{0}$:}\\ & \quad c_{0}=(2/\widehat{\omega}_{h_{0}}-1)/h_{0}. \\ \mbox{(c)} & \mbox{Use (3.27) with the above $c_{0}$ to determine $\widehat{\omega}_{h}$ for general $h$.} \end{array}\displaystyle \right . $$

(3.28)

It is often the case that the calibration (3.28)(a)-(3.28)(b) can be carried out with a small problem, *i.e.*, with \(h_{0}\) of a very low resolution.