## 4 Numerical Examples and Validation of the Software
### Comparison to Other Methods
#### 4.3.3 Description of the Primal-Dual Active-Set Strategy  
This subsection is devoted to the explicit description of the Primal-Dual Active-Set Strategy that is considered in this article. As discussed before for a basis \(\{b_{1},\ldots,b_{n_{h}}\}\), a basis of \(X_{h}\) the problem (33) can be equivalently reformulated to (34). The corresponding representation of \(X_{h}\), see (7), indicates that a basis \(\mathcal{B}_{h}=\{b_{1},\ldots,b_{n_{h}}\}\) of \(X_{h}\) can be chosen, such that, for all coefficient vectors \(y_{h}^{v}\) of element \(y_{h}\in X_{h}\) for all \(S\in\{A,B,C\}\), there exists an index set \(J_{S}\subset\{1,\ldots,n_{h}\}\), such that the restriction of the coefficient vector \((y_{h}^{v})\) on the subindexset \(J_{S}\) (\(y_{h}^{v})_{J_{S}}\) is the coefficient vector of \(c_{S}\). In this notation, define the index-set \(J\) as  
\[J:=\bigcup_{S\in\{A,B,C\}}J_{S}.\]  
Applying the Primal-Dual Active-Set Strategy, cf. [23] as a method to approximate solutions to (34), together with the notation above, one obtains the following Algorithm 6. ```
Input : Define a starting values \(x_{h}^{(0),s}\), \(\lambda^{(0)}\), \(a_{0}\) and define \(k:=0\). Output : Approximate solution \(x_{h}\) to (33) and approximate Lagrangian function \(\lambda_{h}\). With the notation above the Primal-Dual Active-Set Strategy for this problem type S1: Define the inactive set \(\mathcal{I}_{k}\) and active set \(\mathcal{A}_{k}\) as follows: \[\mathcal{I}_{k}:=\left\{i\in\{1,\ldots,n\}\ \big{|}\ \lambda_{i}^{(k)}+\frac{1}{2}y_{i}^{k}>0 \right\}\cap J,\] and \[\mathcal{A}_{k}:=\left\{i\in\{1,\ldots,n\}\ \big{|}\ \lambda_{i}^{(k)}+\frac{1}{2}y_{i}^{k}\leq 0 \right\}\cap J.\] S2: Solve the following system of linear equations \[Ay^{(k+1)}+\lambda^{(k+1)} =f,\] (36a) \[y^{(k+1)} =0,\qquad\text{on}\ \mathcal{A}_{k}\] (36b) \[\lambda^{(k+1)} =0,\qquad\text{on}\ \mathcal{I}_{k}.\] (36c) S3: Stop the algorithm, or set \(k:=k+1\) and return to \(\mathbf{S1}\). ```
**Algorithm 6**Primal-Dual Active-Set Strategy  
**Remark 8**. : _Note that, by the problem formulation (36a)-(36c) directly implies, by the split of the indices into an active set \(\mathcal{A}\) and an inactive set \(\mathcal{I}\), the orthogonality \(c_{S}\perp\mu_{S}\) for all \(S\in\{A,B,C\}\) is fulfilled. Thus, the usage of the relative error_  
\[err=\left|\sum_{S\in\{A,B,C\}}\mu_{A}\cdot c_{A}\right|\]  
_for a breaking condition of the corresponding algorithm is not applicable._  
Before the actual comparison between the Primal-Dual Active-Set Strategy and the augmented Lagrangian method will be made, some additional remarks on the coupling between refinement and Algorithm 6 have to be made:  
For the comparison of the algorithm on different meshes, the algorithm was coupled with a loop of uniform refinements. The global Algorithm 7 is given through the following:
```
Input : Define a starting values \(x_{h}^{(0),s}\), \(\lambda^{(0)}\), \(a_{0}\) and define \(k:=0\). Furthermore define an initial triangulation \(\mathcal{T}_{0}\). Output : Approximate solution \(x_{h}\) to (33) and approximate Lagrangian function \(\lambda_{h}\). Additionally the algorithm outputs the final triangulation \(\mathcal{T}_{\ell}\) Perform the following steps: S1: Compute an Approximation \(x_{h_{\ell}}\) of a solution and a Lagrangian multiplier \(\lambda_{\ell}\) to (33) on the current triangulation \(\mathcal{T}_{\ell}\) using the initial values \(x_{h_{\ell}}^{(0),s}\) and \(\lambda_{\ell}^{(0)}\) using the Algorithm 4. S2: If \(\mathcal{T}_{\ell}\) has more than \(N\) nodes then break the loop. S3: Define the mesh \(\mathcal{T}_{\ell+1}\) as uniform red refinement of the triangulation \(\mathcal{T}_{\ell}\). For a definition of the uniform red refinement see [27]. S4: Define \(x_{h_{\ell}}^{(0),s}:=x_{h_{\ell}}\) and \(\lambda_{\ell}^{(0)}:=\lambda_{\ell}\). S5: Set \(\ell:=\ell+1\) and go to \(\mathbf{S1}\).