1 Introduction

The Kohn–Sham model [31, 37, 38] is a prototypical example of a constrained energy minimization problem stated on the infinite-dimensional Stiefel manifold. This means that the sought-after minimizer is a p-frame of \(L^2\)-orthonormal functions. Another well-known example is the Gross–Pitaevskii model for Bose–Einstein condensates of ultracold bosonic gases [39, 43]. Here, the special case \(p=1\) is of interest, where we seek a single (minimizing) function on the unit sphere in \(L^2\), representing a unit mass constraint. Since these two applications are relevant for different communities, numerical methods are mostly considered separately. One aim of this paper is to give a unified approach to solving energy minimization problems. More precisely, we introduce Riemannian Newton methods for minimizing energy functionals of Kohn–Sham type, which also includes the Gross–Pitaevskii model. In general, the here considered PDE problems require a special treatment in terms of sparsity and dimension-independent methods, which is not part of existing general purpose optimization packages.

The numerical solution of the Gross–Pitaevskii model has been studied extensively in recent years. The most common numerical techniques are iterative methods based on Riemannian (conjugate) gradient descent methods or discretized Riemannian gradient flows in various metrics [10, 11, 20, 22, 26, 29, 36, 44, 53]. A conceptually different approach is the J-method [5, 33] with its inimitable sensitivity with regard to spectral shifts, allowing remarkable speed-ups in a Rayleigh quotient iteration manner. Reformulating the minimization problem as an eigenvalue problem with eigenvector nonlinearity—also known as nonlinear eigenvector problem—the self-consistent field iteration (SCF) can be employed; see [14, 23, 45]. This method involves the solution of a linear eigenvalue problem in each step and is strongly connected to the Newton method [28, 34]. Considering the extended nonlinear system including the normalization constraint also allows a direct application of Newton or Newton-type methods [12, 13, 24]. For an extended review on numerical methods for the Gross–Pitaevskii model, we refer to [28].

Most of the above approaches (with appropriate adjustments) have been applied to the Kohn–Sham model as well. This includes the direct constrained minimization algorithm [3, 47, 52] and the energy-adaptive gradient descent method [8]—both based on Riemannian optimization—as well as gradient flow schemes [21, 32]. Moreover, the SCF algorithm with different types of mixing is very popular in the computational chemistry community; see, e.g., [9, 15, 18, 19, 40]. For a discretized and simplified Kohn–Sham model (without the external potential and the exchange-correlation energy), global convergence and local second-order convergence of an inexact Riemannian Newton method on the Grassmann manifold has been shown in [54]. An overview of existing software packages for density functional theory problems can be found in [35].

In this paper, the point of origin is an energy functional defined on the infinite-dimensional Stiefel manifold, which we introduce in Sect. 2. For a better understanding, we recall definitions and properties of the Stiefel manifold and corresponding retractions in Sect. 3. Moreover, we provide formulae for the Riemannian gradient and the Riemannian Hessian which are needed for the Newton iteration. Since the considered energy functional is invariant under orthogonal matrices, we also discuss the infinite-dimensional Grassmann manifold and examine a connection of its tangent space to a certain subspace of the tangent space of the Stiefel manifold. The resulting Newton algorithms are then subject of Sect. 4. In particular, we present an inexact Riemannian Newton method on the Grassmann manifold. In Sect. 5, we consider the two mentioned examples of the Gross–Pitaevskii and the Kohn–Sham model in more detail. For both applications, we derive the formulae including a spatial discretization and illustrate the supremacy of the inexact Newton approach compared to well-established methods such as the SCF iteration and gradient descent schemes.

1.1 Notation

The sets of \(p\times p\) real symmetric and skew-symmetric matrices are denoted by \({\mathcal {S}}_{\textrm{sym}}(p)\) and \({\mathcal {S}}_{\textrm{skew}}(p)\), respectively. For \(M\in {\mathbb {R}}^{p\times p}\), we write \({{\,\textrm{sym}\,}}M=\frac{1}{2}(M+M^T)\) for the symmetric part, and \({{\,\textrm{tr}\,}}M\) denotes the trace of M. Further, \(I_p\) and \(0_p\) denote the \(p\times p\) identity and zero matrices, respectively. The expression \({{\,\textrm{diag}\,}}(M)\) defines the column vector consisting of the diagonal elements of \(M\in {\mathbb {R}}^{n\times n}\) and \({{\,\textrm{Diag}\,}}(v)\) denotes the diagonal matrix with components of the vector \(v\in {\mathbb {R}}^n\) on the diagonal.

2 The Energy Functional and Nonlinear Eigenvector Problems

For a given spatial domain \(\Omega \subseteq {\mathbb {R}}^d\), \(d\le 3\), we consider the Hilbert spaces \(L^2(\Omega )\) and \({\tilde{V}}\!\subseteq \! H^1(\Omega )\). For \(p\ge 1\), we further define the Hilbert spaces \(V={\tilde{V}}^p\) and \(H=[L^2(\Omega )]^p\) of p-frames. Throughout this paper, we assume that V is dense in H and that \(V\subseteq H\subseteq V^*\) form a Gelfand triple, where \(V^*\) denotes the dual space of V.

For \(\varvec{v}= (v_1, \dots , v_p), \varvec{w}= (w_1, \dots , w_p) \in H\), we define the dot product

$$\begin{aligned} \varvec{v}\cdot \varvec{w}= \sum _{j=1}^p v_j w_j. \end{aligned}$$

On the pivot space H, we further introduce an outer product

$$\begin{aligned} \llbracket {\varvec{v}},{\varvec{w}}\rrbracket _H = \begin{bmatrix} (v_1, w_1)_{L^2(\Omega )} &{}\quad \dots &{}\quad (v_1, w_p)_{L^2(\Omega )} \\ \vdots &{}\quad \ddots &{}\quad \vdots \\ (v_p, w_1)_{L^2(\Omega )} &{}\quad \dots &{}\quad (v_p, w_p)_{L^2(\Omega )} \end{bmatrix} \in {\mathbb {R}}^{p\times p} \end{aligned}$$
(1)

and an inner product

$$\begin{aligned} (\varvec{v}, \varvec{w})_H = \sum _{j=1}^p (v_j, w_j)_{L^2(\Omega )} = {{\,\textrm{tr}\,}}\, \llbracket {\varvec{v}},{\varvec{w}}\rrbracket _H. \end{aligned}$$
(2)

The inner product (2) induces the norm \(\Vert \varvec{v}\Vert _H=\sqrt{(\varvec{v},\varvec{v})_H}\) on H. The canonical identification \({\mathcal {I}}:V\rightarrow V^*\) is defined by

$$\begin{aligned} \langle \,{\mathcal {I}}\varvec{v},\varvec{w}\rangle =(\varvec{v},\varvec{w})_H\qquad \text {for all } \varvec{v},\varvec{w}\in V, \end{aligned}$$

where \(\langle \,\cdot ,\cdot \,\rangle \) denotes the duality pairing on \(V^*\times V\). This identification operator can also be written as \({\mathcal {I}}= {\mathfrak {j}}^*\circ {\mathfrak {i}}_H\circ {\mathfrak {j}}\) with the trivial embedding \({\mathfrak {j}}:V\rightarrow H\) (the injective identity operator), the Riesz isomorphism \({\mathfrak {i}}_H:H\rightarrow H^*\), which reads \({\mathfrak {i}}_H(u) = (u,\,\cdot \,)_H\), and the adjoint operator \({\mathfrak {j}}^*:H^*\rightarrow V^*\) satisfying \({\mathfrak {j}}^*(f)=f\circ {\mathfrak {j}}\) for all \(f\in H^*\). Since all these operators act componentwisely, we have \({\mathcal {I}}(\varvec{v}\Lambda ) = {\mathcal {I}}(\varvec{v})\Lambda \) for all \(\varvec{v}\in V\) and \(\Lambda \in {\mathbb {R}}^{p\times p}\). Moreover, since V is a dense subspace of H, so is \({\mathfrak {j}}(V)\). Hence, \({\mathfrak {j}}^*\) is injective, and as the composition of injective operators, \({\mathcal {I}}\) is also injective. As a result, \({\mathcal {I}}\) has a left inverse \({\mathcal {J}}:V^*\rightarrow V\) such that \({\mathcal {J}}{\mathcal {I}}\varvec{v}=\varvec{v}\) for all \(\varvec{v}\in V\).

2.1 Energy and Applications

For a p-frame \({\varvec{\phi }}\in V\), we consider the energy functional

$$\begin{aligned} {\mathcal {E}}({\varvec{\phi }})&= \frac{1}{2}\, \int \limits _{\Omega } {{\,\text {tr}\,}}\bigl ((\nabla {\varvec{\phi }}(x))^T\nabla {\varvec{\phi }}(x)\bigr ) \,\text{ d }x+ \int \limits _{\Omega } \vartheta (x)\, \rho ({\varvec{\phi }}(x)) \,\text{ d }x + \frac{1}{2}\, \int \limits _{\Omega } \varGamma (\rho ({\varvec{\phi }}(x))) \,\text{ d }x \end{aligned}$$
(3)

with an external potential \(\vartheta \), the density function \(\rho ({\varvec{\phi }}) = {\varvec{\phi }}\cdot {\varvec{\phi }}\), and a smooth nonlinearity \(\varGamma (\rho )\). Our aim is to minimize this energy functional on the infinite-dimensional Stiefel manifold of index p given by

$$\begin{aligned} \text {St}(p,V)= \big \{ {\varvec{\phi }}\in V:\llbracket {{\varvec{\phi }}},{{\varvec{\phi }}}\rrbracket _H = I_p \big \}. \end{aligned}$$
(4)

In other words, we are interested in solving the constrained minimization problem

$$\begin{aligned} \min _{{\varvec{\phi }}\in \text {St}(p,V)} {\mathcal {E}}({\varvec{\phi }}). \end{aligned}$$
(5)

A state of lowest energy is called the ground state. Such states play an important role in quantum-mechanical models as they represent a most stable configuration of atoms and molecules. These models include two famous applications in computational physics and chemistry.

Example 1

(Gross–Pitaevskii model) For \(p=1\) and \(\varGamma (\rho ) = \frac{1}{2} \kappa \rho ^2\) with \(\kappa \in {\mathbb {R}}\), the energy functional takes the form

$$\begin{aligned} {\mathcal {E}}_{\textrm{GP}}(\phi ) = \frac{1}{2}\, \int \limits _{\Omega } \Vert \nabla \phi (x)\Vert ^2 \,\text {d}x+ \int \limits _{\Omega } \vartheta (x)\, \phi (x)^2 \,\text {d}x+ \frac{\kappa }{4}\, \int \limits _{\Omega } \phi (x)^4 \,\text {d}x. \end{aligned}$$
(6)

This is the well-known Gross–Pitaevskii energy used in the modeling of Bose–Einstein condensates of ultracold bosonic gases [39, 43]. Here, \(\vartheta \in L^\infty (\Omega )\) is the magnetic trapping potential, \(\phi \in H_0^1(\Omega )\) is the quantum state of the Bose–Einstein condensate, and \(\kappa \) characterizes the strength and the direction of particle interactions.

Example 2

(Kohn–Sham model) The (non-local) nonlinearity

$$\begin{aligned} \varGamma (\rho ) = \rho \, \int \limits _{\Omega } \frac{\rho ({\varvec{\phi }}(y))}{\Vert x-y\Vert } {\,\mathrm d}y + 2\,\rho \,\epsilon _\text {xc}(\rho ) \end{aligned}$$

yields the Kohn–Sham energy functional

$$\begin{aligned} {\mathcal {E}}_{\textrm{KS}}({\varvec{\phi }})&= \frac{1}{2}\, \sum _{j=1}^p \int \limits _{\Omega } \Vert \nabla \phi _j(x)\Vert ^2 \,\text {d}x+ \int \limits _{\Omega } \vartheta _\text {ion}(x)\, \rho ({\varvec{\phi }}(x)) \,\textrm{d} x \nonumber \\&\qquad + \frac{1}{2} \int \limits _{\Omega }\int \limits _{\Omega } \frac{\rho ({\varvec{\phi }}(x))\, \rho ({\varvec{\phi }}(y))}{\Vert x-y\Vert } {\,\mathrm d}y \,\text {d}x+ \int \limits _{\Omega }\rho ({\varvec{\phi }}(x))\, \epsilon _\text {xc}(\rho ({\varvec{\phi }}(x))) \,\text {d}x, \end{aligned}$$
(7)

where \({\varvec{\phi }}\) denotes a wave function with p components called single-particle orbitals and \(\rho ({\varvec{\phi }})\) is the electronic charge density. Moreover, \(\vartheta _\text {ion}\) is the ionic potential, and \(\epsilon _\text {xc}(\rho )\) is the exchange-correlation energy per particle in a homogeneous electron gas of density \(\rho \). This model is based on the so-called density functional theory [31], which allows a significant reduction of the degrees of freedom [17, 37, 38]. The last integral in (7) is a local density approximation to the exchange-correlation energy obtained by using semi-empirically knowledge of the model [42]. In the Kohn–Sham model, a ground state corresponds to the low-energy wave function of the considered molecule and the orthogonality condition \(\llbracket {{\varvec{\phi }}},{{\varvec{\phi }}}\rrbracket _H = I_p\) means that there is no interaction between the electrons in different orbitals.

At this point, it should be emphasized that, since the energy functional \({\mathcal {E}}\) in (3) is invariant under orthogonal transformations, i.e. \({\mathcal {E}}({\varvec{\phi }})={\mathcal {E}}({\varvec{\phi }}Q)\) for all orthogonal matrices \(Q\in {\mathbb {R}}^{p\times p}\), the optimal solution to the minimization problem (5) is not unique. To overcome this difficulty, we will transfer this problem to the infinite-dimensional Grassmann manifold defined in Sect. 3.2.

2.2 Connection to Nonlinear Eigenvector Problems

We observe that the directional derivative of \({\mathcal {E}}\) from (3) at \({\varvec{\phi }}\in V\) along \(\varvec{w}\in V\) has the form

$$\begin{aligned} \textrm{D}{\mathcal {E}}({\varvec{\phi }})[\varvec{w}] = a_{\varvec{\phi }}({\varvec{\phi }},\varvec{w}), \end{aligned}$$

where

$$\begin{aligned} a_{\varvec{\phi }}(\varvec{v},\varvec{w}) = \int \limits _\Omega {{\,\textrm{tr}\,}}\bigl ((\nabla \varvec{v})^T\nabla \varvec{w}\bigr ) \,\text {d}x+ 2 \int \limits _\Omega \vartheta \, \varvec{v}\cdot \varvec{w}\,\text {d}x+ \int \limits _\Omega \gamma (\rho ({\varvec{\phi }}))\, \varvec{v}\cdot \varvec{w}\,\text {d}x \end{aligned}$$
(8)

with \(\gamma (\rho )=\frac{{\textrm{d}}}{{{\textrm{d}}}\rho }\varGamma (\rho )\). One can see that for fixed \({\varvec{\phi }}\in V\), \(a_{\varvec{\phi }}\) is a symmetric bilinear form on \(V\times V\). Further note that \(a_{\varvec{\phi }}\) exhibits a special structure, namely

$$\begin{aligned} a_{\varvec{\phi }}(\varvec{v},\varvec{w}) = \sum _{j=1}^p {{\tilde{a}}}_{\varvec{\phi }}(v_j, w_j) \end{aligned}$$
(9)

with a symmetric bilinear form \({{\tilde{a}}}_{\varvec{\phi }}:{\tilde{V}}\times {\tilde{V}}\rightarrow {\mathbb {R}}\) given by

$$\begin{aligned} {{\tilde{a}}}_{\varvec{\phi }}(v, w) = \int \limits _\Omega (\nabla v)^T\nabla w \,\text {d}x+ 2 \int \limits _\Omega \vartheta \, v w \,\text {d}x+ \int \limits _\Omega \gamma (\rho ({\varvec{\phi }}))\, v w \,\text {d}x. \end{aligned}$$

Within this paper, we assume that \({{\tilde{a}}}_{\varvec{\phi }}\) is bounded and coercive on \({\tilde{V}}\times {\tilde{V}}\). Obviously, the bilinear form \(a_{\varvec{\phi }}\) inherits these properties such that \(a_{{\varvec{\phi }}}\) is also bounded and coercive on \(V\times V\).

Introducing the Lagrangian \({\mathcal {L}}({\varvec{\phi }},\Lambda )={\mathcal {E}}({\varvec{\phi }})-\frac{1}{2}{{\,\textrm{tr}\,}}\big (\Lambda ^T(\llbracket {{\varvec{\phi }}},{{\varvec{\phi }}}\rrbracket _H - I_p)\big )\) with a Lagrange multiplier \(\Lambda \in {\mathcal {S}}_{\textrm{sym}}(p)\), the first-order necessary optimality conditions for the minimization problem (5) yield the nonlinear eigenvector problem (NLEVP)

$$\begin{aligned} a_{{\varvec{\phi }}_*}({\varvec{\phi }}_*,\varvec{w})-({\varvec{\phi }}_*\, \Lambda _*, \varvec{w})_H&= 0 \qquad \text {for all }\varvec{w}\in V, \end{aligned}$$
(10a)
$$\begin{aligned} \llbracket {{\varvec{\phi }}_*},{{\varvec{\phi }}_*}\rrbracket _H - I_p&= 0_p \end{aligned}$$
(10b)

with unknown \({\varvec{\phi }}_*\in V\), which is referred to as the eigenvector, and \(\Lambda _*\in {\mathcal {S}}_{\textrm{sym}}(p)\), whose eigenvalues are the lowest p eigenenergies of the system. Yet another formulation of the NLEVP () follows from the special structure of the bilinear form \(a_{\varvec{\phi }}\) given in (9): seek \({\varvec{\phi }}_*=(\phi _{*,1}, \dots , \phi _{*,p})\in \text {St}(p,V)\) and p eigenvalues \(\lambda _1,\dots ,\lambda _p\in {\mathbb {R}}\) such that

$$\begin{aligned} {{\tilde{a}}}_{{\varvec{\phi }}_*}(\phi _{*,j}, v) = \lambda _j\, (\phi _{*,j}, v)_{L^2(\Omega )} \qquad \text { for all } v\in {{\tilde{V}}}. \end{aligned}$$
(11)

For fixed \({\varvec{\phi }}\in V\), we introduce the operator \({\mathcal {A}}_{\varvec{\phi }}:V\rightarrow V^*\), called the Hamiltonian, which is defined by

$$\begin{aligned} \langle {\mathcal {A}}_{\varvec{\phi }}\,\varvec{v}, \varvec{w}\rangle = a_{\varvec{\phi }}(\varvec{v},\varvec{w}) \qquad \text {for all } \varvec{v},\varvec{w}\in V. \end{aligned}$$

Then the NLEVP () can be written as

$$\begin{aligned} {\mathcal {A}}_{{\varvec{\phi }}_*} {\varvec{\phi }}_*-{\mathcal {I}}({\varvec{\phi }}_* \Lambda _*)&= {{\textbf {0}}}^{*}, \end{aligned}$$
(12a)
$$\begin{aligned} \llbracket {{\varvec{\phi }}_*},{{\varvec{\phi }}_*}\rrbracket _H - I_p&= 0_p, \end{aligned}$$
(12b)

where \({{\textbf {0}}}^{*}\in V^*\) is the zero functional. Using the left inverse \({\mathcal {J}}\) of \({\mathcal {I}}\), we find that

$$\begin{aligned} \Lambda _* = \llbracket {{\varvec{\phi }}_*},{{\varvec{\phi }}_*}\rrbracket _H \Lambda _* = \llbracket {{\varvec{\phi }}_*},{{\varvec{\phi }}_*\, \Lambda _*}\rrbracket _H = \llbracket {{\varvec{\phi }}_*},{{\mathcal {J}}{\mathcal {A}}_{{\varvec{\phi }}_*} \,{\varvec{\phi }}_*}\rrbracket _H. \end{aligned}$$
(13)

Remark 1

Due to the symmetry of the bilinear form \({{\tilde{a}}}_{\varvec{\phi }}\), we conclude that

$$\begin{aligned} \big ( \phi _i, ({\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\,{\varvec{\phi }})_j \big )_{L^2(\Omega )} = {{\tilde{a}}}_{{\varvec{\phi }}}(\phi _i, \phi _j) = {{\tilde{a}}}_{{\varvec{\phi }}}(\phi _j, \phi _i) = \big ( \phi _j, ({\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\,{\varvec{\phi }})_i \big )_{L^2(\Omega )} \end{aligned}$$

for \(i,j=1,\ldots ,p\). This means that \(\llbracket {{\varvec{\phi }}},{{\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\,{\varvec{\phi }}}\rrbracket _H\) is symmetric for any \({\varvec{\phi }}\in V\).

3 The Infinite-Dimensional Stiefel and Grassmann Manifolds

In this section, we summarize definitions and properties of the infinite-dimensional Stiefel and Grassmann manifolds and their tangent spaces, which lay the foundation of the Riemannian optimization schemes in the upcoming section.

3.1 The Stiefel Manifold

We consider the infinite-dimensional Stiefel manifold \(\text {St}(p,V)\) defined in (4). It is an embedded submanifold of the Hilbert space V and has co-dimension \(p\,(p+1)/2\); see [8]. The tangent space of \(\text {St}(p,V)\) at \({\varvec{\phi }}\in \text {St}(p,V)\) is given by

$$\begin{aligned} T_{\varvec{\phi }}\,\text {St}(p,V)= \big \{ {\varvec{\eta }}\in V:\llbracket {{\varvec{\eta }}},{{\varvec{\phi }}}\rrbracket _H + \llbracket {{\varvec{\phi }}},{{\varvec{\eta }}}\rrbracket _H = 0_p \big \}. \end{aligned}$$
(14)

The Riemannian structure of the Stiefel manifold \(\text {St}(p,V)\) strongly depends on an underlying metric. Within this paper, we equip \(\text {St}(p,V)\) with the metric given by

$$\begin{aligned} g({\varvec{\eta }},{\varvec{\zeta }}) =({\varvec{\eta }},{\varvec{\zeta }})_H ={{\,\textrm{tr}\,}}\, \llbracket {{\varvec{\eta }}},{{\varvec{\zeta }}}\rrbracket _H, \qquad {\varvec{\eta }},{\varvec{\zeta }}\in T_{\varvec{\phi }}\,\text {St}(p,V). \end{aligned}$$
(15)

The normal space with respect to g is then defined as

$$\begin{aligned} T_{\varvec{\phi }}^{\perp } \,\text {St}(p,V)= \bigl \{ \varvec{x}\in V:g(\varvec{x},{\varvec{\eta }})=0 \text { for all } {\varvec{\eta }}\in T_{\varvec{\phi }}\,\text {St}(p,V)\bigr \}. \end{aligned}$$

It can also be represented as

$$\begin{aligned} T_{\varvec{\phi }}^{\perp } \,\text {St}(p,V)= \bigl \{ {\varvec{\phi }}S \in V:S\in {\mathcal {S}}_{\textrm{sym}}(p)\bigr \}. \end{aligned}$$
(16)

Further, any \(\varvec{y}\in V\) can be decomposed as \(\varvec{y}= {\mathcal {P}}_{{\varvec{\phi }}}^{}(\varvec{y}) + {\mathcal {P}}_{{\varvec{\phi }}}^\perp (\varvec{y})\), where

$$\begin{aligned} {\mathcal {P}}_{{\varvec{\phi }}}(\varvec{y}) = \varvec{y}- {\varvec{\phi }}{{\,\textrm{sym}\,}}\llbracket {{\varvec{\phi }}},{\varvec{y}}\rrbracket _H \qquad \text {and}\qquad {\mathcal {P}}_{{\varvec{\phi }}}^{\perp }(\varvec{y}) ={\varvec{\phi }}{{\,\textrm{sym}\,}}\llbracket {{\varvec{\phi }}},{\varvec{y}}\rrbracket _H \end{aligned}$$
(17)

are the orthogonal projections onto the tangent and normal spaces, respectively.

The Riemannian gradient of a smooth function \(\,{\mathcal {E}}:\text {St}(p,V)\rightarrow {\mathbb {R}}\) with respect to the metric g is the unique element \({{\,\textrm{grad}\,}}{\mathcal {E}}({\varvec{\phi }})\in T_{\varvec{\phi }}\,\text {St}(p,V)\) satisfying the condition

$$\begin{aligned} g({{\,\textrm{grad}\,}}{\mathcal {E}}({\varvec{\phi }}), {\varvec{\eta }}) = {{\,\textrm{D}\,}}{\overline{{\mathcal {E}}}}({\varvec{\phi }})[{\varvec{\eta }}] \qquad \text { for all }{\varvec{\eta }}\in T_{\varvec{\phi }}\,\text {St}(p,V), \end{aligned}$$

where \({\overline{{\mathcal {E}}}}\) denotes a smooth extension of \({\mathcal {E}}\) around \({\varvec{\phi }}\) in V and \({{\,\textrm{D}\,}}{\overline{{\mathcal {E}}}}({\varvec{\phi }})\) is the Fréchet derivative of \(\,{\overline{{\mathcal {E}}}}\) in V.

For the energy functional \({\mathcal {E}}\) in (3), the Riemannian gradient at \({\varvec{\phi }}\in \text {St}(p,V)\) with respect to the metric g can be determined by using the \(L^2\)-Sobolev gradient \(\nabla \,{\overline{{\mathcal {E}}}}({\varvec{\phi }})\in V\) which is defined as the Riesz representation of \({{\,\textrm{D}\,}}{\overline{{\mathcal {E}}}}({\varvec{\phi }})\) in the Hilbert space V with respect to the inner product \((\,\cdot ,\,\cdot \,)_H\). Then, for all \(\varvec{w}\in V\), we have

$$\begin{aligned} \langle {\mathcal {A}}_{\varvec{\phi }}\,{\varvec{\phi }}, \varvec{w}\rangle = a_{\varvec{\phi }}({\varvec{\phi }},\varvec{w}) = {{\,\textrm{D}\,}}{\overline{{\mathcal {E}}}}({\varvec{\phi }})[\varvec{w}] = \big (\nabla \,{\overline{{\mathcal {E}}}}({\varvec{\phi }}),\varvec{w}\big )_H = \big \langle {\mathcal {I}}\,\nabla \,{\overline{{\mathcal {E}}}}({\varvec{\phi }}), \varvec{w}\big \rangle \end{aligned}$$

and, hence, \(\nabla \,{\overline{{\mathcal {E}}}}({\varvec{\phi }}) ={\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\,{\varvec{\phi }}\). Furthermore, for all \({\varvec{\eta }}\in T_{{\varvec{\phi }}}\,\text {St}(p,V)\), we obtain

$$\begin{aligned} \big ({{\,\textrm{grad}\,}}{\mathcal {E}}({\varvec{\phi }}), {\varvec{\eta }}\big )_H = {{\,\textrm{D}\,}}{\overline{{\mathcal {E}}}}({\varvec{\phi }})[{\varvec{\eta }}] = \big (\nabla \,{\overline{{\mathcal {E}}}}({\varvec{\phi }}),{\varvec{\eta }}\big )_H. \end{aligned}$$

This implies that

$$\begin{aligned} {{\,\text {grad}\,}}{\mathcal {E}}({\varvec{\phi }}) = {\mathcal {P}}_{{\varvec{\phi }}}\big (\nabla \, {\overline{{\mathcal {E}}}}({\varvec{\phi }})\big ) = {\mathcal {P}}_{{\varvec{\phi }}}\big ({\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\,{\varvec{\phi }}\big ) = {\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\,{\varvec{\phi }}-{\varvec{\phi }}\, \llbracket {{\varvec{\phi }}},{{\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\,{\varvec{\phi }}}\rrbracket _H. \end{aligned}$$
(18)

The Riemannian Hessian of \(\,{\mathcal {E}}\) at \({\varvec{\phi }}\in \text {St}(p,V)\) with respect to the metric g, denoted by \({{\,\textrm{Hess}\,}}{\mathcal {E}}({\varvec{\phi }})\), is a linear mapping on the tangent space \(T_{\varvec{\phi }}\,\text {St}(p,V)\) into itself which is defined by

$$\begin{aligned} {{\,\textrm{Hess}\,}}{\mathcal {E}}({\varvec{\phi }})[{\varvec{\eta }}] = \nabla _{{\varvec{\eta }}} {{\,\textrm{grad}\,}}{\overline{{\mathcal {E}}}}({\varvec{\phi }}) \qquad \text {for all }{\varvec{\eta }}\in T_{\varvec{\phi }}\,\text {St}(p,V), \end{aligned}$$

where \(\nabla _{{\varvec{\eta }}}\) denotes the covariant derivative along \({\varvec{\eta }}\) with respect to the connection \(\nabla \), cf. [1, Sect. 5.3] for the finite-dimensional case.

The following theorem provides two expressions for the Riemannian Hessian of \({\mathcal {E}}\) in terms of the directional derivative of \({{\,\textrm{grad}\,}}{\mathcal {E}}({\varvec{\phi }})\) and the \(L^2\)-Sobolev Hessian \(\nabla ^2\,{\overline{{\mathcal {E}}}}({\varvec{\phi }})\) of \(\,{\overline{{\mathcal {E}}}}\), which is a linear operator mapping \(\varvec{v}\in V\) onto the Riesz representation of \({{\,\textrm{D}\,}}^2{\overline{{\mathcal {E}}}}({\varvec{\phi }})[\varvec{v},\,\cdot \,]\) with respect to the inner product \((\,\cdot ,\cdot \,)_H\).

Theorem 1

Let \({\varvec{\phi }}\in \text {St}(p,V)\) and \({\varvec{\eta }}\in T_{{\varvec{\phi }}}\,\text {St}(p,V)\). Then the Riemannian Hessian of a smooth function \({\mathcal {E}}:\text {St}(p,V)\rightarrow {\mathbb {R}}\) admits the expressions

$$\begin{aligned} {{\,\textrm{Hess}\,}}{\mathcal {E}}({\varvec{\phi }})[{\varvec{\eta }}]&= {\mathcal {P}}_{{\varvec{\phi }}} \bigl ({{\,\textrm{D}\,}}{{\,\textrm{grad}\,}}{\mathcal {E}}({\varvec{\phi }})[{\varvec{\eta }}]\bigr ) \end{aligned}$$
(19)
$$\begin{aligned}&= {\mathcal {P}}_{{\varvec{\phi }}}\big ( \nabla ^2\,{\overline{{\mathcal {E}}}}({\varvec{\phi }})[{\varvec{\eta }}]-{\varvec{\eta }}{{\,\textrm{sym}\,}}\llbracket {{\varvec{\phi }}},{\nabla \,{\overline{{\mathcal {E}}}}({\varvec{\phi }})}\rrbracket _H\big ), \end{aligned}$$
(20)

where \(\nabla \,{\overline{{\mathcal {E}}}}({\varvec{\phi }})\) and \(\nabla ^2\,{\overline{{\mathcal {E}}}}({\varvec{\phi }})\) denote, respectively, the \(L^2\)-Sobolev gradient and the \(L^2\)-Sobolev Hessian of a smooth extension \(\,{\overline{{\mathcal {E}}}}\) of \(\,{\mathcal {E}}\) around \({\varvec{\phi }}\) in V.

Proof

Since \(\text {St}(p,V)\) is an embedded submanifold of the Hilbert space V, the expression (19) can be shown similarly to the finite-dimensional case [1, Prop. 5.3.2].

In order to prove (20), we first compute the directional derivative

$$\begin{aligned} {{\,\textrm{D}\,}}{{\,\textrm{grad}\,}}{\mathcal {E}}({\varvec{\phi }})[{\varvec{\eta }}]&= {{\,\textrm{D}\,}}\big ({\mathcal {P}}_{{\varvec{\phi }}}(\nabla \,{\overline{{\mathcal {E}}}}({\varvec{\phi }})\big )[{\varvec{\eta }}] \nonumber \\&= {\mathcal {P}}_{{\varvec{\phi }}}(\nabla ^2\,{\overline{{\mathcal {E}}}}({\varvec{\phi }})[{\varvec{\eta }}]) + {{\,\textrm{D}\,}}{\mathcal {P}}_{{\varvec{\phi }}}[{\varvec{\eta }}]\nabla \,{\overline{{\mathcal {E}}}}({\varvec{\phi }}). \end{aligned}$$
(21)

Let \(\varvec{c}(t)\subset \text {St}(p,V)\) be a smooth curve defined on a neighborhood of \(t=0\) such that \(\varvec{c}(0)={\varvec{\phi }}\) and \(\tfrac{\textrm{d}}{\textrm{d}t}\varvec{c}(0)={\varvec{\eta }}\). Then for all \(\varvec{y}\in V\), we have

$$\begin{aligned} {{\,\textrm{D}\,}}{\mathcal {P}}_{{\varvec{\phi }}}[{\varvec{\eta }}]\, \varvec{y}&= \lim _{t\rightarrow 0}\frac{1}{t} \big ({\mathcal {P}}_{\varvec{c}(t)}(\varvec{y})-{\mathcal {P}}_{{\varvec{\phi }}}(\varvec{y})\big ) \\&= \lim _{t\rightarrow 0}\frac{1}{t} \big (\varvec{y}-\varvec{c}(t){{\,\textrm{sym}\,}}\llbracket {\varvec{c}(t)},{\varvec{y}}\rrbracket _H-\varvec{y}+\varvec{c}(0){{\,\textrm{sym}\,}}\llbracket {\varvec{c}(0)},{\varvec{y}}\rrbracket _H\big )\\&= -\lim _{t\rightarrow 0}\frac{1}{t} \big (\varvec{c}(t){{\,\textrm{sym}\,}}\llbracket {\varvec{c}(t)-\varvec{c}(0)},{\varvec{y}}\rrbracket _H+(\varvec{c}(t)-\varvec{c}(0)){{\,\textrm{sym}\,}}\llbracket {\varvec{c}(0)},{\varvec{y}}\rrbracket _H\big )\\&= -{\varvec{\phi }}{{\,\textrm{sym}\,}}\llbracket {{\varvec{\eta }}},{\varvec{y}}\rrbracket _H-{\varvec{\eta }}{{\,\textrm{sym}\,}}\llbracket {{\varvec{\phi }}},{\varvec{y}}\rrbracket _H. \end{aligned}$$

Inserting (21) into (19) and taking into account that

$$\begin{aligned} {\mathcal {P}}_{{\varvec{\phi }}}\big ({{\,\textrm{D}\,}}{\mathcal {P}}_{{\varvec{\phi }}}[{\varvec{\eta }}] \nabla \,{\overline{{\mathcal {E}}}}({\varvec{\phi }})\big )&= -{\mathcal {P}}_{{\varvec{\phi }}}\big ({\varvec{\phi }}{{\,\textrm{sym}\,}}\llbracket {{\varvec{\eta }}},{\nabla \,{\overline{{\mathcal {E}}}}({\varvec{\phi }})}\rrbracket _H+{\varvec{\eta }}{{\,\textrm{sym}\,}}\llbracket {{\varvec{\phi }}},{\nabla \,{\overline{{\mathcal {E}}}}({\varvec{\phi }})}\rrbracket _H\big ) \\&= -{\mathcal {P}}_{{\varvec{\phi }}}\big ({\varvec{\eta }}{{\,\textrm{sym}\,}}\llbracket {{\varvec{\phi }}},{\nabla \,{\overline{{\mathcal {E}}}}({\varvec{\phi }})}\rrbracket _H\big ), \end{aligned}$$

we obtain (20). \(\square \)

In order to derive a formula for the Riemannian Hessian of the energy functional \({\mathcal {E}}\) in (3), we first compute the second-order derivative

$$\begin{aligned} {{\,\textrm{D}\,}}^2{\overline{{\mathcal {E}}}} ({\varvec{\phi }})[\varvec{v},\varvec{w}]&= \lim _{t\rightarrow 0}\ \frac{1}{t}\, \big \langle {\mathcal {A}}_{{\varvec{\phi }}+t\varvec{v}} ({\varvec{\phi }}+t\varvec{v}) -{\mathcal {A}}_{\varvec{\phi }}\,{\varvec{\phi }},\varvec{w}\big \rangle \\&= \lim _{t\rightarrow 0}\ \frac{1}{t}\,\bigg ( \int \limits _\Omega \Big ({{\,\textrm{tr}\,}}\bigl ((\nabla ({\varvec{\phi }}+t\varvec{v}))^T\nabla \varvec{w}\bigr )-{{\,\textrm{tr}\,}}\bigl ((\nabla {\varvec{\phi }})^T\nabla \varvec{w}\bigr )\Big ) \,\text {d}x\\&\qquad \qquad \; +2\int \limits _\Omega \vartheta \, \big (({\varvec{\phi }}+t\varvec{v})\cdot \varvec{w}-{\varvec{\phi }}\cdot \varvec{w}\big ) \,\text {d}x\\&\qquad \qquad \; + \int \limits _\Omega \!\big (\gamma (\rho ({\varvec{\phi }}+t\varvec{v}))({\varvec{\phi }}+t\varvec{v})\cdot \varvec{w}-\gamma (\rho ({\varvec{\phi }}))\, {\varvec{\phi }}\cdot \varvec{w}\big ) \,\text {d}x\!\bigg )\\&= \int \limits _\Omega {{\,\textrm{tr}\,}}\bigl ((\nabla \varvec{v})^T\nabla \varvec{w}\bigr ) \,\text {d}x+ 2\int \limits _\Omega \vartheta \, \varvec{v}\cdot \varvec{w}\,\text {d}x\\&\quad + \int \limits _\Omega \gamma (\rho ({\varvec{\phi }}))\, \varvec{v}\cdot \varvec{w}\,\text {d}x+ 2\int \limits _{\Omega } \beta (\rho ({\varvec{\phi }})) ({\varvec{\phi }}\cdot \varvec{v})\, ({\varvec{\phi }}\cdot \varvec{w}) \,\text {d}x\\&= \langle {\mathcal {A}}_{\varvec{\phi }}\, \varvec{v}+ {\mathcal {B}}_{\varvec{\phi }}\,\varvec{v},\varvec{w}\rangle , \end{aligned}$$

where \(\beta (\rho )=\frac{{\textrm{d}}}{{{\textrm{d}}}\rho }\gamma (\rho )\) and the operator \({\mathcal {B}}_{\varvec{\phi }}:V\rightarrow V^*\) has the form

$$\begin{aligned} \langle {\mathcal {B}}_{\varvec{\phi }}\,\varvec{v},\varvec{w}\rangle = 2\int _{\Omega } \beta (\rho ({\varvec{\phi }})) ({\varvec{\phi }}\cdot \varvec{v})\, ({\varvec{\phi }}\cdot \varvec{w}) \,\text {d}x. \end{aligned}$$
(22)

Hence, the \(L^2\)-Sobolev Hessian of \(\,{\overline{{\mathcal {E}}}}\) is given by \(\nabla ^2\,{\overline{{\mathcal {E}}}}({\varvec{\phi }})[\varvec{v}]={\mathcal {J}}\, {\mathcal {A}}_{\varvec{\phi }}\, \varvec{v}+ {\mathcal {J}}\,{\mathcal {B}}_{\varvec{\phi }}\,\varvec{v}\) for all \(\varvec{v}\in V\). By the definition of the orthogonal projection onto \(T_{\varvec{\phi }}\,\text {St}(p,V)\) in (17), we conclude that for \({\varvec{\eta }}\in T_{\varvec{\phi }}\,\text {St}(p,V)\), the Riemannian Hessian of \({\mathcal {E}}\) is given by

$$\begin{aligned} {{\,\text {Hess}\,}}{\mathcal {E}}({\varvec{\phi }}) [{\varvec{\eta }}]&= {\mathcal {P}}_{{\varvec{\phi }}} \big ( {\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\, {\varvec{\eta }}+ {\mathcal {J}}\,{\mathcal {B}}_{\varvec{\phi }}\,{\varvec{\eta }}-{\varvec{\eta }}\, \llbracket {{\varvec{\phi }}},{ {\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\,{\varvec{\phi }}}\rrbracket _H\big ) \nonumber \\&= {\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\, {\varvec{\eta }}+ {\mathcal {J}}\,{\mathcal {B}}_{\varvec{\phi }}\,{\varvec{\eta }}-{\varvec{\eta }}\, \llbracket {{\varvec{\phi }}},{{\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\,{\varvec{\phi }}}\rrbracket _H\nonumber \\&\quad -{\varvec{\phi }}{{\,\text {sym}\,}}\llbracket {{\varvec{\phi }}},{{\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\, {\varvec{\eta }}}\rrbracket _H -{\varvec{\phi }}{{\,\text {sym}\,}}\llbracket {{\varvec{\phi }}},{{\mathcal {J}}\,{\mathcal {B}}_{\varvec{\phi }}\, {\varvec{\eta }}}\rrbracket _H \nonumber \\&\quad +{\varvec{\phi }}{{\,\text {sym}\,}}\big (\llbracket {{\varvec{\phi }}},{{\varvec{\eta }}}\rrbracket _H\llbracket {{\varvec{\phi }}},{{\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\, {\varvec{\phi }})}\rrbracket _H\big ). \end{aligned}$$
(23)

Within optimization methods, we need to transfer data from the tangent space to the manifold to keep the iterations on the search space. For this purpose, we can use retractions defined as follows. Let \(T\text {St}(p,V)\) be the tangent bundle to \(\text {St}(p,V)\). A smooth mapping \({\mathcal {R}}:T\text {St}(p,V)\rightarrow \text {St}(p,V)\) is called a retraction if for all \({\varvec{\phi }}\in \text {St}(p,V)\), the restriction of \({\mathcal {R}}\) to \(T_{\varvec{\phi }}\,\text {St}(p,V)\), denoted by \({\mathcal {R}}_{\varvec{\phi }}\), satisfies the following properties:

  1. 1)

    \({\mathcal {R}}_{\varvec{\phi }}(\varvec{0}_{\varvec{\phi }})={\varvec{\phi }}\), where \(\varvec{0}_{\varvec{\phi }}\) denotes the origin of \(T_{\varvec{\phi }}\,\text {St}(p,V)\), and

  2. 2)

    \(\tfrac{\textrm{d}}{\textrm{d}t} {\mathcal {R}}_{\varvec{\phi }}(t{\varvec{\eta }})\big |_{t=0}={\varvec{\eta }}\) for all \({\varvec{\eta }}\in T_{\varvec{\phi }}\,\text {St}(p,V)\).

Retractions provide first-order approximations to the exponential mapping on a Riemannian manifold and are often much easier to compute. A retraction \({\mathcal {R}}\) on \(\text {St}(p,V)\) is of second-order, if it satisfies \(\tfrac{\textrm{d}^2}{\textrm{d}t^2} {\mathcal {R}}_{\varvec{\phi }}(t{\varvec{\eta }})\big |_{t=0}\in T_{\varvec{\phi }}^{\perp }\,\text {St}(p,V)\) for all \(({\varvec{\phi }},{\varvec{\eta }})\in T\text {St}(p,V)\).

In [8], several retractions on the Stiefel manifold \(\text {St}(p,V)\) have been introduced. They can be considered as an extension of the corresponding concepts on the matrix Stiefel manifold (see, e.g., [2, 46]) to the infinite-dimensional case.

For \(\varvec{v}\in V\) with linearly independent components, we consider the qR decomposition \(\varvec{v}=\varvec{q}R\), where \(\varvec{q}\in \text {St}(p,V)\) and \(R\in {\mathbb {R}}^{p\times p}\) is upper triangular. Such a decomposition exists and is unique if we additionally require that R has positive diagonal elements. Then the qR decomposition based retraction is defined as \({\mathcal {R}}^{qR}({\varvec{\phi }},{\varvec{\eta }})={{\,\textrm{qf}\,}}({\varvec{\phi }}+{\varvec{\eta }})\), where \({{\,\textrm{qf}\,}}({\varvec{\phi }}+{\varvec{\eta }})\) denotes the factor from \(\text {St}(p,V)\) in the qR decomposition of \({\varvec{\phi }}+{\varvec{\eta }}\). Such a factor can be computed, e.g., by the modified Gram-Schmidt orthonormalization procedure on V presented in [8].

An alternative retraction can be defined by using the polar decomposition \(\varvec{v}=\varvec{u}S\), where \(\varvec{u}\in \text {St}(p,V)\) and \(S\in {\mathbb {R}}^{p\times p}\) is symmetric and positive definite. Assuming that the components of \(\varvec{v}\) are linearly independent, \(S=\llbracket {\varvec{v}},{\varvec{v}}\rrbracket _H^{1/2}\) and \(\varvec{u}=\varvec{v}\,\llbracket {\varvec{v}},{\varvec{v}}\rrbracket _H^{-1/2}\) are uniquely defined. This leads to the polar decomposition based retraction

$$\begin{aligned} {\mathcal {R}}^\textrm{pol}({\varvec{\phi }},{\varvec{\eta }}) = ({\varvec{\phi }}+{\varvec{\eta }})\llbracket {{\varvec{\phi }}+{\varvec{\eta }}},{{\varvec{\phi }}+{\varvec{\eta }}}\rrbracket _H^{-1/2}, \end{aligned}$$

which is of second-order. Indeed, computing the second-order derivative of \({\mathcal {R}}^\textrm{pol}_{\varvec{\phi }}(t{\varvec{\eta }})\) at \(t=0\) and exploiting (16), we obtain that

$$\begin{aligned} \frac{\textrm{d}^2}{\textrm{d}t^2} {\mathcal {R}}^\textrm{pol}_{\varvec{\phi }}(t{\varvec{\eta }})\Big |_{t=0} = -{\varvec{\phi }}\,\llbracket {{\varvec{\eta }}},{{\varvec{\eta }}}\rrbracket _H\in T_{{\varvec{\phi }}}^{\perp }\,\text {St}(p,V). \end{aligned}$$

Note that second-order retractions are advantageous for second-order Riemannian optimization methods; see, e.g. [1, Sect. 6.3].

3.2 The Grassmann Manifold

Let \(\text {O}(p)\) be the orthogonal group of \({\mathbb {R}}^{p\times p}\). Following [47], we define the infinite-dimensional Grassmann manifold as the quotient

$$\begin{aligned} \text {Gr}(p,V)= \text {St}(p,V)/\text {O}(p)\end{aligned}$$

of the Stiefel manifold \(\text {St}(p,V)\) with respect to the equivalence relation

$$\begin{aligned} {\varvec{\phi }}\sim {\hat{{\varvec{\phi }}}} \qquad \Longleftrightarrow \qquad {\hat{{\varvec{\phi }}}} = {\varvec{\phi }}\, Q \; \text{ for } \text{ some } Q\in \text{ O }(p). \end{aligned}$$

The Grassmann manifold \(\text {Gr}(p,V)\) can be interpreted as the set of the equivalence classes given by

for \({\varvec{\phi }}\in \text {St}(p,V)\). Similarly to the Grassmann matrix manifold [1, Prop. 3.4.6], one can show that \(\text {Gr}(p,V)\) admits a unique structure of quotient manifold. A canonical projection from the Stiefel manifold into the Grassmann manifold is defined by

and is a smooth submersion. This means that \({{\,\textrm{D}\,}}\! \pi ({\varvec{\phi }})\) is surjective, and, hence, the equivalence class is an embedded submanifold of \(\text {St}(p,V)\); see [1, Prop. 3.4.4.].

In the following, we examine a useful connection of the Stiefel manifold and the Grassmann manifold. More precisely, we show that there is a one-to-one relation between the tangent space of the Grassmann manifold and the so-called horizontal space, a subspace of the tangent space of the Stiefel manifold. The tangent space \(T_{\varvec{\phi }}\, \text {St}(p,V)\) at \({\varvec{\phi }}\in \text {St}(p,V)\) defined in (14) can be splitted with respect to the projection \(\pi \) and the metric g as \(T_{\varvec{\phi }}\, \text {St}(p,V)= {\mathcal {V}}_{{\varvec{\phi }}} \oplus {\mathcal {H}}_{\varvec{\phi }}\), where

(24)

is the vertical space at \({\varvec{\phi }}\) and

$$\begin{aligned} {\mathcal {H}}_{{\varvec{\phi }}} = {\mathcal {V}}_{\varvec{\phi }}^\perp&= \big \{ \varvec{x}\in T_{\varvec{\phi }}\, \text {St}(p,V):g(\varvec{x},\varvec{v})=0 \text { for all } \varvec{v}\in {\mathcal {V}}_{\varvec{\phi }}\big \} \\&=\big \{ \varvec{x}\in T_{\varvec{\phi }}\, \text {St}(p,V):\llbracket {{\varvec{\phi }}},{\varvec{x}}\rrbracket _H=0_p\big \} \end{aligned}$$

is the horizontal space at \({\varvec{\phi }}\); see [47, Lem. 2]. The orthogonal projection of a tangent vector \({\varvec{\eta }}\in T_{\varvec{\phi }}\text {St}(p,V)\) onto \({\mathcal {H}}_{{\varvec{\phi }}}\) is given by

$$\begin{aligned} {\mathcal {P}}_{{\varvec{\phi }}}^\textrm{h}({\varvec{\eta }}) = {\varvec{\eta }}-{\varvec{\phi }}\, \llbracket {{\varvec{\phi }}},{{\varvec{\eta }}}\rrbracket _H. \end{aligned}$$
(25)

One can see that, moving on a curve in the Stiefel manifold \(\text {St}(p,V)\) with direction in the vertical space \({\mathcal {V}}_{{\varvec{\phi }}}\), we stay in the equivalence class . The tangent space of the Grassmann manifold \(\text {Gr}(p,V)\) can then be identified with the horizontal space \({\mathcal {H}}_{{\varvec{\phi }}}\) in the sense that for any , there exists a unique \({\varvec{\psi }}_{{\varvec{\phi }}}^\textrm{h}\in {\mathcal {H}}_{{\varvec{\phi }}}\) such that \({{\,\textrm{D}\,}}\!\pi ({\varvec{\phi }})[{\varvec{\psi }}_{{\varvec{\phi }}}^\textrm{h}]={\varvec{\psi }}\). The unique element \({\varvec{\psi }}_{{\varvec{\phi }}}^\textrm{h}\) is called the horizontal lift of \({\varvec{\psi }}\) at \({\varvec{\phi }}\). This relation allows us to introduce a metric on the Grassmann manifold \(\text {Gr}(p,V)\), namely

where \({\varvec{\psi }}_{{\varvec{\phi }}}^\textrm{h}, {\varvec{\zeta }}_{{\varvec{\phi }}}^\textrm{h}\in {\mathcal {H}}_{{\varvec{\phi }}}\) are the horizontal lifts of \({\varvec{\psi }}\) and \({\varvec{\zeta }}\) at \({\varvec{\phi }}\), respectively. Due to \({\varvec{\psi }}_{{\varvec{\phi }}Q}^\textrm{h}={\varvec{\psi }}_{{\varvec{\phi }}}^\textrm{h}Q\) for all \(Q\in \text {O}(p)\), one can show that this metric does not depend on the choice of the representative  \({\varvec{\phi }}\) of the equivalence class  .

The connection of and \({\mathcal {H}}_{{\varvec{\phi }}}\) makes it possible to introduce optimization methods on the Grassmann manifold, while still working on the tangent space of the corresponding Stiefel manifold. Using the canonical projection \(\pi \), the minimization problem (5) on the Stiefel manifold \(\text {St}(p,V)\) can be written as the minimization problem

(26)

on the Grassmann manifold \(\text {Gr}(p,V)\), where the cost functional \({\mathcal {F}}\!:\! \text {Gr}(p,V)\!\rightarrow \!{\mathbb {R}}\) is induced by \({\mathcal {E}}\) as \({\mathcal {E}}({\varvec{\phi }})={{\mathcal {F}}}(\pi ({\varvec{\phi }}))\) and . Note that this definition is justified by the fact that \({\mathcal {E}}({\varvec{\phi }})={\mathcal {E}}({\varvec{\phi }}Q)\) for all  \(Q\in \text {O}(p)\). The horizontal lift of the Riemannian gradient with respect to the metric \(g^\textrm{Gr}\) is given by

(27)

To obtain the horizontal lift of the Riemannian Hessian , we proceed as before but replace the projection  \({\mathcal {P}}_{{\varvec{\phi }}}\) by the orthogonal projection  \({\mathcal {P}}_{{\varvec{\phi }}}^\textrm{h}\) onto the horizontal space; see Eq. (25). This leads to

(28)

Retractions on the Grassmann manifold are inherited from that on the Stiefel manifold applied to the horizontal lift; see [1, Prop. 4.1.3]. For all and , we have

Note that these retractions are independent of the chosen point \({\varvec{\phi }}\), providing the same equivalence class on \(\text {Gr}(p,V)\).

Similar to the matrix case [1, 25], we can also derive an explicit expression for the Grassmann exponential \(\textrm{Exp}:T\text {Gr}(p,V)\rightarrow \text {Gr}(p,V)\), which maps to the end point of the unique geodesic starting at and going in the direction  \({\varvec{\psi }}\). Let \({\varvec{\psi }}_{{\varvec{\phi }}}^\textrm{h}=\varvec{u}\Sigma W^T\) be a singular value decomposition of the horizontal lift \({\varvec{\psi }}_{{\varvec{\phi }}}^\textrm{h}\) of  \({\varvec{\psi }}\), where \(\varvec{u}\in \text {St}(p,V)\), \(W\in \text {O}(p)\), and \(\Sigma \in {\mathbb {R}}^{p\times p}\) is diagonal with nonnegative diagonal elements. Then the Grassmann exponential is given by

Using \({\varvec{\psi }}_{{\varvec{\phi }}}^\textrm{h}\in {\mathcal {H}}_{\varvec{\phi }}\), one can verify that \({\varvec{\phi }}\,W\cos \Sigma +\varvec{u}\sin \Sigma \in \text {St}(p,V)\). Therefore, it can be considered as a representative of the resulting equivalence class.

Remark 2

For \(p=1\), the Stiefel manifold coincides with the Grassmann manifold and equals the unit sphere

$$\begin{aligned} {\mathbb {S}}= \big \{ \phi \in {\tilde{V}}:\Vert \phi \Vert _{L^2(\Omega )} = 1 \big \}. \end{aligned}$$

Its tangent space is given by \(T_{\phi }\,{\mathbb {S}} = \{ \eta \in {\tilde{V}}: (\eta , \phi )_{L^2(\Omega )} = 0 \}\) and the orthogonal projection onto this space takes the form \({\mathcal {P}}_{\phi }(y)=y-(\phi ,y)_{L^2(\Omega )}\phi \) for \(y\in {\tilde{V}}\). Furthermore, for \((\phi ,\eta )\in T{\mathbb {S}}\), the second-order retraction and the exponential mapping on \({\mathbb {S}}\) are given by

$$\begin{aligned} {\mathcal {R}}(\phi ,\eta )&=\frac{\phi +\eta \qquad }{\Vert \phi +\eta \Vert _{L^2(\Omega )}}, \\ \textrm{Exp}(\phi ,\eta )&=\cos \Big (\Vert \eta \Vert _{L^2(\Omega )}\Big )\phi +\sin \Big (\Vert \eta \Vert _{L^2(\Omega )}\Big )\frac{\eta \qquad }{\Vert \eta \Vert _{L^2(\Omega )}}, \end{aligned}$$

respectively.

4 Riemannian Newton Methods

In this section, we present Riemannian Newton methods on the Stiefel manifold as well as on the Grassmann manifold and discuss the inexact version of the latter.

Within the Riemannian Newton method on the Stiefel manifold \(\text {St}(p,V)\), for given iterate \({\varvec{\phi }}_k\in \text {St}(p,V)\), we first compute the Newton search direction \({\varvec{\eta }}_k\in T_{{\varvec{\phi }}_k} \text {St}(p,V)\) by solving the Newton equation

$$\begin{aligned} {{\,\textrm{Hess}\,}}{\mathcal {E}}({\varvec{\phi }}_k) [{\varvec{\eta }}_k] = -{{\,\textrm{grad}\,}}{\mathcal {E}}({\varvec{\phi }}_k). \end{aligned}$$
(29)

The iterate is then updated by  \({\varvec{\phi }}_{k+1}={\mathcal {R}}({\varvec{\phi }}_k,{\varvec{\eta }}_k)\) for any retraction on \(\text {St}(p,V)\). It should, however, be noted that due to the non-uniqueness of the minimizer of (5) caused by the invariance of \({\mathcal {E}}\) under orthogonal transformations, we cannot expect that \({{\,\textrm{Hess}\,}}{\mathcal {E}}({\varvec{\phi }}_k)\) is invertible on \(T_{{\varvec{\phi }}_k} \text {St}(p,V)\). This is, indeed, vindicated by the following theorem.

Theorem 2

Let \({\varvec{\phi }}\in \text {St}(p,V)\) and let \({\mathcal {V}}_{{\varvec{\phi }}}\) be the vertical space given in (24). Then the Riemannian Hessian of the energy functional  \({\mathcal {E}}\) from (3) in  \({\varvec{\phi }}\) is non-invertible on  \({\mathcal {V}}_{{\varvec{\phi }}}\), i.e., \(\big ({\varvec{\xi }},{{\,\textrm{Hess}\,}}{\mathcal {E}}({\varvec{\phi }}) [{\varvec{\eta }}]\big )_H=0\) for all \({\varvec{\eta }},{\varvec{\xi }}\in {\mathcal {V}}_{{\varvec{\phi }}}\).

Proof

Let \({\varvec{\eta }},{\varvec{\xi }}\in {\mathcal {V}}_{{\varvec{\phi }}}\) be arbitrary. Then there exist the matrices \(\varTheta _{{\varvec{\eta }}},\varTheta _{{\varvec{\xi }}}\in {\mathcal {S}}_{\textrm{skew}}(p)\) such that \({\varvec{\eta }}={\varvec{\phi }}\,\varTheta _{{\varvec{\eta }}}\) and \({\varvec{\xi }}={\varvec{\phi }}\,\varTheta _{{\varvec{\xi }}}\). Using the definition of \({{\,\textrm{Hess}\,}}{\mathcal {E}}({\varvec{\phi }})\) in (23) and the symmetry of the matrix  \(\llbracket {{\varvec{\phi }}},{{\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\, {\varvec{\phi }}}\rrbracket _H\) shown in Remark 1, we have

$$\begin{aligned} {{\,\text {Hess}\,}}{\mathcal {E}}({\varvec{\phi }}) [{\varvec{\eta }}]&= {\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\, {\varvec{\phi }}\,\varTheta _{{\varvec{\eta }}} \!+\! {\mathcal {J}}\,{\mathcal {B}}_{\varvec{\phi }}\,{\varvec{\phi }}\,\varTheta _{{\varvec{\eta }}} \!-\! {\varvec{\phi }}\,\varTheta _{{\varvec{\eta }}}\, \llbracket {{\varvec{\phi }}},{{\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\,{\varvec{\phi }}}\rrbracket _H \!-\! {\varvec{\phi }}{{\,\text {sym}\,}}\big ( \llbracket {{\varvec{\phi }}},{{\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\, {\varvec{\phi }}}\rrbracket _H \varTheta _{{\varvec{\eta }}}\big )\\&\qquad -{\varvec{\phi }}{{\,\text {sym}\,}}\big (\llbracket {{\varvec{\phi }}},{{\mathcal {J}}\,{\mathcal {B}}_{\varvec{\phi }}\, {\varvec{\phi }}}\rrbracket _H\varTheta _{{\varvec{\eta }}}\big ) + {\varvec{\phi }}{{\,\text {sym}\,}}\big (\varTheta _{{\varvec{\eta }}}\llbracket {{\varvec{\phi }}},{{\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\, {\varvec{\phi }}}\rrbracket _H\big )\\&= {\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\, {\varvec{\phi }}\,\varTheta _{{\varvec{\eta }}} \!-\! {\varvec{\phi }}\, \llbracket {{\varvec{\phi }}},{{\mathcal {J}}{\mathcal {A}}_{\varvec{\phi }}\,{\varvec{\phi }}}\rrbracket _H \,\varTheta _{{\varvec{\eta }}} \!+\! {\mathcal {J}}\,{\mathcal {B}}_{\varvec{\phi }}\,{\varvec{\phi }}\,\varTheta _{{\varvec{\eta }}} \!-\! {\varvec{\phi }}{{\,\text {sym}\,}}\big (\llbracket {{\varvec{\phi }}},{{\mathcal {J}}\,{\mathcal {B}}_{\varvec{\phi }}\, {\varvec{\phi }}}\rrbracket _H\varTheta _{{\varvec{\eta }}}\big ) \end{aligned}$$

and, hence,

$$\begin{aligned} \big ({\varvec{\xi }},{{\,\textrm{Hess}\,}}{\mathcal {E}}({\varvec{\phi }}) [{\varvec{\eta }}]\big )_H&={{\,\textrm{tr}\,}}\left( \varTheta _{{\varvec{\xi }}}^T\llbracket {{\varvec{\phi }}},{{\mathcal {J}}{\mathcal {B}}_{\varvec{\phi }}\,{\varvec{\phi }}}\rrbracket _H \,\varTheta _{{\varvec{\eta }}}^{}-\Theta _{{\varvec{\xi }}}^T{{\,\textrm{sym}\,}}\big (\llbracket {{\varvec{\phi }}},{{\mathcal {J}}{\mathcal {B}}_{\varvec{\phi }}\, {\varvec{\phi }}}\rrbracket _H\varTheta _{{\varvec{\eta }}}^{}\big )\right) . \end{aligned}$$

We now show that \(\llbracket {{\varvec{\phi }}},{{\mathcal {J}}{\mathcal {B}}_{\varvec{\phi }}\,{\varvec{\phi }}}\rrbracket _H \,\varTheta _{{\varvec{\eta }}}= 0\). With the skew-symmetric matrix \(\varTheta _{{\varvec{\eta }}} = [\theta _{ij}]_{i,j=1}^p\), we first observe that

$$\begin{aligned} {\varvec{\phi }}\,\cdot ({\varvec{\phi }}\,\varTheta _{{\varvec{\eta }}}) = \!\sum _{j=1}^p \!\phi _j \!\sum _{i=1}^p \phi _i\theta _{ij} = \!\sum _{i=1}^p \!\phi _i \!\sum _{j=1}^p \phi _j\theta _{ij} = -\sum _{i=1}^p \!\phi _i \!\sum _{j=1}^p \phi _j\theta _{ji} = -{\varvec{\phi }}\,\cdot ({\varvec{\phi }}\,\varTheta _{{\varvec{\eta }}}). \end{aligned}$$

This implies \({\varvec{\phi }}\cdot ({\varvec{\phi }}\,\varTheta _{{\varvec{\eta }}}) = 0\) and, hence, \(\llbracket {{\varvec{\phi }}},{{\mathcal {J}}{\mathcal {B}}_{\varvec{\phi }}\,{\varvec{\phi }}}\rrbracket _H \,\varTheta _{{\varvec{\eta }}}= 0\). As a result, we conclude that \(\big ({\varvec{\xi }},{{\,\textrm{Hess}\,}}{\mathcal {E}}({\varvec{\phi }}) [{\varvec{\eta }}]\big )_H=0\) for all \({\varvec{\eta }},{\varvec{\xi }}\in {\mathcal {V}}_{{\varvec{\phi }}}\). \(\square \)

It follows from Theorem 2 that if Eq. (29) is solvable, its solution is not unique. To overcome this difficulty, we pass on to the Grassmann manifold \(\text {Gr}(p,V)\). Given , the Newton direction is computed by solving the Newton equation

By applying the horizontal lift expressions (27) and (28), this equation leads to

$$\begin{aligned} {\mathcal {P}}_{{\varvec{\phi }}_k}^\textrm{h} \big ({{\,\textrm{D}\,}}{{\,\textrm{grad}\,}}{\mathcal {E}}({\varvec{\phi }}_k)[({\varvec{\psi }}_k)_{{\varvec{\phi }}_k}^\textrm{h}] \big ) = -{{\,\textrm{grad}\,}}{\mathcal {E}}({\varvec{\phi }}_k) \end{aligned}$$
(30)

with unknown \(({\varvec{\psi }}_k)_{{\varvec{\phi }}_k}^\textrm{h}\in {\mathcal {H}}_{{\varvec{\phi }}_k}\) being the horizontal lift of  \({\varvec{\psi }}_k\) at  \({\varvec{\phi }}_k\). Note that this equation is well-defined, since  \(-{{\,\textrm{grad}\,}}{\mathcal {E}}({\varvec{\phi }}_k)\) is an element of the horizontal space \({\mathcal {H}}_{{\varvec{\phi }}_k}\).

For solving the Newton equation (30), we can employ any matrix-free iterative linear solver which does not require the storage of the coefficient matrix explicitly but accesses it by computing the matrix–vector product or—as in our case—by evaluating the linear operator given in (28). The resulting Riemannian Newton method on the Grassmann manifold is presented in Algorithm 1.

Algorithm 1
figure a

Riemannian Newton method on the Grassmann manifold

The Newton equation (30) can also be formulated as a saddle point problem. To this end, we introduce the bilinear form

$$\begin{aligned} {\widehat{a}}_{\varvec{\phi }}({\varvec{\psi }},\varvec{w}) = \langle {\mathcal {A}}_{\varvec{\phi }}\,{\varvec{\psi }},\varvec{w}\rangle + \langle {\mathcal {B}}_{\varvec{\phi }}\, {\varvec{\psi }},\varvec{w}\rangle - ({\varvec{\psi }}\, \llbracket {{\varvec{\phi }}},{{\mathcal {J}}\,{\mathcal {A}}_{\varvec{\phi }}\,{\varvec{\phi }}}\rrbracket _H,\varvec{w})_H. \end{aligned}$$

Then, the equivalent problem to (30) reads: find \(({\varvec{\psi }}_k)_{{\varvec{\phi }}_k}^\textrm{h}\in V\) and a Lagrange multiplier \(M_k\in {\mathbb {R}}^{p\times p}\) such that

$$\begin{aligned} {\widehat{a}}_{{\varvec{\phi }}_k}\big (({\varvec{\psi }}_k)_{{\varvec{\phi }}_k}^\textrm{h},\varvec{w}\big ) + {{\,\textrm{tr}\,}}\big ( M_k^T\llbracket {{\varvec{\phi }}_k},{\varvec{w}}\rrbracket _H\big )&= -a_{{\varvec{\phi }}_k}({\varvec{\phi }}_k,\varvec{w}) \qquad \qquad \text {for all } \varvec{w}\in V, \end{aligned}$$
(31a)
$$\begin{aligned} \llbracket {{\varvec{\phi }}_k},{({\varvec{\psi }}_k)_{{\varvec{\phi }}_k}^\textrm{h}}\rrbracket _H&= 0_p. \end{aligned}$$
(31b)

The constraint (31b) implies that \(({\varvec{\psi }}_k)_{{\varvec{\phi }}_k}^\textrm{h}\in {\mathcal {H}}_{{\varvec{\phi }}_k}\). Further note that any function \(\varvec{w}\in {\mathcal {H}}_{{\varvec{\phi }}_k}\) satisfies  \(\llbracket {{\varvec{\phi }}_k},{\varvec{w}}\rrbracket _H= 0_p\). Hence, for all \(\varvec{w}\in {\mathcal {H}}_{{\varvec{\phi }}_k}\), Eq. (31a) reads

$$\begin{aligned} {\widehat{a}}_{\varvec{\phi }}\big (({\varvec{\psi }}_k)_{{\varvec{\phi }}_k}^\textrm{h},\varvec{w}\big ) =-a_{{\varvec{\phi }}_k}({\varvec{\phi }}_k,\varvec{w})=-({{\,\textrm{grad}\,}}{\mathcal {E}}({\varvec{\phi }}_k),\varvec{w})_H, \end{aligned}$$

which is equivalent to the Newton equation (30).

One important property guaranteeing an isolated local minimum of the energy is that the Hessian is positive at a stationary point. For a global minimizer of (5), denoted by  \({\varvec{\phi }}_*\), we consider the following linear eigenvalue problem: seek \(\phi \in {\tilde{V}}\) and \(\lambda \in {\mathbb {R}}\) such that

$$\begin{aligned} {{\tilde{a}}}_{{\varvec{\phi }}_*}\!(\phi , v) = \lambda \, (\phi , v)_{L^2(\Omega )} \qquad \text { for all } v\in {{\tilde{V}}}. \end{aligned}$$
(32)

Then, due to (11), we know that the components of  \({\varvec{\phi }}_* = (\phi _{*,1}, \dots , \phi _{*,p})\) satisfy Eq. (32) together with the smallest p eigenvalues denoted by \(0 < \lambda _1 \le \dots \le \lambda _p\). In the following, we will assume that these eigenfunctions can be extended to a basis of  \({\tilde{V}}\).

Assumption 3

(Basis and spectral gap) The eigenfunctions  \(\phi _{*,1}, \phi _{*,2}, \ldots \in {\tilde{V}}\) of the eigenvalue problem (32) form an \(L^2\)-orthonormal basis of \({\tilde{V}}\). The corresponding eigenvalues  \(\lambda _1 \le \lambda _2 \le \dots \) are ordered by size with a spectral gap  \(\lambda _p < \lambda _{p+1}\).

Theorem 4

(Positive Hessian) Let  \({\varvec{\phi }}_*\) be a global minimal solution of (5) and let the corresponding eigenvalue problem (32) satisfy Assumption 3. Furthermore, assume that the operator \({\mathcal {B}}_{{\varvec{\phi }}_*}\) fulfills  \(({\mathcal {J}}{\mathcal {B}}_{{\varvec{\phi }}_*} {\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h}, {\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h})_H\!\ge \! 0\) for all \({\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h}\in {\mathcal {H}}_{{\varvec{\phi }}_*}\). Then the Riemannian Hessian of  \({\mathcal {F}}\) at is positive, i.e.,

for all nonzero  .

Proof

We extend the proof of [54, Th. 5.1], which considers the finite-dimensional case for the simplified Kohn–Sham problem, to the infinite-dimensional case in a more general setting. We know from (28) that the horizontal lift of the Riemannian Hessian of \({\mathcal {F}}\) at \({\varvec{\phi }}_*\) takes the form

For the first term, we make the following considerations. Due to the orthogonality, each component of \({\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h}\) satisfies \((\phi _{*,l}, ({\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h})_j)_{L^2(\Omega )} = 0\) for \(l,j= 1,\dots , p\). Hence, the jth component of \({\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h}\) takes the form \(\psi _j = ({\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h})_j = \sum _{l>p} \alpha _{lj} \phi _{*,l}\) for some coefficients  \(\alpha _{lj}\in {\mathbb {R}}\) and  \(\phi _{*,l}\) denoting the basis from Assumption 3. As a consequence, we get

$$\begin{aligned} \big ( \llbracket {{\varvec{\phi }}_*},{{\mathcal {J}}{\mathcal {A}}_{{\varvec{\phi }}_*} {\varvec{\psi }}_{{\varvec{\phi }}_*}^\text {h}}\rrbracket _H \big )_{ij}&= \big ( \phi _{*,i}, ({\mathcal {J}}{\mathcal {A}}_{{\varvec{\phi }}_*} {\varvec{\psi }}_{{\varvec{\phi }}_*}^\text {h})_j \big )_{L^2(\Omega )} = {\tilde{a}}_{{\varvec{\phi }}_*}\!(\phi _{*,i}, \psi _j) \\&= \sum _{l>p} \alpha _{lj}\, {\tilde{a}}_{{\varvec{\phi }}_*}\!(\phi _{*,i}, \phi _{*,l}) = \sum _{l>p} \alpha _{lj}\, \lambda _i (\phi _{*,i}, \phi _{*,l})_{L^2(\Omega )} = 0 \end{aligned}$$

for all \(i,j=1,\ldots , p\) and, hence,

$$\begin{aligned} T_1({\varvec{\psi }}_{{\varvec{\phi }}_*}^\text {h}) = {\mathcal {P}}_{{\varvec{\phi }}_*}^\text {h} \big ({\mathcal {J}}{\mathcal {A}}_{{\varvec{\phi }}_*} {\varvec{\psi }}_{{\varvec{\phi }}_*}^\text {h} \big ) = {\mathcal {J}}{\mathcal {A}}_{{\varvec{\phi }}_*} {\varvec{\psi }}_{{\varvec{\phi }}_*}^\text {h} - {\varvec{\phi }}_* \llbracket {{\varvec{\phi }}_*},{{\mathcal {J}}{\mathcal {A}}_{{\varvec{\phi }}_*} {\varvec{\psi }}_{{\varvec{\phi }}_*}^\text {h} }\rrbracket _H = {\mathcal {J}}{\mathcal {A}}_{{\varvec{\phi }}_*} {\varvec{\psi }}_{{\varvec{\phi }}_*}^\text {h}. \end{aligned}$$

For the second term, we get with the assumption on  \({\mathcal {B}}_{{\varvec{\phi }}_*}\) that

$$\begin{aligned} g( T_2({\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h}), {\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h} )&= \big (T_2({\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h}), {\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h}\big )_H \\&= \big ({\mathcal {J}}{\mathcal {B}}_{{\varvec{\phi }}_*} {\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h} - {\varvec{\phi }}_* \llbracket {{\varvec{\phi }}_*},{{\mathcal {J}}{\mathcal {B}}_{{\varvec{\phi }}_*} {\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h}}\rrbracket _H,{\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h}\big )_H \\&= \big ({\mathcal {J}}{\mathcal {B}}_{{\varvec{\phi }}_*} {\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h},{\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h}\big )_H - \llbracket {{\varvec{\phi }}_*},{{\mathcal {J}}{\mathcal {B}}_{{\varvec{\phi }}_*} {\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h}}\rrbracket _H^T \big ({\varvec{\phi }}_*,{\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h}\big )_H\\&= \big ({\mathcal {J}}{\mathcal {B}}_{{\varvec{\phi }}_*} {\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h},{\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h}\big )_H \ge 0. \end{aligned}$$

Finally, by using (13), the third term takes the form

$$\begin{aligned} T_3({\varvec{\psi }}_{{\varvec{\phi }}_*}^\text {h})&= - {\mathcal {P}}_{{\varvec{\phi }}_*}^\text {h} \big ( {\varvec{\psi }}_{{\varvec{\phi }}_*}^\text {h} \llbracket {{\varvec{\phi }}_*},{{\mathcal {J}}{\mathcal {A}}_{{\varvec{\phi }}_*}{\varvec{\phi }}_*}\rrbracket _H \big ) \\&= - {\varvec{\psi }}_{{\varvec{\phi }}_*}^\text {h} \llbracket {{\varvec{\phi }}_*},{{\mathcal {J}}{\mathcal {A}}_{{\varvec{\phi }}_*}{\varvec{\phi }}_*}\rrbracket _H + {\varvec{\phi }}_* \llbracket {{\varvec{\phi }}_*},{{\varvec{\psi }}_{{\varvec{\phi }}_*}^\text {h}}\rrbracket _H\, \llbracket {{\varvec{\phi }}_*},{{\mathcal {J}}{\mathcal {A}}_{{\varvec{\phi }}_*}{\varvec{\phi }}_*}\rrbracket _H \\&= - {\varvec{\psi }}_{{\varvec{\phi }}_*}^\text {h} \Lambda _*. \end{aligned}$$

Let the columns of \(U\in \text {O}(p)\) form a basis of eigenvectors corresponding to the eigenvalues \(\lambda _1,\ldots ,\lambda _p\) of \(\Lambda _*\) and let \({\varvec{\psi }}_{{\varvec{\phi }}_*}^\textrm{h}U=({\tilde{\psi }}_1,\ldots ,\tilde{\psi _p})\). Due to the assumed spectral gap, this yields all together

which completes the proof. \(\square \)

Remark 3

(Connection to the Lagrange–Newton method) The optimal solution of the constrained minimization problem (5) can also be determined by the Lagrange–Newton method. Based on the first-order optimality conditions () with a symmetric Lagrange multiplier, we aim to solve the nonlinear system of equations

$$\begin{aligned} f({\varvec{\phi }}, \Lambda ) = \begin{bmatrix} {\mathcal {J}}{\mathcal {A}}_{{\varvec{\phi }}} \,{\varvec{\phi }}-{\varvec{\phi }}\, \Lambda \\ \llbracket {{\varvec{\phi }}},{{\varvec{\phi }}}\rrbracket _H - I_p \\ \Lambda -\Lambda ^T\end{bmatrix} = \begin{bmatrix} {{\textbf {0}}}\, \\ 0_p \\ 0_p\end{bmatrix}. \end{aligned}$$

Computing the Jacobian of f, the Lagrange-Newton iteration is given as follows: for given \({\varvec{\phi }}_k\in V\) and \(\Lambda _k\in {\mathbb {R}}^{p\times p}\), solve the equations

$$\begin{aligned} {\mathcal {J}}{\mathcal {A}}_{{\varvec{\phi }}_k} {\varvec{\eta }}_k + {\mathcal {J}}\,{\mathcal {B}}_{{\varvec{\phi }}_k} {\varvec{\eta }}_k -{\varvec{\eta }}_k\Lambda _k-{\varvec{\phi }}_k\Xi _k&= -\big ({\mathcal {J}}{\mathcal {A}}_{{\varvec{\phi }}_k} {\varvec{\phi }}_k -{\varvec{\phi }}_k\Lambda _k\big ), \end{aligned}$$
(33a)
$$\begin{aligned} \llbracket {{\varvec{\phi }}_k},{{\varvec{\eta }}_k}\rrbracket _H+\llbracket {{\varvec{\eta }}_k},{{\varvec{\phi }}_k}\rrbracket _H&= -\big (\llbracket {{\varvec{\phi }}_k},{{\varvec{\phi }}_k}\rrbracket _H - I_p\big ), \end{aligned}$$
(33b)
$$\begin{aligned} \Xi _k^{}-\Xi _k^T&= -\big (\Lambda _k^{}-\Lambda _k^T\big ) \end{aligned}$$
(33c)

for \({\varvec{\eta }}_k\in V\), \(\Xi _k\in {\mathbb {R}}^{p\times p}\) and update \({\varvec{\phi }}_{k+1}={\varvec{\phi }}_k+{\varvec{\eta }}_k\), \(\Lambda _{k+1}=\Lambda _k+\Xi _k\). Note that \({\varvec{\phi }}_{k+1}\) does not necessarily belong to \(\text {St}(p,V)\). Assuming \({\varvec{\phi }}_k\in \text {St}(p,V)\) and \(\Lambda _k\in {\mathcal {S}}_{\textrm{sym}}(p)\), however, Eqs. (33b) and (33c) imply that \({\varvec{\eta }}_k\in T_{{\varvec{\phi }}_k}\text {St}(p,V)\) and \(\Xi _k\in {\mathcal {S}}_{\textrm{sym}}(p)\), respectively. Resolving Eq. (33a) for symmetric \(\Xi _k\), we find that

$$\begin{aligned} \Xi _k&= {{\,\text {sym}\,}}\big (\llbracket {{\varvec{\phi }}_k},{{\mathcal {J}}{\mathcal {A}}_{{\varvec{\phi }}_k}\,{\varvec{\eta }}_k}\rrbracket _H +\llbracket {{\varvec{\phi }}_k},{{\mathcal {J}}\, {\mathcal {B}}_{{\varvec{\phi }}_k}\,{\varvec{\eta }}_k}\rrbracket _H -\llbracket {{\varvec{\phi }}_k},{{\varvec{\eta }}_k}\rrbracket _H\Lambda _k\big ) \\ {}&\quad +\llbracket {{\varvec{\phi }}_k},{{\mathcal {J}}{\mathcal {A}}_{{\varvec{\phi }}_k}\,{\varvec{\phi }}_k}\rrbracket _H-\Lambda _k. \end{aligned}$$

Inserting this matrix into (33a) yields the Newton equation (29). This shows that the Lagrange–Newton method with the modified update

$$\begin{aligned} {\varvec{\phi }}_{k+1} = {\mathcal {R}}({\varvec{\phi }}_k,{\varvec{\eta }}_k), \qquad \Lambda _{k+1} = \llbracket {{\varvec{\phi }}_{k+1}},{{\mathcal {J}}{\mathcal {A}}_{{\varvec{\phi }}_{k+1}}\,{\varvec{\phi }}_{k+1}}\rrbracket _H \end{aligned}$$

is equivalent to the Riemannian Newton method on the Stiefel manifold.

5 Examples and Numerical Experiments

This section is devoted to the numerical investigation of the Riemannian Newton methods. To this end, we consider the Gross–Pitaevskii eigenvalue problem from Example 1 and the Kohn–Sham model from Example 2.

5.1 Gross–Pitaevskii Eigenvalue Problem

The minimization of the Gross–Pitaevskii energy functional \({\mathcal {E}}_{\textrm{GP}}\) in (6) leads to the following nonlinear eigenvector problem: find \(\phi \in {\tilde{V}} = H^1_0(\Omega )\) with \(\Vert \phi \Vert _{L^2(\Omega )} = 1\) and \(\lambda \in {\mathbb {R}}\) such that

$$\begin{aligned} -\Delta \phi + 2\,\vartheta \, \phi + \kappa \, |\phi |^2 \phi = \lambda \, \phi \end{aligned}$$
(34)

for some space-dependent external potential  \(\vartheta \ge 0\) and an interaction constant \(\kappa >0\). The latter means that the particle interactions are repulsive, i.e., we consider the so-called defocussing regime. In this case, we get the operators

$$\begin{aligned} \langle {\mathcal {A}}_\phi \, v, w\rangle&= \int \limits _\Omega (\nabla v)^T \nabla w \,\text {d}x+ 2 \int \limits _\Omega \vartheta \, v w \,\text {d}x+ \kappa \int \limits _\Omega \, \phi ^2 v w \,\text {d}x, \end{aligned}$$
(35a)
$$\begin{aligned} \langle {\mathcal {B}}_\phi \, v, w\rangle&= 2\kappa \int \limits _{\Omega } \phi ^2 v w \,\text {d}x \end{aligned}$$
(35b)

for \(v,w\in {\tilde{V}}\). One can see that the bilinear form defined through (35a) corresponds to the Laplacian with the \(L^2\)-shift  \(2\vartheta +\kappa \phi ^2\). Assuming this shift to be constant and \(\Omega =(0,1)^d\) as the spatial domain, Assumption 3 is satisfied; see [50, Ch. 12]. Moreover, the nonlinear operator from (35b) fulfills

$$\begin{aligned} \big ( {\mathcal {J}}{\mathcal {B}}_{\phi }\, \psi , \psi \big )_{L^2(\Omega )} = \big \langle {\mathcal {B}}_{\phi }\,\psi , \psi \big \rangle = 2\kappa \int \limits _{\Omega } \phi ^2\, \psi ^2 \,\text {d}x\ge 0, \end{aligned}$$

such that Theorem 4 is applicable.

For the spatial discretization of the Gross–Pitaevskii problem (34), we use a biquadratic finite element method on a Cartesian mesh of width h; see [16] for the corresponding error analysis. The resulting discrete eigenvalue problem reads

$$\begin{aligned} A \varphi + 2M_{\vartheta } \varphi + \kappa M_{\varphi ^2} \varphi = \lambda \, M \varphi , \qquad \varphi ^TM\varphi =1 \end{aligned}$$

with \(\varphi \in {\mathbb {R}}^n\), where n denotes the number of degrees of freedom. Here, A is the stiffness matrix, M is the mass matrix, and \(M_{\vartheta }\) and \(M_{\varphi ^2}\) are the weighted mass matrices, respectively, where  \(\varphi ^2\) should be understood as the elementwise product. Then the discrete version of  \(\llbracket {\phi },{{\mathcal {J}}\!{\mathcal {A}}_\phi \,\phi }\rrbracket _H=\big (\phi ,{\mathcal {J}}\!{\mathcal {A}}_\phi \,\phi \big )_{L^2(\Omega )}\) equals

$$\begin{aligned} \lambda _\varphi = \varphi ^T (A + 2M_{\vartheta } + \kappa M_{\varphi ^2})\, \varphi , \end{aligned}$$

and the Newton equation takes the form

$$\begin{aligned} (I - M\varphi \varphi ^T)\big ((A + 2M_{\vartheta } + 3\kappa&M_{\varphi ^2})\, \psi - \lambda _\varphi M \psi \big ) \\&= - (I - M\varphi \varphi ^T)(A + 2M_{\vartheta } + \kappa M_{\varphi ^2})\, \varphi \end{aligned}$$

with unknown \(\psi \in \{\xi \in {\mathbb {R}}^n\;:\; \xi ^TM\varphi = 0\}=\text {im}(I-\varphi \varphi ^T\! M)\).

We demonstrate the performance of the resulting Riemannian Newton method in comparison with the SCF iteration combined with the optimal damping algorithm (ODA) proposed in [23] and the energy-adaptive Riemannian gradient descent method (RGD) of [29] with a non-monotone step size control as outlined in [8]. The numerical experiments are performed on a sufficiently large bounded domain \(\Omega = (-L,L)^2\), \(L=8\), for two types of trapping potentials. In Sect. 5.1.1, we consider a simple harmonic trap, whereas in Sect. 5.1.2, we add an additional disorder potential. The interaction parameter  \(\kappa \) as well as the spatial resolution h will be specified separately for each case.

5.1.1 Ground State in a Harmonic Trap

For the first numerical experiment, we consider the harmonic trapping potential

$$\begin{aligned} \vartheta _\text {harm}(x) = \tfrac{1}{2}\Vert x\Vert ^2 \end{aligned}$$
(36)

and the interaction parameters \(\kappa =10,100,1000\). The resulting ground states computed on a Cartesian mesh of width \(h/(2\,L) = 2^{-10}\) are depicted in Fig. 1.

Fig. 1
figure 1

Ground state in the harmonic trap (potential in gray, properly rescaled) for \(\kappa =10,100,1000\) (from left to right)

To generate a joint and sufficiently accurate initial value for the three solvers of the discretized nonlinear eigenvector problem, we run the energy-adaptive RGD method starting from the biquadratic finite element interpolation of the constant 1 (respecting the homogeneous Dirichlet boundary condition). We stopped this iteration once the residual fell below the \(10^{-2}\) tolerance and used the approximated ground state as the initial state to compare the asymptotic behavior of the three different solvers. The corresponding convergence histories are presented in Fig. 2 showing the evolution of the residuals during the iteration processes. It can be observed that the Riemannian Newton method (with sparse direct solution of the Newton equation using the Sherman–Morrison formula [48]) reaches the tolerance of \(10^{-8}\) in only three steps. While the performances of the SCF iteration and the energy-adaptive RGD method abate with increasing \(\kappa \), the Riemannian Newton scheme appears to be extremely robust. We would like to emphasize that, although one Newton step is slightly more expensive than one step of any other competing method, the overall costs are much smaller, especially for increasing  \(\kappa \).

Fig. 2
figure 2

Convergence history of the residuals for the ground state in the harmonic trap for \(\kappa =10,100,1000\) (from left to right)

The convergence behavior of the Riemannian Newton scheme is also robust to the underlying mesh size h and, hence, independent of the dimension of the discretization space. This is demonstrated in Fig. 3 with a fixed choice of \(\kappa =1000\). We consider a sequence of meshes with \(h/(2L) = 2^{-1},\ldots ,2^{-10}\) and use the same procedure as above to generate initial guesses with residuals of order \(10^{-2}\). The left graph shows the number of (outer) iterations of the Riemannian Newton method to fall below the tolerance of \(10^{-10}\) for each of these mesh sizes. An increase in the number of iterations with smaller mesh size is not observed. In our experience, this mesh independence of the Riemannian Newton optimization scheme is representative for many other choices of potentials and interaction parameters. Note, however, that this does not mean that the costs of a Newton step are independent of h. As for every Laplace-type problem, methods such as multigrid need to be implemented in order to obtain a mesh-independence also for the inner iteration. This holds for all competing methods in the same way. For completeness, Fig. 3 also shows the corresponding errors in the minimum energy approximation as a function of the mesh size, demonstrating the optimal fourth-order convergence rate of the biquadratic finite element implementation [30].

Fig. 3
figure 3

Computing the ground state in the harmonic trap for \(\kappa =1000\): iteration count of the Riemannian Newton method to fall below the tolerance \(10^{-10}\) (left) and the error in the minimal energy (right) versus mesh size h. The dashed line indicates order \(h^4\)

5.1.2 Localized Ground State in a Disorder Potential

The second experiment considers the computationally more difficult case where the external potential is the sum of the harmonic potential \(\vartheta _\text {harm}\) defined in (36) and a potential \(\vartheta _\text {rand}\) reflecting a high degree of disorder. The disorder part \(\vartheta _\text {rand}\) is chosen as a piecewise constant function on the Cartesian mesh of width \(2L\varepsilon \), \(\varepsilon = 2^{-6}\), taking values 0 or \(\varepsilon ^{-2}\) as depicted in Fig. 4. For a potential in such a scaling regime, the low-energy eigenstates essentially localize in terms of an exponential decay of their moduli relative to the small parameter \(\varepsilon \). For the linear case, i.e., for \(\kappa =0\), this has been analyzed in [4]. For growing \(\kappa \), the ground state consists of a growing number of localized peaks; see Fig. 4. Further details on the phenomenon of localization in the Gross–Pitaevskii equation and the onset of delocalization can be found in [6, 7]. As in the previous experiments, we use biquadratic finite elements on a Cartesian mesh of width \(h/(2L) = 2^{-10}\). To illustrate the localization behavior that occurs with the current parameter scaling for \(\kappa \lesssim 1\), we consider the interaction parameters \(\kappa =0.1,1,10\). The ground states for \(\kappa =1,10\) are shown in Fig. 4. The ground state for \(\kappa =0.1\) is hardly distinguishable from the one for \(\kappa =1\) and, therefore, it is not shown in a separate figure.

Fig. 4
figure 4

Piecewise constant disorder potential \(\vartheta _\text {rand}\) (left, black elements refer to the value \(\varepsilon ^{-2}\), white elements refer to the value 0, \(\varepsilon =2^{-6}\)) and the corresponding ground states for \(\kappa =1\) (middle) and \(\kappa =10\) (right)

Figure 5 displays the convergence history of the residuals for \(\kappa =0.1,1,10\). We employed the same strategy as in Sect. 5.1.1 to generate suitable initial guesses with the residuals of order \(10^{-2}\) used for all methods. The results clearly indicate that the ground state computations with the disorder potential are already challenging for smaller values of \(\kappa \). Particularly, the energy-adaptive RGD method needs much larger iteration counts, which according to [27], may be related to smaller spectral gaps between the first and second eigenvalue. The Riemannian Newton method, on the other hand, still performs well and reaches the prescribed tolerance \(10^{-8}\) for the residual in only a few steps in all three examples. For comparison, the SCF iteration converges very fast in the almost linear case but suffers from larger values of \(\kappa \) as the energy-adaptive RGD method. Here, again, the higher costs per Newton step are compensated by far by the very small number of needed iteration steps.

Fig. 5
figure 5

Convergence history of the residuals for the ground state in a disorder potential for \(\kappa =0.1,1,10\) (from left to right)

5.2 Kohn–Sham Model

For the Kohn–Sham energy functional \({\mathcal {E}}_{\textrm{KS}}\) introduced in (7), we have

$$\begin{aligned} \langle {\mathcal {A}}_{\varvec{\phi }}\,\varvec{v}, \varvec{w}\rangle&= \int \limits _\Omega {{\,\textrm{tr}\,}}\bigl ((\nabla \varvec{v})^T\nabla \varvec{w}\bigr ) \,\text {d}x+ 2 \int \limits _\Omega \vartheta _\text {ion}\, \varvec{v}\cdot \varvec{w}\,\text {d}x\\&\qquad + 2\int \limits _\Omega \Big (\int \limits _{\Omega } \frac{\rho ({\varvec{\phi }}(y))}{\Vert x-y\Vert }\, \,\text {d}y\Big )\, \varvec{v}\cdot \varvec{w}\,\text {d}x+ 2 \int \limits _\Omega \mu _{\textrm{xc}}(\rho ({\varvec{\phi }}))\, \varvec{v}\cdot \varvec{w}\,\text {d}x\end{aligned}$$

with \(\mu _{\textrm{xc}}(\rho ) = \frac{{\textrm{d}}}{{{\textrm{d}}}\rho } \big (\rho \,\epsilon _{\textrm{xc}}(\rho )\big )\). Moreover, the operator \({\mathcal {B}}_{\varvec{\phi }}\) has the form

$$\begin{aligned} \langle {\mathcal {B}}_{\varvec{\phi }}\,\varvec{v},\varvec{w}\rangle = 4 \int \limits _{\Omega }\!\Big (\!\int \limits _{\Omega } \frac{{\varvec{\phi }}\cdot \varvec{v}}{\Vert x-y\Vert } \,\text {d}y\Big ) \,{\varvec{\phi }}\cdot \varvec{w}\,\text {d}x+ 4 \int \limits _{\Omega } \zeta _\textrm{xc}(\rho ({\varvec{\phi }})) ({\varvec{\phi }}\cdot \varvec{v})\, ({\varvec{\phi }}\cdot \varvec{w}) \,\text {d}x, \end{aligned}$$

where \(\zeta _{\textrm{xc}}(\rho )=\frac{\textrm{d}}{\textrm{d}\rho } \mu _\textrm{xc}(\rho )\). The exchange-correlation function \(\epsilon _\text {xc}(\rho )\) can additively be decomposed as \(\epsilon _\text {xc}(\rho ) =\epsilon _\text {x}(\rho ) + \epsilon _\text {c}(\rho )\), where the exchange component \(\epsilon _\text {x}(\rho )\) has the particular analytical expression \(\epsilon _\text {x}(\rho )=-\frac{3}{4}\big (\frac{3}{\pi }\rho \big )^{1/3}\) and the correlation component \(\epsilon _\text {c}(\rho )\) is usually unknown, but can be fitted by using quantum Monte-Carlo data [41]. For the numerical experiments, we use the MATLAB toolbox KSSOLV [35, 51], in which the correlation component is implemented as

$$\begin{aligned} \epsilon _\text {c}(\rho ) = \left\{ \begin{array}{ll} a_1 + a_2\,r(\rho ) + \big (a_3 + a_4\,r(\rho )\big ) \ln (r(\rho )), &{}\text {if } r(\rho )<1, \\[0.3em] \big ( 1+b_2\,\sqrt{r(\rho )}+b_3\,r(\rho ) \big )/b_1, &{}\text {if } r(\rho )\ge 1,\end{array}\right. \end{aligned}$$

where \(r(\rho )=\big (\frac{4\pi }{3}\rho \big )^{-1/3}\) is the Wigner-Seitz radius, and \(a_j,b_j\in {\mathbb {R}}\) are fitted constants; see [42, App. C].

For the spatial discretization, we employ the planewave discretization method as implemented in KSSOLV. With n denoting the number of degrees of freedom, the matrix \(\Phi \in {\mathbb {C}}^{n\times p}\) contains the coefficients of the approximation of the wave function \({\varvec{\phi }}\). Then the discretized Kohn–Sham energy functional is given by

$$\begin{aligned} E(\Phi ) = \frac{1}{2} {{\,\textrm{tr}\,}}\big (\Phi ^*(L+2D_{\textrm{ion}})\Phi \big ) + \frac{1}{2}\,\rho _h(\Phi )^TL^+\rho _h(\Phi ) + \rho _h(\Phi )^T\epsilon _{\textrm{xc}}(\rho _h(\Phi )), \end{aligned}$$

where \(\Phi ^*\) denotes the complex conjugate transpose of \(\Phi \), \(L\in {\mathbb {C}}^{n\times n}\) is the discrete Laplace matrix, \(L^+\in {\mathbb {C}}^{n\times n}\) is its pseudoinverse, \(D_\textrm{ion}\in {\mathbb {R}}^{n\times n}\) is the discretized ionic potential, and \(\rho _h(\Phi ) = {{\,\textrm{diag}\,}}(\Phi \Phi ^*) \in {\mathbb {R}}^n\) is the discretized electronic charge density. Note that the matrix L is Hermitian and \(D_{\textrm{ion}}\) is diagonal. In this setting, the minimization problem

$$\begin{aligned} \min \limits _{\Phi \in \text {St}(p,n)} E(\Phi ) \end{aligned}$$

on the (compact) Stiefel manifold \( \text {St}(p,n)= \big \{ \Phi \in {\mathbb {C}}^{n\times p}\;:\; \Phi ^* \Phi = I_p \big \} \) leads to the finite-dimensional nonlinear eigenvector problem

$$\begin{aligned} \begin{array}{rcl} A(\Phi )\Phi -\Phi \, \Lambda &{} = &{} 0, \\ \Phi ^*\Phi -I_p&{} = &{} 0, \end{array} \end{aligned}$$

where the discrete Kohn–Sham Hamiltonian is given by

$$\begin{aligned} A(\Phi ) = L + 2\, D_{\textrm{ion}} + 2{{\,\textrm{Diag}\,}}\big (L^+\rho _h(\Phi ) + \mu _{\textrm{xc}}(\rho _h(\Phi ))\big ). \end{aligned}$$

Further, the Riemannian gradient of \(E(\Phi )\) becomes

$$\begin{aligned} {{\,\textrm{grad}\,}}E(\Phi ) = (I-\Phi \Phi ^*)A(\Phi )\Phi = A(\Phi )\Phi -\Phi \big (\Phi ^*\!A(\Phi )\Phi \big ). \end{aligned}$$
(37)

In the Riemannian Newton method on the Stiefel manifold \(\text {St}(p,n)\), we need to solve the equation

$$\begin{aligned} P_{\Phi }\big (A(\Phi )\Psi +B(\Phi ,\Psi )-\Psi \Phi ^*\!A(\Phi )\Phi \big ) = -(I-\Phi \Phi ^*) A(\Phi )\Phi \end{aligned}$$
(38)

for \(\Psi \) belonging to the tangent space \(T_\Phi \, \text {St}(p,n)\). Therein,

$$\begin{aligned} P_{\Phi }(Y) = Y - \tfrac{1}{2}\, \Phi \big (\Phi ^* Y + Y^* \Phi \big ) \end{aligned}$$

is the orthogonal projector onto \(T_\Phi \,\text {St}(p,n)\) and

$$\begin{aligned} B(\Phi ,\Psi ) = 2{{\,\textrm{Diag}\,}}\big ((L^++{{\,\textrm{Diag}\,}}(\zeta _\textrm{xc}(\rho _h(\Phi )))){{\,\textrm{diag}\,}}(\Phi \Psi ^*+\Psi \Phi ^*)\big )\Phi \end{aligned}$$

is the discretization of \({\mathcal {B}}_{\varvec{\phi }}\). On the Grassmann manifold \(\text {Gr}(p,n)=\text {St}(p,n)/\text {U}(p)\) with the unitary group \(\text {U}(p)\), the Newton equation takes the form

$$\begin{aligned} (I-\Phi \Phi ^*) \big (A(\Phi )\Psi _{\Phi }^\textrm{h} + B(\Phi ,\Psi _{\Phi }^\textrm{h})-\Psi _{\Phi }^\textrm{h}\Phi ^*\!A(\Phi )\Phi \big ) = -(I-\Phi \Phi ^*) A(\Phi )\Phi \end{aligned}$$
(39)

for \(\Psi _\Phi ^\textrm{h}\in {\mathcal {H}}_{\Phi } = \{\Psi \in T_\Phi \, \text {St}(p,n)\;:\; \Phi ^*\Psi =0\}\).

In our experiments, we compare the calculation of the ground state by using the SCF iteration with the Anderson charge mixing scheme [51], the energy-adaptive RDG with non-monotone step size control [8], and the Riemannian Newton methods on the Stiefel manifold (RNS) and on the Grassmann manifold (RNG). In all these methods, we choose the same initial guess for the wave function by performing one SCF step with a randomly generated starting point and stop the iterations once the Frobenius norm of the residual \(R(\Phi _k) = A(\Phi _k)\Phi _k-\Phi _k\Lambda _k\) with \(\Lambda _k=\Phi _k^*A(\Phi _k)\Phi _k\) is smaller than the tolerance \(10^{-8}\). Note that due to (37), \(\Vert R(\Phi _k)\Vert _F=\Vert {{\,\textrm{grad}\,}}E(\Phi _k)\Vert _F\), i.e., the norms of the residuals provide the information on the size of the Riemannian gradients. In both Newton methods and the energy-adaptive RGD method, we use the qR decomposition based retractions. The reference minimal energy \(E_{\min }\) is computed by the RNG method with the tolerance \(10^{-10}\).

All algorithms are performed in an inexact manner, i.e., the occurring linear systems are only solved up to a certain tolerance. In RNG, for instance, we follow Algorithm 1 using the MATLAB built-in function minres as a linear system solver with the adaptive tolerance \(\min (1/k, 10^{-3} \Vert {{\,\textrm{grad}\,}}E(\Phi _{k-1})\Vert _F)\) and the maximal number of inner iterations \(\ell _{\max }=15\). The remaining parameters are chosen as \(\eta =10^{-8}\), \(\delta =0.5\), and \(\sigma =10^{-4}\). In RNS, we proceed similarly, with the only difference that instead of (39) we solve the Newton equation of the form (38). For solving the linear eigenvalue problems in SCF, we employ the KSSOLV built-in LOBPCG algorithm for the pentacene model in Sect. 5.2.1 and the MATLAB built-in function eigs for the graphene model in Sect. 5.2.2. Switching to another eigenvalue solver is necessary due to the ill-conditioning in LOBPCG for the latter example. In both cases, the tolerance for the inner iterations is set to be \(\min (10^{-3}, 10^{-3} \Vert {{\,\textrm{grad}\,}}E(\Phi _{k-1})\Vert _F)\). For the linear system solvers, we use the kinetic energy preconditioner, which provides, especially for the energy-adaptive RGD method, better numerical results than the KSSOLV built-in Teter–Payne–Allan preconditioner [49].

Finally, we would like to mention that similarly to the Gross–Pitaevskii example in Sect. 5.1, the Riemannian Newton schemes for the Kohn–Sham model are again robust in terms of the dimension of the discretization space used in KSSOLV. This means that the number of Newton iterations needed to fall below a certain tolerance is not effected by finer discretizations (as long as the number of inner iterations is sufficiently large).

5.2.1 Pentacene Molecule

In the first numerical experiment, we calculate the ground state for the pentacene molecule \(\textrm{C}_{22}\textrm{H}_{14}\) with \(p=51\) electron orbitals. A spatial planewave discretization on a \(80\times \ 55\times 160\) sampling grid gives the discrete model of dimension \(n=44791\). In Fig. 6, we present the convergence history of the residuals and the energy reduction during the iterations. One can see that the RNS and RNG methods have very similar behavior and converge within 8 and 10 iterations, respectively. In comparison, the SCF method and the energy-adaptive RGD method require 18 and 54 iterations to converge, respectively. In terms of computing time, all methods perform quite similarly in this experiment. This can also be seen in Table 1, which shows the values of the energy functional, the reached residuals, the number of (outer) iterations, the total number of Hamiltonian evaluations, and the CPU time.

Fig. 6
figure 6

Convergence history for the pentacene molecule: residuals (left) and energy reduction (right)

Fig. 7
figure 7

Convergence history for the graphene lattice: residuals (left) and energy reduction (right)

Table 1 Numerical results for the pentacene and the graphene models

5.2.2 Graphene Lattice

As the second model, we consider a graphene lattice consisting of carbon atoms arranged in 9 hexagons with \(p=67\) electron orbitals. We use a \(32\times \ 55\times 160\) sampling grid for the wave function and get a discrete model of dimension \(n=12279\). Figure 7 presents the evolution of the residuals and errors in the energy. We observe again that both Newton methods converge very fast compared to the energy-adaptive RGD method which needs 64 iterations to achieve the tolerance \(10^{-8}\) for the residual. In contrary, the SCF iteration has difficulties to converge. Also other mixing strategies implemented in KSSOLV do not improve the convergence property of SCF for the graphene model. This behaviour may be explained by a missing spectral gap between the excited and non-excited states. A detailed comparison, including the overall CPU time is part of Table 1. In this experiment (with the particular implementation and used hardware), one can say that the computational complexity of the methods follows the rule of thumb

$$\begin{aligned} \text {1 step Newton} \quad \approx \quad \text {2 steps SCF} \quad \approx \quad \text {4 steps eaRGD}. \end{aligned}$$

Overall, this example clearly shows the supremacy of the Newton approach for more challenging examples.

6 Conclusion

In this paper, we have derived Riemannian Newton methods on the infinite-dimensional Stiefel and Grassmann manifolds for Kohn–Sham type energy minimization problems. Starting from an energy functional, we present a unified approach for applications in computational physics (e.g., the Gross–Pitaevskii eigenvalue problem) and computational chemistry (e.g., the Kohn–Sham model). The remarkable gain in computational efficiency of the Riemannian Newton methods compared to the so far more popular methods such as SCF and gradient descent methods is demonstrated by a series of numerical experiments.