Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

We consider a class of optimal control problems with pointwise state constraints over a bounded convex polyhedral domain \(\varOmega \subset {\mathbb R}^3\). We first recall the standard notation and introduce the functional setting for both the optimal control problems and their characterizations as fourth order variational inequalities. The space \(L^2(\varOmega )\) denotes the space of square integrable functions on \(\varOmega \), and \(L^2_0(\varOmega )\) is the space of functions in \(L^2(\varOmega )\) with zero mean. We use \(H^s(\varOmega )\) to denote the set of all \(L^2(\varOmega )\) functions whose distributional derivatives up to order s are in \(L^2(\varOmega )\), and \(H^s_0(\varOmega )\) to denote the set of functions in \(H^s(\varOmega )\) whose traces vanish up to order \(s-1\) on \(\partial \varOmega \). The corresponding inner product and norm defined on these Hilbert spaces will be denoted by \((\cdot , \cdot )\) and \(\left\| \cdot \right\| \), respectively, with the function space as a subscript, i.e., \((\cdot , \cdot )_{H^1}\) and \(\left\| \cdot \right\| _{H^1}\), etc., and similarly for the seminorm \(| \cdot |\). We will sometimes omit the subscript in the case of the inner product and norm of \(L^2(\varOmega )\).

For \(\psi \in C^2(\bar{\varOmega })\), \(y_d\in L^2(\varOmega )\), and \(\gamma \) a positive constant, we define the sets \({\mathcal K}_D \subset H_0^1(\varOmega ) \times L^2(\varOmega ) \) and \({\mathcal K}_N \subset H^1(\varOmega ) \times L_0^2(\varOmega )\) by

$$\begin{aligned} \mathcal {K}_D = ~&\{ (y, u) \in H^1_0(\varOmega ) \times L^2(\varOmega ) : \\&\int _\varOmega \nabla y\cdot \nabla z \, dx = \int _\varOmega uz \,dx \text { for all } z\in H^1_0(\varOmega ) \text { and } y\le \psi \text { a.e. in } \varOmega \}, \\ \mathcal {K}_N = ~&\{ (y, u) \in H^1(\varOmega ) \times L^2_0(\varOmega ): \\&\int _\varOmega \nabla y\cdot \nabla z \,dx = \int _\varOmega uz \,dx \text { for all } z\in H^1(\varOmega ) \text { and } y\le \psi \text { a.e. in } \varOmega \}. \end{aligned}$$

We will consider the following elliptic distributed optimal control problem:

$$\begin{aligned} \text { Find } (\bar{y}, \bar{u}) = \mathop {\text {argmin}}_{(y,u)\in \mathcal {K}} \left[ \dfrac{1}{2}\left\| y-y_d \right\| ^2 + \dfrac{\gamma }{2}\left\| u \right\| ^2\right] , \end{aligned}$$
(1)

where \(\mathcal {K}=\mathcal {K}_D\) (Dirichlet problem) or \(\mathcal {K} =\mathcal {K}_N\) (Neumann problem).

Let the spaces \(V_D\) and \(V_N\) be defined by

$$\begin{aligned} V_D=H^2(\varOmega )\cap H^1_0(\varOmega ) \quad \text {and}\quad V_N=\Big \{v\in H^2(\varOmega ):\, \frac{\partial v}{\partial n}=0 \; \text {on}\;\partial \varOmega \Big \}. \end{aligned}$$

Since \((y,u)\in \mathcal {K}\) implies \(y\in H^2(\varOmega )\) and \(u=-\varDelta y\) by elliptic regularity [15], the optimal control problem (1) is equivalent to the following problem:

$$\begin{aligned} \text { Find } \bar{y}&= \mathop {\text {argmin}}_{y\in K} \left[ \dfrac{1}{2}\left\| y-y_d \right\| ^2 + \dfrac{\gamma }{2}\left\| \varDelta y \right\| ^2\right] \\&=\mathop {\text {argmin}}_{y\in K} \left[ \dfrac{\gamma }{2}\left\| \varDelta y \right\| ^2+\dfrac{1}{2}\left\| y\right\| ^2 -(y_d,y)\right] ,\nonumber \end{aligned}$$
(2)

where

$$K=K_D=\left\{ y\in V_D: y\le \psi \text { in } \varOmega \right\} \qquad \text {(Dirichlet problem)},$$

or

$$K=K_N=\left\{ y\in V_N: \ y\le \psi \text { in } \varOmega \right\} \qquad \text {(Neumann problem).}$$

Let \(D^2y : D^2z\) denote the (Frobenius) inner product of the Hessian matrices of y and z:

$$\begin{aligned} D^2y:D^2z = \displaystyle \sum _{1\le i, j \le 3} \left( \dfrac{\partial ^2y}{\partial x_i\partial x_j}\right) \left( \dfrac{\partial ^2z}{\partial x_i\partial x_j}\right) . \end{aligned}$$

It follows from integration by parts that (2) can be rewritten as

$$\begin{aligned} \text { Find } \bar{y} = \mathop {\text {argmin}}_{y\in K}~\left[ \dfrac{1}{2}\mathcal {A}(y,y)-(y_d,y)\right] , \end{aligned}$$
(3)

where

$$\begin{aligned} \mathcal {A}(y,z) = \gamma \int _\varOmega D^2y:D^2z\, dx + \int _\varOmega yz \,dx. \end{aligned}$$
(4)

Note that in the Neumann case the closed convex subset \(K_N\) of \(V_N\) is always nonempty since it contains all constant functions that are bounded above by \(\min _{x\in \varOmega }\psi (x)\). On the other hand, in the Dirichlet case we assume that \(\psi >0\) on \(\partial \varOmega \) so that \(K_D\) is a nonempty subset of \(V_D\) and the contact set where \(y=\psi \) is disjoint from \(\partial \varOmega \). Since \(\mathcal {A}(\cdot ,\cdot )\) is symmetric, bounded, and coercive on \(H^2(\varOmega )\), the standard theory [13, 22, 23, 26] implies that (3) has a unique solution characterized by the variational inequality

$$\begin{aligned} \mathcal {A}(\bar{y},y-\bar{y})&\ge (f, y-\bar{y}) \text { for all } y\in K, \end{aligned}$$

where \(K=K_D\) or \(K=K_N\).

The goal of this paper is to demonstrate that \(C^0\) interior penalty methods [39, 11, 16] are effective for the numerical solution of (3). We note that in the literature, the Dirichlet problem defined by (1) is solved as a fourth order variational inequality by a Morley finite element method in [24], a mixed finite element method in [14], and a quadratic \(C^0\) interior penalty method in [8, 9]. However, the numerical examples in these references only involve two-dimensional domains. To the best of our knowledge, this is the first paper that provides numerical results for elliptic distributed optimal control problems in three dimensions formulated as fourth order variational inequalities.

The rest of the paper is organized as follows. In Section 2, we introduce the discrete problems for (3) that are based on the \(C^0\) interior penalty approach. We further discuss three procedures that generate approximations of the optimal control \(\bar{u}\) by post-processing the discrete optimal state. In Section 3, we will provide some details concerning the implementation of a primal-dual active set method using the deal.II library. In Section 4, which is the main section, we present numerical results for both the Dirichlet problem and the Neumann problem. Finally, we end with some concluding remarks in Section 5.

2 Discrete Problems

Let \(\mathscr {T}_h\) be a uniform triangulation of \(\varOmega \) by cubic elements, \(V_h\subset H^1(\varOmega )\) be the (continuous) \({\mathbb {Q}}_2\) finite element space associated with \(\mathscr {T}_h\), and let be the subspace of \(V_h\) whose members vanish on \(\partial \varOmega \). We will use the following notation throughout the paper:

  • h is a mesh parameter proportional to \(\max _{T\in \mathscr {T}_h}\text {diam}\,T\).

  • \(h_F\) is the diameter of the face F.

  • \(\mathcal {V}_h\) is the set of vertices of \(\mathscr {T}_h\).

  • \(\mathcal {F}_h\) is the set of faces of \(\mathscr {T}_h\).

  • \(\mathcal {F}_h^i\) is the set of interior faces of \(\varOmega \).

Let \(F\in \mathcal {F}_h^i\) be the common face of \(T_\pm \in \mathscr {T}_h\) and \(n_F\) be the unit normal of F pointing from \(T_-\) to \(T_+\). The jump \([\![\cdot ]\!]\) and average \(\{\!\{\cdot \}\!\}\) of the normal derivatives over F for functions in the piecewise Sobolev spaces

$$\begin{aligned} H^s(\varOmega , \mathscr {T}_h) = \left\{ v\in L^2(\varOmega ): v_T = v|_T \in H^s(T) \text { for all } T\in \mathscr {T}_h \right\} \end{aligned}$$

are defined as follows:

where \(v_{\pm }=v|_{T_{\pm }}\).

For \(F\in \mathcal {F}_h\) that is a subset of \(\partial \varOmega \), the jump and average are defined by

where \(n_F\) is the unit normal of F pointing towards the outside of \(\varOmega \).

2.1 Dirichlet Problem

Let the closed convex subset be defined by

The discrete problem for (3) when \(K=K_D\) then reads:

$$\begin{aligned} \text { Find } \bar{y}_h = \mathop {\text {argmin}}_{y_h\in K_{D, h}}~\Big [\dfrac{1}{2}\mathcal {A}_{D,h}(y_h,y_h)-(f,y_h)\Big ], \end{aligned}$$
(5)

where

$$\begin{aligned} \mathcal {A}_{D,h}(v,w) = \gamma a_{D, h}(v, w) + (v, w) \end{aligned}$$

and

(6)

Here, \(\sigma >0\) is a penalty parameter chosen large enough (cf. [20]) so that \(a_{D,h}(\, \cdot \, , \, \cdot \,)\) is positive definite on \(V_h\). Note that the sums in (6) involving the jumps and the averages run only over the interior faces.

Remark 1

The finite element space and the bilinear form \(a_{D,h}\) appear in \(C^0\) interior penalty methods for the biharmonic equation with the boundary conditions of simply supported plates [3, 5, 11].

2.2 Neumann Problem

Let the closed convex subset \(K_{N,h}\subset V_h\) be defined by

$$\begin{aligned} K_{N, h} = \{ y\in V_h: y(p)\le \psi (p) \text { for all } p\in \mathcal {V}_h \}. \end{aligned}$$

The discrete problem for (3) when \(K=K_N\) is defined as follows.

$$\begin{aligned} \text { Find } \bar{y}_h = \mathop {\text {argmin}}_{y_h\in K_{N, h}}~\left[ \dfrac{1}{2}\mathcal {A}_{N,h}(y_h,y_h)-(f,y_h)\right] , \end{aligned}$$
(7)

where

$$\begin{aligned} \mathcal {A}_{N,h}(v,w) = \gamma a_{N, h}(v, w) + (v, w) \end{aligned}$$

and

(8)

In contrast to (6), the sums in (8) involving the jumps and the averages run over all faces.

Remark 2

The finite element space \(V_h\) and the bilinear form \(a_{N,h}\) appear in \(C^0\) interior penalty methods for the biharmonic equation with boundary conditions of the Cahn–Hilliard type [3, 4].

2.3 Post-processing

We now describe three post-processing procedures from [9] that generate approximations \(\bar{u}_h\) for the optimal control \(\bar{u}\) from the discrete optimal state \(\bar{y}_h\).

2.3.1 Procedure 1

Since \(\bar{u}=-\varDelta \bar{y}\), we simply take \(\bar{u}_h\) to be \(-\varDelta _h \bar{y}_h\), where \(\varDelta _h\) is the piecewise Laplace operator with respect to \(\mathscr {T}_h\).

2.3.2 Procedure 2

The optimal state \(\bar{y}\) and the optimal control \(\bar{u}\) are connected by

$$\begin{aligned} \int _\varOmega \nabla \bar{y} \cdot \nabla z \,dx = \int _\varOmega \bar{u} z \,dx \qquad \forall \, z\in H^1_0(\varOmega ) \end{aligned}$$

for the Dirichlet problem and by

$$\begin{aligned} \int _\varOmega \nabla \bar{y} \cdot \nabla z \,dx = \int _\varOmega \bar{u} z \,dx \qquad \forall \, z\in H^1(\varOmega ) \end{aligned}$$

for the Neumann problem. Therefore, we can compute an approximation \(\bar{u}_h\) of \(\bar{u}\) by solving

(9)

for the Dirichlet problem and by solving

$$\begin{aligned} \int _\varOmega \nabla \bar{y}_h \cdot \nabla z_h \,dx = \int _\varOmega \bar{u}_h z_h \,dx \qquad \forall \, z_h \in V_h \end{aligned}$$
(10)

for the Neumann problem.

2.3.3 Procedure 3

Here, we exploit the following relations between \(\bar{y}\) and \(\bar{u}\):

$$\begin{aligned} \int _\varOmega \nabla \bar{u} \cdot \nabla z \,dx&= - \int _\varOmega \nabla (\varDelta \bar{y}) \cdot \nabla z \,dx \\&= \int _\varOmega (\varDelta \bar{y})(\varDelta z) \,dx \\&= \int _\varOmega D^2\bar{y} : D^2z \,dx \quad \forall \, z\in V_D \end{aligned}$$

for the Dirichlet problem and

$$\begin{aligned} \int _\varOmega \nabla \bar{u} \cdot \nabla z \,dx&= - \int _\varOmega \nabla (\varDelta \bar{y}) \cdot \nabla z \,dx \\&= \int _\varOmega (\varDelta \bar{y})(\varDelta z) \,dx \\&= \int _\varOmega D^2\bar{y} : D^2z \,dx \qquad \forall \, z\in V_N \end{aligned}$$

for the Neumann problem. Therefore, we can compute an approximation of \(\bar{u}\) by solving

(11)

for the Dirichlet problem and compute \(\bar{u}_h\in V_h\cap L^2_0(\varOmega )\) by solving

$$\begin{aligned} \int _\varOmega \nabla \bar{u}_h \cdot \nabla \bar{z}_h \,dx = a_{N,h}(\bar{y}_h, z_h) \qquad \forall \, z_h\in V_h \end{aligned}$$
(12)

for the Neumann problem. Note that the solvability of (12) follows from the compatibility condition

$$a_{N,h}(\bar{y}_h,1)=0.$$

Remark 3

The computational cost increases from Procedure 1 to Procedure 3. However, these computational costs are negligible in comparison with the cost of solving the variational inequality.

3 Implementation

The discrete problems in the numerical experiments are solved by a primal-dual active set algorithm (cf. [18, 21] and the references therein).

Let \(\overline{\mathbf {y}}_\star \in {\mathbb {R}}^N\) be the vector representing \(\bar{y}_h\) in (5) (or (7)) with respect to a nodal basis of the \(\mathbb {Q}_2\) finite element space, where N is the dimension of (or \(V_h\)). Similarly, \(\mathtt {K}\subset {\mathbb {R}}^N\) is the subset corresponding to \(K_{D,h}\) (or \(K_{N,h}\)), and \(\mathbf{A}\in {\mathbb {R}}^{N\times N}\) denotes the matrix representing the bilinear form \(\mathcal {A}_{D,h}(\cdot ,\cdot )\) (or \(\mathcal {A}_{N,h}(\cdot ,\cdot )\)) with respect to the nodal basis of the \(\mathbb {Q}_2\) finite element space. Then, (5) or (7) can be written as the following variational inequality: Find \(\overline{\mathbf{y}}_*\in \mathtt {K}\) such that

$$\begin{aligned} (\mathbf{A} \overline{\mathbf{y}}_*, \mathbf {y}-\overline{\mathbf{y}}_*) \ge (\mathbf {f}, \mathbf {y}-\overline{\mathbf{y}}_*) \qquad \forall \,\mathbf {y}\in \mathtt {K}. \end{aligned}$$
(13)

Here, \((\cdot ,\cdot )\) is the Euclidean inner product on \({\mathbb {R}}^N\) and the vector \(\mathbf {f}\) is defined by

$$(\mathbf {f},\mathbf {y})=\int _\varOmega y_d y_h\,dx,$$

where the vector \(\mathbf {y}\) represents the finite element function \(y_h\) in (or \(V_h\)).

Let \(\varvec{\lambda }_*=\mathbf{f}-\mathbf{A}\overline{\mathbf{y}}_*\). The primal-dual problem of (13) is to find \((\overline{\mathbf{y}}_*,\varvec{\lambda }_*)\in {\mathbb {R}}^N\times {\mathbb {R}}^N\) such that

$$\begin{aligned} \mathbf{A}\overline{\mathbf{y}}_*+ \varvec{\lambda }_*&= \mathbf{f}, \\ \varvec{\psi }- \overline{\mathbf{y}}_*&\ge \mathbf{0}, \\ \varvec{\lambda }_*&\ge \mathbf{0}, \\ (\varvec{\lambda }_*, \varvec{\psi }-\overline{\mathbf{y}}_*)&= \mathbf{0}, \end{aligned}$$

where \(\varvec{\psi }\) is a vector in \(({\mathbb {R}}\cup \{+\infty \})^N\) that represents the discrete constraint. In other words, the component of \(\varvec{\psi }\) corresponding to a node \(p\in \mathcal {V}_h\) is given by \(\psi (p)\), while all other components of \(\varvec{\psi }\) equal \(+\infty \).

Equivalently, we can write

$$\begin{aligned} \begin{aligned} \mathbf{A}\overline{\mathbf{y}}_*+ \varvec{\lambda }_*&= \mathbf{f}, \\ \overline{\mathbf{y}}_*&= \varvec{\psi }&\text { on } \mathtt {A}_*,\\ \varvec{\lambda }_*&= \mathbf{0}&\text { on } \mathtt {I}_*, \end{aligned} \end{aligned}$$
(14)

where \(\mathtt {A}_*\) and \(\mathtt {I}_*\) are the active set and inactive set defined, respectively, by

$$\begin{aligned} \mathtt {A}_*&= \left\{ j\in \mathtt {N}: \varvec{\lambda }_*(j)=(\mathbf{f}-\mathbf{A}\overline{\mathbf{y}}_*)(j)>0 \text { and } \overline{\mathbf{y}}_*(j)=\varvec{\psi }(j) \right\} , \\ \mathtt {I}_*&= \left\{ j\in \mathtt {N}: \varvec{\lambda }_*(j)=(\mathbf{f}-\mathbf{A}\overline{\mathbf{y}}_*)(j)=0 \text { and } \overline{\mathbf{y}}_*(j)\le \varvec{\psi }(j) \right\} . \end{aligned}$$

Here, \(\mathtt {N}=\left\{ 1, 2,\dots , N \right\} \) and \(\varvec{\lambda }_*(j)\) is the jth component of \(\varvec{\lambda }_*\).

The primal-dual active set method solves (14) by generating a sequence of sets \(\mathtt {A}_k\) and \(\mathtt {I}_k\) that approximate \(\mathtt {A}_*\) and \(\mathtt {I}_*\) and then obtain the approximation \((\overline{\mathbf {y}}_k,\varvec{\lambda }_k)\) by solving a reduced system.

Given an initial guess \((\overline{\mathbf {y}}_0, \varvec{\lambda }_0)\in \mathbb {R}^{N}\times \mathbb {R}^{N}\) where \( \varvec{\lambda }_0\ge 0\), we define

$$\begin{aligned} \mathtt {A}_0&= \left\{ j\in \mathtt {N}: \varvec{\lambda }_0(j) + c(\overline{\mathbf {y}}_0(j) - \varvec{\psi }(j)) > 0 \right\} , \\ \mathtt {I}_0&= \left\{ j\in \mathtt {N}: \varvec{\lambda }_0(j) + c(\overline{\mathbf {y}}_0(j) - \varvec{\psi }(j)) \le 0 \right\} = \mathtt {N}\setminus \mathtt {A}_0, \end{aligned}$$

where c is a positive number.

For \(k\ge 1\), we solve the reduced system

$$\begin{aligned} \begin{aligned} \mathbf {A}_k\overline{\mathbf {y}}_k+ \varvec{\lambda }_k&= \mathbf{f}_k, \\ \overline{\mathbf {y}}_k&= \varvec{\psi }&\text { on } \mathtt {A}_{k-1}, \\ \varvec{\lambda }_k&= \mathbf{0}&\text { on } \mathtt {I}_{k-1}, \end{aligned} \end{aligned}$$
(15)

and update the active set and inactive set by

$$\begin{aligned} \mathtt {A}_k&= \left\{ j\in \mathtt {N}: \varvec{\lambda }_k(j) + c(\overline{\mathbf {y}}_k(j) - \varvec{\psi }(j)) > 0 \right\} ,\end{aligned}$$
(16)
$$\begin{aligned} \mathtt {I}_k&= \left\{ j\in \mathtt {N} : \varvec{\lambda }_k(j) + c(\overline{\mathbf {y}}_k(j) - \varvec{\psi }(j)) \le 0 \right\} = \mathtt {N}\setminus \mathtt {A}_k. \end{aligned}$$
(17)

(Choosing \(c > 0\) large, e.g., \(c = 10^7\), can improve the performance of the computation.)

Let the diagonal matrices \(\mathbf {P}_{\mathtt {A}_k}, \mathbf {P}_{\mathtt {I}_k} \in {\mathbb {R}}^{N\times N}\) be defined by

$$\begin{aligned}{}[\mathbf {P}_{\mathtt {A}_k}\mathbf {v]}(j)&= \left\{ \begin{array}{lr} \mathbf {v}(j) &{}\text { if } j\in \mathtt {A}_k, \\ 0 &{} \text{ if } j\in \mathtt {I}_k, \end{array} \right. \\ [\mathbf {P}_{\mathtt {I}_k}\mathbf {v}](j)&= \left\{ \begin{array}{lr} \mathbf {v}(j) &{}\text { if } j\in \mathtt {I}_k, \\ 0 &{} \text{ if } j\in \mathtt {A}_k. \end{array} \right. \end{aligned}$$

Then solving (15) is equivalent to solving

$$\begin{aligned} \mathbf {P}_{\mathtt {I}_{k-1}}\mathbf {A}_k\mathbf {P}_{\mathtt {I}_{k-1}}(\mathbf {P}_{\mathtt {I}_{k-1}}\overline{\mathbf {y}}_k) = \mathbf {P}_{\mathtt {I}_{k-1}}\mathbf{f}_k - \mathbf {P}_{\mathtt {I}_{k-1}}\mathbf {A}_k\mathbf {P}_{\mathtt {A}_{k-1}}\varvec{\psi }\end{aligned}$$
(18)

together with

$$\begin{aligned} \mathbf {P}_{\mathtt {A}_{k-1}}\overline{\mathbf {y}}_k= \mathbf {P}_{\mathtt {A}_{k-1}}\varvec{\psi },\; \mathbf {P}_{\mathtt {I}_{k-1}}\varvec{\lambda }_k= \mathbf{0} \quad \text {and} \quad \mathbf {P}_{\mathtt {A}_{k-1}}\varvec{\lambda }_k&= \mathbf {P}_{\mathtt {A}_{k-1}}\mathbf{f}_k - \mathbf {P}_{\mathtt {A}_{k-1}}\mathbf {A}_k\overline{\mathbf {y}}_k. \end{aligned}$$

The iteration is terminated when two consecutive active sets determined by (16) are identical. The linear system (18) is solved by the preconditioned conjugate gradient method with an algebraic multigrid preconditioner, implemented within the Trilinos library [17].

For the problem on the coarsest mesh \(\mathcal {T}_0\), all degrees of freedom are initially placed in the inactive set. For subsequent refinements at level \(k\ge 1\), we first compute \(\tilde{\mathbf {y}}_k\) and \(\tilde{\varvec{\lambda }}_k\) from \(\mathbf {y}_{k-1}\) and \(\varvec{\lambda }_{k-1}\) through interpolation, and then, we initialize the active and inactive set using (16) and (17), with \(\mathbf {y}_k\) and \(\varvec{\lambda }_k\) replaced by \(\tilde{\mathbf {y}}_k\) and \(\tilde{\varvec{\lambda }}_k\), respectively.

To speed up the solution of the linear system, an inexact method is implemented in which the inner iteration runs to a tolerance determined by the maximum of an absolute tolerance and a relative tolerance based on the norm of the initial residual from (15). This approach was observed to yield a solution in fewer iterations than either solving to a uniform absolute tolerance alone or to a relative tolerance based on the residual of the inner iteration alone. With this approach, the solver required less than 8 iterations of the primal-dual active set method for the examples presented in Section 4.

The numerical implementation has been realized by using the C++ software library deal.II [1, 2]. The skeleton of the code is based on the deal.II tutorial step-41, while the assembling of the local cell and face matrices relies on the \(\texttt {LocalIntegrators}\) classes within the \(\texttt {MeshWorker}\) framework (formally introduced in tutorial step-39).

Since the assembled matrices correspond to the C\(^0\) interior penalty formulation of the biharmonic operator, which are different from the one implemented in deal.II, we rely on the \(\texttt {LocalIntegrators}\) for the weak form of this problem. Furthermore, the calculation of higher order derivatives is performed by using the \(\texttt {contract}\) family of deal.II functions.

4 Numerical Results

In this section, we present numerical examples for (3). The discrete optimal state \(\bar{y}_h\) is obtained from (5) for the Dirichlet problem and (7) for the Neumann problem, and we use the post-processing procedures in Section 2.3 to generate the discrete optimal control \(\bar{u}_h\). For each example, we report the state error in a \(H^2\)-like mesh-dependent norm (cf. (19) and (20)) and in the \(H^1, L^2\), and \(L^\infty \)-norms. We also report the \(L^2\) control errors for all post-processing procedures, and the \(H^1\) control errors of Procedures 2 and 3. Finally, we present a figure of the contact set for each example. We will comment on the numerical results in Section 5.

Examples 1–3 correspond to the optimal control problem with the Dirichlet boundary condition, and Examples 4–6 are concerned with the Neumann boundary condition. The domain is the unit cube \(\varOmega = (-0.5, 0.5)^3\) for all the examples.

We will use \(\left\| \cdot \right\| _\infty \) to denote the \(\ell ^\infty \) norm defined by

$$\begin{aligned} \Vert v\Vert _\infty = \max _{p\in \mathcal {N}_h} |v(p)|, \end{aligned}$$

where \(\mathcal {N}_h\) is the set of the nodes of the \(\mathbb {Q}_2\) finite element space associated with \(\mathcal {T}_h\), and we define the mesh-dependent norms \(\Vert \cdot \Vert _{h,D}\) and \(\Vert \cdot \Vert _{h,N}\) by

(19)
(20)

We solve the discrete problems on a sequence of triangulations generated by uniform refinements, where the coarsest mesh consists of a single element. The number of degrees of freedom at the kth level is \((2k+3)^3\). The discrete optimal state associated with \({\mathcal T}_k\) is denoted by \(\bar{y}_k\), the discrete optimal control obtained by the post-processing procedure i (\(1\le i\le 3\)) is denoted by \(\bar{u}_{k,i}\), and \(N_k \) stands for the number of degrees of freedom at mesh level k. The word “order” denotes the order of convergence computed by \(\ln (\left\| e_{k-1} \right\| /\left\| e_{k} \right\| )/\ln 2\), where \(e_k = \bar{y}-\bar{y}_{k}\) (or \(e_k=\bar{u}-\bar{u}_{k,j}\)) if the exact optimal state \(\bar{y}\) (or the exact optimal control \(\bar{u}\)) is available. If the exact solution is not available, then we take \(e_k=\bar{y}_k-\bar{y}_{k-1}\) (or \(e_k=\bar{u}_{k,i}-\bar{u}_{k-1,i}\)).

The CPU time for the 3D computations shown was observed to increase linearly with the number of degrees of freedom. For each example, the numerical results on the finest-level mesh took approximately 18 hours to complete. All the results below were generated on the SuperMIC at Louisiana State University without using parallel processing.

Example 1 (Dirichlet problem with a known solution)

We begin by considering (3) on the ball of radius two centered at the origin. We take \(\gamma \) to be 1 and the exact solution to be

$$\begin{aligned} \bar{y} = \left\{ \begin{array}{lr} r^2-1 &{}\qquad \text { if } r \le r_0\\ \dfrac{1}{120}r^4 + C_1 + C_2r +C_3r^2 +C_4/r &{}\qquad \text { if } r > r_0 \end{array} \right. , \end{aligned}$$

where \(r=\sqrt{x_1^2+x_2^2+x_3^2}\), \(r_0= 0.32151559\), \(C_1= -1.4090715\), \(C_2 = 1.2737074\), \(C_3 = -0.32339567\), and \(C_4= 0.043812326\). The upper bound for the state is given by \(\psi =r^2-1\), and the desired state \(y_d\) is \(1+\bar{y}\).

The restriction of \(\bar{y}\) to the unit cube \(\varOmega =(-0.5, 0.5)^3\) is the exact solution of (3) with the same \(y_d\) and \(\psi \), but the nonhomogeneous boundary conditions determined by \(\bar{y}\).

Remark 4

The exact solution (3) on the ball is obtained by reducing the problem to a one-dimensional problem through the rotational symmetry.

In view of the nonhomogeneous boundary conditions, we change the definition of \(K_{D,h}\) to

$$\begin{aligned} K_{D, h} = \{ y\in V_h: y- \Pi _h \bar{y} \in H^1_0(\varOmega )\text { and } y(p)\le \psi (p) \text { for all } p\in \mathcal {V}_h\}, \end{aligned}$$

where \(\Pi _h\) is the Lagrange nodal interpolation operator. The discrete problem (5) then becomes

$$\begin{aligned} \text { Find } \bar{y}_h = \mathop {\text {argmin}}_{y_h\in K_{D, h}}~\left[ \dfrac{1}{2}\mathcal {A}_{N,h}(y_h,y_h) - \int _{\partial \varOmega } \frac{\partial ^2\bar{y}}{\partial n^2} \frac{\partial y_h}{\partial n} \,dS -(f,y_h)\right] . \end{aligned}$$

In Table 1, we report the error of the state in \(\Vert \cdot \Vert _{h,D}\) and in the \(H^1\), \(L^2\), and \(L^\infty \)-norms. In Table 2, we report \(L^2\) control errors for all post-processing procedures described in Section 2.3, and we report the \(H^1\) control errors of Procedures 2 and 3 in Table 3. The discrete contact set after 4 uniform refinements is shown in Figure 1.

Table 1 State errors for Example 1.
Table 2 \(L^2\) control errors for the three procedures, Example 1.
Table 3 \(H^1\) control errors for Procedures 2 and 3, Example 1.
Fig. 1
figure 1

The discrete contact set for Example 1 after 4 uniform refinements.

Example 2 (Dirichlet problem with an unknown solution)

We take \(\gamma \) to be \(10^{-3}\), \(\psi \) to be the constant 0.2, and \(y_d\) to be the function \(\sin (2 \pi (x_1+0.5)(x_2+0.5)(x_3+0.5))\). The errors for the state and the control are reported in Tables 46. The discrete contact set after 4 uniform refinements is displayed in Figure 2.

Example 3 (Dirichlet problem with an unknown solution)

As in Example 2, we take \(\gamma \) to be \(10^{-3}\) and the upper bound \(\psi \) to be a constant 0.15. But we choose \(y_d\) to be a piecewise constant function:

$$\begin{aligned} y_d= {\left\{ \begin{array}{ll} 0 &{}\qquad \text{ if }~~ x<0,\\ 1 &{}\qquad \text{ otherwise. } \end{array}\right. } \end{aligned}$$

The errors for the state and the control are reported in Tables 79. The discrete contact set after 4 levels of uniform refinement is shown in Figure 3.

Example 4 (Neumann problem with an exact solution)

As in Example 1, we begin with (3) on the ball of radius 2 centered at the origin. We take \(\gamma \) to be 1 and the exact solution to be

$$\begin{aligned} \bar{y}={\left\{ \begin{array}{ll} C_1 r+C_2 r^2+ C_3/r +C_4 &{}\qquad \text{ if }\quad r>r_0\\ r^2-r^4/8 &{}\qquad \text{ if }\quad r\le r_0 \end{array}\right. }, \end{aligned}$$

where \(r_0=0.33563105\), \(C_1=1.2785390\), \(C_2=-0.31672296\), \(C_3=0.046588697\), and \(C_4=-0.42118638\). The upper bound for the state is given by \(\psi =r^2-r^4/8\), and the desired state \(y_d\) equals \(\bar{y}\).

Table 4 State errors for Example 2.
Table 5 \(L^2\) control errors for the three procedures, Example 2.
Table 6 \(H^1\) control errors for Procedures 2 and 3, Example 2.

The restriction of \(\bar{y}\) to the unit cube \(\varOmega =(-0.5, 0.5)^3\) is the exact solution of (3) with the same \(\psi \) and \(y_d\), and the nonhomogeneous boundary conditions determined by \(\bar{y}\).

Fig. 2
figure 2

The discrete contact set for Example 2 after 4 uniform refinements.

Table 7 State errors for Example 3.
Table 8 \(L^2\) control errors for the three procedures, Example 3.
Table 9 \(H^1\) control errors for Procedures 2 and 3, Example 3.
Fig. 3
figure 3

The discrete contact set for Example 3 after 4 uniform refinements.

In view of the nonhomogeneous conditions, the discrete problem (7) becomes

The errors for the state are summarized in Table 10, while Tables 11 and 12 contain the \(L^2\) and \(H^1\) errors for the control for the post-processing procedures from Section 2.3. The discrete contact set after 4 uniform refinements is depicted in Figure 4.

Table 10 State errors for Example 4.
Table 11 \(L^2\) control errors for the three procedures, Example 4.
Table 12 \(H^1\) control errors for Procedures 2 and 3, Example 4.
Fig. 4
figure 4

The discrete contact set for Example 4 after 4 levels of uniform refinement.

Example 5 (Neumann problem with an unknown solution)

We take \(\gamma \) to be \(10^{-3}\), the upper bound \(\psi \) to be the constant 0.2, and \(y_d\) to be the function \(\sin (2 \pi (x_1+0.5)(x_2+0.5)(x_3+0.5))\). The errors for the state and the control are reported in Tables 1315. The discrete contact set after 4 uniform refinements is shown in Figure 5. Note that the contact set is not disjoint from \(\partial \varOmega \) for this example.

Table 13 State errors for Example 5.
Table 14 \(L^2\) control errors for the three procedures, Example 5.
Table 15 \(H^1\) control errors for Procedures 2 and 3, Example 5.
Fig. 5
figure 5

The discrete contact set for Example 5 after 4 uniform refinements.

Table 16 State errors for Example 6.
Table 17 \(L^2\) control errors for the three procedures, Example 6.
Table 18 \(H^1\) control errors for Procedures 2 and 3, Example 6.

Example 6 (Neumann problem with an unknown solution)

For the last example, we take \(\gamma \) to be \(10^{-1}\) and the upper bound \(\psi \) to be the constant 0.5. Unlike Example 5, we choose \(y_d\) to be the piecewise constant function defined by

$$\begin{aligned} y_d= {\left\{ \begin{array}{ll} 20 \qquad \text {if}\; (x,y,z) \in (-0.375,0.125)^3,\\ 0 \,\,\qquad \text {otherwise.} \end{array}\right. } \end{aligned}$$

We report the errors for the state and the control in Tables 1618. The discrete contact set after 4 uniform refinements is displayed in Figure 6. Note that the contact set is not disjoint from \(\partial \varOmega \) for this example.

Fig. 6
figure 6

The discrete contact set for Example 6 after 4 uniform refinements.

5 Concluding Remarks

We have obtained the first numerical results for solving elliptic distributed optimal control problems in three-dimensional domains as fourth order variational inequalities.

In all the examples, we have observed O(h) convergence for the state in the mesh-dependent norm \(\Vert \cdot \Vert _{h,D}\) or \(\Vert \cdot \Vert _{h,N}\). This is most evident for Example 1 and Example 4 where we know the exact solutions. The convergence in the other examples appears to be slightly better than O(h), probably because the errors in these examples are only estimated by comparing the solutions on consecutive levels.

Note that the exact solution \(\bar{y}\) belongs to \(H^3_{loc}(\varOmega )\) by the result in [12] for fourth order variational inequalities. When the contact set is disjoint from the boundary of the unit cube (Examples 1–4), \(\bar{y}\) belongs globally to \(H^{3}(\varOmega )\) by the result in [10, 25] for elliptic boundary value problems on nonsmooth domains. Therefore, an O(h) error in the \(H^2\)-like mesh-dependent norm for a method based on the \(\mathbb {Q}_2\) element is not surprising. On the other hand, when the contact set is not disjoint from the boundary of the domain, the global regularity of the exact solution \(\bar{y}\) is very much problem dependent. The observed convergence behavior for Examples 5 and 6 indicates that the exact solution of the two optimal control problems in these examples may also belong to \(H^{3}(\varOmega )\).

The convergence for the state in the lower order norms is of higher order in all the examples. In particular, the \(H^1\) error of the state is \(O(h^2)\) in all the examples, which compares favorably to the O(h) error in standard finite element methods for optimal control problems where the state y is eliminated (cf. [19] and the references therein).

For the approximate control generated by post-processing, the convergence in the \(L^2\) norm is O(h) for Procedure 1 and \(O(h^{3/2})\) for Procedure 2 and Procedure 3. We also observe that up to two hundred thousand degrees of freedom, the magnitudes of the \(L^2\) errors for the approximate control generated by Procedure 1 in Experiment 5 and Experiment 6 are smaller than those for the other two procedures.

As in the two dimensional case, we also observe that the approximate optimal controls generated by Procedure 2 and Procedure 3 converge in the \(H^1\) norm. This phenomenon has not been observed in the standard approach.

Finally, we remark that a direct extension of the methodology developed in [9] only leads to \(O(h^\frac{1}{2})\) convergence in the mesh-dependent energy norms when the exact solution \(\bar{y}\) belongs to \(H^3(\varOmega )\). New techniques are required for the analysis of three-dimensional problems.