@@ -19,25 +19,25 @@ with some right-hand side ``f`` within the set of admissible functions that lie
1919
2020Opposite to Example225 the solution is computed by the latent variable proximal point (LVPP) method
2121that solves the problem via a series of nonlinear mixed problems that guarantee the decay of the
22- energy. Given ``\alpha_k`` and initial guess ``u_0`` and ``\psi_0``, the subproblem for ``k \geq 1``
22+ energy. Given ``\alpha_k`` and initial guesses ``u_0`` and ``\psi_0``, the subproblem for ``k \geq 1``
2323seeks a solution ``u_{k} \in V := H^1_0(\Omega)`` and ``\psi_{k} \in W := L^\infty(\Omega)`` such that
2424```math
2525\begin{aligned}
26- \alpha_k (\nabla u_k, \nabla v) + (\psi_k, v) = (\alpha_k f + \psi_{k-1},v)
26+ \alpha_k (\nabla u_k, \nabla v)_{L^2} + (\psi_k, v)_{L^2} & = (\alpha_k f + \psi_{k-1},v)_{L^2}
2727&& \text{for all } v \in V\\
28- (u_k, w) - (\varchi + \exp(\psi_k), w) & = 0 &&
29- \text{for all } w \in W
28+ (u_k, w)_{L^2} - (\chi + \exp(\psi_k), w)_{L^2} & = 0
29+ && \text{for all } w \in W
3030\end{aligned}
3131```
3232The parameter ``\alpha_k`` is initialized with ``\alpha_0 = 1`` and updated according to
33- ``\alpha_k = min(max(r^(q^k) - α), 10^3)`` with ``r = q = 1.5``. The problem for each ``k``
33+ ``\alpha_k = \ min(\ max(r^(q^k) - α), 10^3)`` with ``r = q = 1.5``. The problem for each ``k``
3434is solved by the Newton method. This implements Algorithm 3 in the reference below.
3535
3636
3737!!! reference
3838
39- ''Proximal Galerkin: A Structure-Preserving Finite Element Method for Pointwise Bound Constraints''
40- Brendan Keith, Thomas M. Surowiec, Found Comput Math (2024)
39+ ''Proximal Galerkin: A Structure-Preserving Finite Element Method for Pointwise Bound Constraints'',
40+ Brendan Keith, Thomas M. Surowiec, Found Comput Math (2024),
4141 [>Link<](https://doi.org/10.1007/s10208-024-09681-8)
4242
4343
@@ -58,11 +58,7 @@ const b = 9 // 20
5858const d = sqrt (1 // 4 - b^ 2 )
5959function χ (x)
6060 r = sqrt (x[1 ]^ 2 + x[2 ]^ 2 )
61- if r <= b
62- return sqrt (1 // 4 - r^ 2 )
63- else
64- return d + b^ 2 / d - b * r / d
65- end
61+ return r <= b ? sqrt (1 // 4 - r^ 2 ) : d + b^ 2 / d - b * r / d
6662end
6763
6864# # transformation of latent variable ψ to constrained variable u
@@ -148,8 +144,7 @@ function main(;
148144 @info " dist = $dist , niterations = $(niterations - 1 ) "
149145 if dist < tol
150146 converged = true
151- else
152- # increase proximal parameter
147+ else # # increase proximal parameter
153148 α = min (max (r^ (q^ k) - α), 10 ^ 3 )
154149 end
155150 end
0 commit comments