This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

A Nonnested Augmented Subspace Method for Kohn-Sham Equation

Guanghui Hu Department of Mathematics, University of Macau, Macao S.A.R., China UM Zhuhai Research Institute, Zhuhai, Guangdong, China Hehu Xie LSEC, ICMSEC, Academy of Mathematics and Systems Science, Chinese Academy of Sciences, Beijing 100190, China School of Mathematical Sciences, University of Chinese Academy of Sciences, Beijing, 100049, China Fei Xu Faculty of Science, Beijing University of Technology, Beijing 100124, China Gang Zhao LSEC, ICMSEC, Academy of Mathematics and Systems Science, Chinese Academy of Sciences, Beijing 100190, China
Abstract

In this paper, a novel adaptive finite element method is proposed to solve the Kohn-Sham equation based on the moving mesh (nonnested mesh) adaptive technique and the augmented subspace method. Different from the classical self-consistent field iterative algorithm which requires to solve the Kohn-Sham equation directly in each adaptive finite element space, our algorithm transforms the Kohn-Sham equation into some linear boundary value problems of the same scale in each adaptive finite element space, and then the wavefunctions derived from the linear boundary value problems are corrected by solving a small-scale Kohn-Sham equation defined in a low-dimensional augmented subspace. Since the new algorithm avoids solving large-scale Kohn-Sham equation directly, a significant improvement for the solving efficiency can be obtained. In addition, the adaptive moving mesh technique is used to generate the nonnested adaptive mesh for the nonnested augmented subspace method according to the singularity of the approximate wavefunctions. The modified Hessian matrix of the approximate wavefunctions is used as the metric matrix to redistribute the mesh. Through the moving mesh adaptive technique, the redistributed mesh is almost optimal. A number of numerical experiments are carried out to verify the efficiency and the accuracy of the proposed algorithm.

Keywords. Density functional theory, Kohn-Sham equation, nonnested mesh, augmented subspace method.

AMS subject classifications. 65N30, 65N25, 65L15, 65B99.

1 Introduction

Density functional theory (DFT) is one of the major breakthroughs in quantum physics and quantum chemistry. In the framework of density functional theory, the many-body problem can be simplified as the motion of electrons without interaction in the effective potential field, which includes the Coulomb potential of the external potential field, the Hartree potential generated by the interaction between electrons, and the exchange-correlation potential for the nonclassical Coulomb interaction. For the exchange-correlation potential, it has always been a difficulty in density functional theory. At present, there is no exact analytical expression for the exchange-correlation potential. Generally, it is approximately described by the local density approximation (LDA), the local spin density approximation (LSDA) and the generalized gradient approximation (GGA), etc. The Kohn-Sham equation is one of the most important models in the calculation of electronic structure, which transforms the wavefunctions (in 3N\mathbb{R}^{3N} space) describing NN particle states into density function (in 3\mathbb{R}^{3} space), so as to reduce the degrees of freedom of equation and reduce the computational work of numerical simulation. The idea of Kohn-Sham equation can be traced back to Thomas-Fermi model in 1927. The model gave a primary description of the electronic structure of atoms. The strict theoretical analysis was described by Hohenberg and Kohn in [26], which proved the correctness and feasibility of using single electron orbit to replace the wavefunctions describing multiple electrons.

So far, lots of numerical methods for solving Kohn-Sham equation have been developed. For instance, plane-wave method [10, 35] is the most popular method in the computational quantum chemistry community. Since the basis function is independent from the ionic position, plane-wave method has advantage in calculating intermolecular force. Combined with the pseudopotential method, plane-wave method plays an important role in the study of the ground and excited states calculations, and geometry optimization of the electronic structures. Although the plane-wave method is the most popular one in the computational quantum chemistry community, it is inefficient in solving non-periodic systems like molecules, nano-clusters, or materials systems with defects, etc. Furthermore, the plane-wave method uses the global basis which significantly affect the scalability on parallel computing platforms. The atomic-orbital-type basis sets [21, 22] are also widely used for simulating materials systems such as molecules and clusters. However, they are well-suited only for isolated systems with special boundary conditions. It is difficult to develop a systematic basis-set for all materials systems. Thus over the past decades, more and more attentions are attracted to develop efficient and scalable grid-based methods such as the finite element method for electronic structure calculations. The advantages of grid-based methods include that it can use unstructured meshes and local basis sets, hence owing high scalability on parallel computing platforms. So far, the applications of the finite element method in solving Kohn-Sham equation have been studied systematically. We refer to [6, 8, 11, 33, 36, 39, 40, 42, 43, 47, 48, 49] and references therein for a comprehensive overview.

In this paper, we propose a nonnested augmented subspace method to solve the Kohn-Sham equation based on the moving mesh adaptive technique and the augmented subspace method. Since the Coulomb potential and Hartree potential have strong singularities, the adaptive mesh refinement is a competitive strategy to improve solving efficiency. Adaptive methods mainly include hh-adaptive method, pp-adaptive method and rr-adaptive method. The hh-adaptive method uses a posteriori error indicator for local refinement, pp-adaptive method uses higher-order polynomials on local mesh elements, rr-adaptive method (moving mesh method) uses control function or metric tensor (also known as metric matrix) for mesh redistribution. In this paper, we adopt the rr-adaptive method to generate a series of nonnested adaptive finite element spaces. The rr-adaptive method uses the control function or metric matrix to guide the mesh movement, which can improve the accuracy by moving the grid nodes to the area with large errors. This method can be traced back to Alexander’s work in [3], and then Miller’s work [37, 38] promoted the development of rr-adaptive method. In 2001, Li and Tang etc [31, 32] proposed the moving mesh method based on harmonic mapping. Later, Di and Li etc [18] applied the moving mesh method based on harmonic mapping to solve the incompressible Navier-Stokes equation. More results about moving mesh method can be found in [19, 20, 53, 54] and the references therein.

Another technique adopted in this paper is the multilevel correction method (augmented subspace method) [27, 34, 51, 52]. The traditional multilevel correction method can only be performed on the nested multilevel space sequence. In this paper, we develop a nonnested multilevel correction technique for Kohn-Sham equation on a nonnested mesh sequence generated by the moving mesh technique. Different from the classical self-consistent field iterative algorithm which requires to solve the Kohn- Sham equation directly in each adaptive finite element space, our algorithm transforms the Kohn-Sham equation into some linear boundary value problems of the same scale on each level of the adaptive refinement mesh sequence, and then the wavefunctions derived from the linear boundary value problems are corrected by solving a small-scale Kohn-Sham equation defined in a low-dimensional augmented subspace. Since the new algorithm avoids solving large-scale Kohm-Sham equation directly, a significant improvement for the efficiency can be obtained. In addition, the adaptive mesh is produced using the moving mesh technique according to the singularity of the wavefunctions, which can dramatically generate a high accuracy with less computational work. In our algorithm, the approximate wavefunctions are used as the adaptive function, and the modified Hessian matrix of the density function is used as the metric matrix to redistribute the mesh. Through the moving mesh adaptive technique, the redistributed mesh is almost optimal. By combining the moving mesh technique and the nonnested augmented subspace method, the solving efficiency for Kohn-Sham equation can be significantly improved.

The remainder of this paper is as follows. Section 2 introduces Kohn-Sham equation and its finite element discretization method. Section 3 introduces the nonnested augmented subspace method for Kohn-Sham equation by using the moving mesh technique and the multilevel correction method. In Section 4, we propose the convergence analysis and the estimate of computational work for the presented algorithm. In Section 5, a number of numerical examples are demonstrated to verify the efficiency and accuracy of the proposed method.

2 Finite element method for Kohn-Sham equation

To describe the Kohn-Sham equation and its finite element discretization, we first introduce some notation. Following [1], we use Ws,p(Ω)W^{s,p}(\Omega) to denote Sobolev spaces, and use s,p,Ω\|\cdot\|_{s,p,\Omega} and ||s,p,Ω|\cdot|_{s,p,\Omega} to denote the associated norms and seminorms, respectively. In case p=2p=2, we denote Hs(Ω)=Ws,2(Ω)H^{s}(\Omega)=W^{s,2}(\Omega) and H01(Ω)={vH1(Ω):v|Ω=0}H_{0}^{1}(\Omega)=\{v\in H^{1}(\Omega):v|_{\partial\Omega}=0\}, where v|Ω=0v|_{\partial\Omega}=0 is in the sense of trace, and denote s,Ω=s,2,Ω\|\cdot\|_{s,\Omega}=\|\cdot\|_{s,2,\Omega}. For convenience, the symbols x1y1x_{1}\lesssim y_{1}, x2y2x_{2}\gtrsim y_{2} and x3y3x_{3}\approx y_{3} are used to represent x1C1y1x_{1}\leq C_{1}y_{1}, x2c2y2x_{2}\geq c_{2}y_{2}, and c3x3y3C3y3c_{3}x_{3}\leq y_{3}\leq C_{3}y_{3}, respectively, where C1C_{1}, c2c_{2}, c3c_{3}, and C3C_{3} denote some mesh-independent constants. In this paper, Ω\Omega is dropped from the subscript of the norm for simplicity.

Let :=(H01(Ω))N\mathcal{H}:=(H_{0}^{1}(\Omega))^{N} be the Hilbert space with the inner product

(Φ,Ψ)=i=1NΩϕiψi𝑑x,Φ=(ϕ1,,ϕN),Ψ=(ψ1,,ψN),\displaystyle(\Phi,\Psi)=\sum_{i=1}^{N}\int_{\Omega}\phi_{i}\psi_{i}dx,\quad\forall\ \Phi=(\phi_{1},\dots,\phi_{N}),\ \ \Psi=(\psi_{1},\cdots,\psi_{N})\in\mathcal{H}, (2.1)

where Ω3\Omega\subset\mathbb{R}^{3}. For any Ψ\Psi\in\mathcal{H} and a subdomain ωΩ\omega\subset\Omega, we define ρΨ=i=1N|ψi|2\rho_{\Psi}=\sum_{i=1}^{N}|\psi_{i}|^{2} and

Ψs,ω=(i=1Nψis,ω2)1/2,s=0,1.\displaystyle\|\Psi\|_{s,\omega}=\left(\sum_{i=1}^{N}\|\psi_{i}\|_{s,\omega}^{2}\right)^{1/2},\ \ s=0,1.

Let 𝒬\mathcal{Q} be a subspace of \mathcal{H} with orthonormality constraints:

𝒬={Ψ:ΨTΨ=IN×N},\displaystyle\mathcal{Q}=\left\{\Psi\in\mathcal{H}:\Psi^{T}\Psi=I^{N\times N}\right\}, (2.2)

where ΦTΨ=(Ωϕiψj𝑑x)i,j=1NN×N\Phi^{T}\Psi=\big{(}\int_{\Omega}\phi_{i}\psi_{j}dx\big{)}_{i,j=1}^{N}\in\mathbb{R}^{N\times N}.

We consider a molecular system consisting of MM nuclei with charges {Z1\{Z_{1}, \cdots, ZM}Z_{M}\} and locations {R1\{R_{1}, \cdots, RM}R_{M}\}, respectively, and NN electrons in the non-relativistic and spin-unpolarized setting. The general form of Kohn-Sham energy functional can be demonstrated as follows

E(Ψ)=Ω(12i=1N|ψi|2+Vext(x)ρΨ+Exc(ρΨ))𝑑x+12D(ρΨ,ρΨ),\displaystyle E(\Psi)=\int_{\Omega}\left(\displaystyle\frac{1}{2}\sum_{i=1}^{N}|\nabla\psi_{i}|^{2}+V_{ext}(x)\rho_{\Psi}+E_{xc}(\rho_{\Psi})\right)dx+\displaystyle\frac{1}{2}D(\rho_{\Psi},\rho_{\Psi}), (2.3)

for Ψ=(ψ1,ψ2,,ψN)\Psi=(\psi_{1},\psi_{2},\cdots,\psi_{N})\in\mathcal{H}. Here, VextV_{ext} is the Coulomb potential defined by Vext=k=1MZk/|xRk|V_{ext}=-\sum_{k=1}^{M}Z_{k}/|x-R_{k}|, D(ρΦ,ρΦ)D(\rho_{\Phi},\rho_{\Phi}) is the Hartree energy defined by

D(f,g)=Ωf(gr1)𝑑x=ΩΩf(x)g(y)1|xy|𝑑x𝑑y,\displaystyle D(f,g)=\int_{\Omega}f(g*r^{-1})dx=\int_{\Omega}\int_{\Omega}f(x)g(y)\displaystyle\frac{1}{|x-y|}dxdy, (2.4)

and Exc(t)E_{xc}(t) is some real function over [0,)[0,\infty) denoting the exchange-correlation energy.

The ground state of the system is obtained by solving the minimization problem:

inf{E(Ψ):Ψ𝒬},\displaystyle\inf\{E(\Psi):\Psi\in\mathcal{Q}\}, (2.5)

and we refer to [10, 16] for the existence of a minimizer under some conditions.

The Euler-Lagrange equation corresponding to the minimization problem (2.5) is the well-known Kohn-Sham equation: Find (Λ,Ψ)N×(\Lambda,\Psi)\in\mathbb{R}^{N}\times\mathcal{H} such that

{HΨψi=λiψiinΩ,i=1,2,,N,Ωψiψj𝑑x=δij,\left\{\begin{array}[]{l}H_{\Psi}\psi_{i}=\lambda_{i}\psi_{i}\ \ {\rm in}\ \Omega,\quad i=1,2,\cdots,N,\\ \\ \displaystyle\int_{\Omega}\psi_{i}\psi_{j}dx=\delta_{ij},\end{array}\right. (2.6)

where HΨH_{\Psi} is the Kohn-Sham Hamiltonian operator defined by

HΨ=12Δ+Vext+VHar(ρΨ)+Vxc(ρΨ)\displaystyle H_{\Psi}=-\displaystyle\frac{1}{2}\Delta+V_{ext}+V_{Har}(\rho_{\Psi})+V_{xc}(\rho_{\Psi}) (2.7)

with VHar(ρΨ)=r1ρΨV_{Har}(\rho_{\Psi})=r^{-1}*\rho_{\Psi}, Vxc(ρΨ)=Exc(ρΨ)V_{xc}(\rho_{\Psi})=E^{\prime}_{xc}(\rho_{\Psi}), Λ=(λ1,,λN)\Lambda=(\lambda_{1},\cdots,\lambda_{N}) and λi=(HΨψi,ψi)\lambda_{i}=(H_{\Psi}\psi_{i},\psi_{i}). The variational form of the Kohn-Sham equation can be described as follows: Find (Λ,Ψ)N×(\Lambda,\Psi)\in\mathbb{R}^{N}\times\mathcal{H} such that

{(HΨψi,v)=λi(ψi,v),vH01(Ω),i=1,2,,N,Ωψiψj𝑑x=δij.\left\{\begin{array}[]{l}(H_{\Psi}\psi_{i},v)=\lambda_{i}(\psi_{i},v),\quad\forall v\in H_{0}^{1}(\Omega),\quad i=1,2,\cdots,N,\\ \\ \displaystyle\int_{\Omega}\psi_{i}\psi_{j}dx=\delta_{ij}.\end{array}\right. (2.8)

Now, let us define the finite element discretization of (2.8). First we generate a shape regular decomposition 𝒯h\mathcal{T}_{h} of the computing domain Ω\Omega. Then, based on the mesh 𝒯h\mathcal{T}_{h}, we construct the linear finite element space denoted by ShH01(Ω)S_{h}\subset H_{0}^{1}(\Omega). Define Vh=(Sh)NV_{h}=(S_{h})^{N}\subset\mathcal{H}. Then the discrete form of (2.8) can be described as follows: Find (Λ¯h,Φ¯h)N×Vh(\bar{\Lambda}_{h},\bar{\Phi}_{h})\in\mathbb{R}^{N}\times V_{h} such that

{(HΨ¯hψ¯i,h,v)=λ¯i,h(ψ¯i,h,v),vSh,i=1,,N,Ωψ¯i,hψ¯j,h𝑑x=δij,\left\{\begin{array}[]{l}(H_{\bar{\Psi}_{h}}\bar{\psi}_{i,h},v)=\bar{\lambda}_{i,h}(\bar{\psi}_{i,h},v),\quad\forall v\in S_{h},\quad i=1,\cdots,N,\\ \\ \displaystyle\int_{\Omega}\bar{\psi}_{i,h}\bar{\psi}_{j,h}dx=\delta_{ij},\end{array}\right. (2.9)

with λ¯i,h=(HΨ¯hψ¯i,h,ψ¯i,h)\bar{\lambda}_{i,h}=(H_{\bar{\Psi}_{h}}\bar{\psi}_{i,h},\bar{\psi}_{i,h}).

For simplicity and generality, some assumptions are given for the error analysis of the proposed algorithm in this paper. We would like to mention that the following assumptions are satisfied by many practical physical models. For detail of the assumptions, please refer to [9, 10, 14, 15].

  • Assumption A: |Vxc(t)|+|tVxc(t)|𝒫(p1,(c1,c2))|V_{xc}(t)|+|tV_{xc}^{\prime}(t)|\in\mathcal{P}(p_{1},(c_{1},c_{2})) for some p1[0,2]p_{1}\in[0,2], where 𝒫(p,(c1,c2))\mathcal{P}\big{(}p,(c_{1},c_{2})\big{)} denotes the following function set:

    𝒫(p,(c1,c2))={f:a1,a2 such that c1tp+a1f(t)c2tp+a2,t0}\displaystyle\mathcal{P}(p,(c_{1},c_{2}))=\Big{\{}f:\exists a_{1},a_{2}\in\mathbb{R}\text{ such that }c_{1}t^{p}+a_{1}\leq f(t)\leq c_{2}t^{p}+a_{2},\ \forall t\geq 0\Big{\}} (2.10)

    with c1c_{1}\in\mathbb{R} and c2c_{2}, p[0,)p\in[0,\infty).

  • Assumption B: There exists a constant α(0,1]\alpha\in(0,1] such that |Vxc(t)|+|tVxc′′(t)|1+tα1|V_{xc}^{\prime}(t)|+|tV_{xc}^{\prime\prime}(t)|\lesssim 1+t^{\alpha-1}.

  • Assumption C: Let (Λ,Ψ)(\Lambda,\Psi) be a solution of (2.8). When the mesh size hh is small enough, the discrete solution (Λ¯h,Ψ¯h)N×Vh(\bar{\Lambda}_{h},\bar{\Psi}_{h})\in\mathbb{R}^{N}\times V_{h} satisfies the following estimate

    ΨΨ¯h1\displaystyle\|\Psi-\bar{\Psi}_{h}\|_{1} \displaystyle\lesssim δh(Ψ),\displaystyle\delta_{h}(\Psi), (2.11)
    ΨΨ¯h0+|ΛΛ¯h|\displaystyle\|\Psi-\bar{\Psi}_{h}\|_{0}+|\Lambda-\bar{\Lambda}_{h}| \displaystyle\lesssim r(Vh)ΨΨ¯h1,\displaystyle r(V_{h})\|\Psi-\bar{\Psi}_{h}\|_{1}, (2.12)

    where r(Vh)1r(V_{h})\ll 1 and

    δh(Ψ):=infΦVhΨΦ1.\delta_{h}(\Psi):=\inf\limits_{\Phi\in V_{h}}\|\Psi-\Phi\|_{1}.

3 Nonnested augmented subspace method for Kohn-Sham equation

In this section, we design the nonnested augmented subspace method for Kohn-Sham equation based on the moving mesh adaptive technique and the augmented subspace method. In the first two subsections, we introduce some computing techniques including the solving process for exchange-correlation potential and Hartree potential, and the detailed process of moving mesh technique. Then next, we combine these techniques to generate the nonnested augmented subspace method for Kohn-Sham equation.

3.1 The calculation of exchange-correlation potential and Hartree potential

The Kohn-Sham equation contains two nonlinear terms: the Hartree potential and the exchange-correlation potential. In this subsection, we introduce the detailed form for exchange-correlation potential and the solving process for Hartree potential.

Since there is no exact expression for the exchange-correlation potential, we use the local density approximation (LDA) in our numerical simulations. The exchange-correlation potential can be treated as the variational derivative of the exchange-correlation energy to the density function Vxc=δExcLDA/δρV_{xc}=\delta E_{xc}^{LDA}/\delta\rho. The exchange-correlation energy ExcLDAE_{xc}^{LDA} is divided into two parts: exchange energy ExLDAE_{x}^{LDA} and correlation energy EcLDAE_{c}^{LDA}, that is ExcLDA=ExLDA+EcLDAE_{xc}^{LDA}=E_{x}^{LDA}+E_{c}^{LDA}. For the exchange energy, we use the following approximate form given by Kohn and Sham in [30]:

ExLDA(ρ)=34(3π)1/3Ωρ(x)4/3𝑑Ω,\displaystyle E_{x}^{LDA}(\rho)=-\displaystyle\frac{3}{4}\left(\displaystyle\frac{3}{\pi}\right)^{1/3}\int_{\Omega}\rho(x)^{4/3}d\Omega, (3.1)

with the exchange-correlation potential

VxLDA(ρ)=(3ρπ)1/3.\displaystyle V_{x}^{LDA}(\rho)=-\left(\displaystyle\frac{3\rho}{\pi}\right)^{1/3}. (3.2)

For the relatively complex correlation energy and correlation potential, we use the expression proposed by Perdew and Zunger in [44]. The correlation energy per electron is:

εcLDA={Alnrs+B+Crslnrs+Drs,ifrs<1,γ(1+β1rs+β2rs),ifrs1.\varepsilon_{c}^{LDA}=\left\{\begin{array}[]{l}\ A\text{ln}r_{s}+B+Cr_{s}\text{ln}r_{s}+Dr_{s},\ \ \ \ \text{if}\ \ r_{s}<1,\\ \\ \displaystyle\frac{\gamma}{(1+\beta_{1}\sqrt{r_{s}}+\beta_{2}r_{s})},\ \ \ \text{if}\ \ r_{s}\geq 1.\end{array}\right.

The corresponding correlation potential is

VcLDA(ρ)={Alnrs+(B13A)+23Crslnrs+13(2DC)rs,ifrs<1,εcLDA1+76β1rs+43β2rs(1+β1rs+β2rs),ifrs1V_{c}^{LDA}(\rho)=\left\{\begin{array}[]{l}\ A\text{ln}r_{s}+(B-\displaystyle\frac{1}{3}A)+\displaystyle\frac{2}{3}Cr_{s}\text{ln}r_{s}+\displaystyle\frac{1}{3}(2D-C)r_{s},\ \ \ \ \text{if}\ \ r_{s}<1,\\ \\ \displaystyle\varepsilon_{c}^{LDA}\displaystyle\frac{1+\displaystyle\frac{7}{6}\beta_{1}\sqrt{r_{s}}+\displaystyle\frac{4}{3}\beta_{2}r_{s}}{(1+\beta_{1}\sqrt{r_{s}}+\beta_{2}r_{s})},\ \ \ \text{if}\ \ r_{s}\geq 1\end{array}\right. (3.3)

with rs=(3/(4πρ))1/3,A=0.0311,B=0.048,γ=0.1423,β1=1.0529,β2=0.3334,C=0.0020,D=0.0116r_{s}=(3/(4\pi\rho))^{1/3},A=0.0311,B=-0.048,\gamma=-0.1423,\beta_{1}=1.0529,\beta_{2}=0.3334,C=0.0020,D=-0.0116.

The ground state energy of the molecular system can be calculated through:

E=i=1NλiΩ(12VHartree+Vxc)ρ(x)𝑑Ω+Exc+Enn.\displaystyle E=\sum_{i=1}^{N}\lambda_{i}-\int_{\Omega}\left(\displaystyle\frac{1}{2}V_{Hartree}+V_{xc}\right)\rho(x)d\Omega+E_{xc}+E_{nn}. (3.4)

The last term EnnE_{nn} accounts for the interactions between the nuclei:

Enn=1k<jMZjZk|xjxk|.\displaystyle E_{nn}=\sum_{1\leq k<j\leq M}\displaystyle\frac{Z_{j}Z_{k}}{|x_{j}-x_{k}|}. (3.5)

Next, we introduce the solving process for Hartree potential VHarV_{Har}, which is computed by solving the following Poisson equation:

{ΔVHar=4πρ,inΩ,VHar=wD,onΩ.\left\{\begin{array}[]{l}-\Delta V_{Har}=4\pi\rho,\ \ \text{in}\ \Omega,\\ \\ V_{Har}=w_{D},\ \ \ \ \ \ \ \ \text{on}\ \partial\Omega.\end{array}\right. (3.6)

Because the Hartree potential decays with the rate N/rN/r, where NN is the electron number, the simple use of zero Dirichlet boundary condition will introduce large truncation error on the boundary. To give the evaluation of the Hartree potential on the boundary, a multipole expansion approximation is employed for the boundary values. In our numerical simulations, the following approximation is used:

wD=w|Ω1|𝐱𝐱′′|Ωρ(𝐱)𝑑𝐱+i=1,2,3pixix′′,i|𝐱𝐱′′|𝟑+i,j=1,2,3qi,j3(xix′′,i)(xjx′′,j)δi,j|𝐱𝐱′′|𝟐|𝐱𝐱′′|𝟓,w_{D}=w|_{\partial\Omega}\approx\displaystyle\frac{1}{|\bf x-x^{\prime\prime}|}\int_{\Omega}\rho({\bf x^{\prime}})d{\bf x^{\prime}}+\sum_{i=1,2,3}p_{i}\cdot\displaystyle\frac{x^{i}-x^{\prime\prime,i}}{|\bf x-x^{\prime\prime}|^{3}}+\sum_{i,j=1,2,3}q_{i,j}\displaystyle\frac{3(x^{i}-x^{\prime\prime,i})(x^{j}-x^{\prime\prime,j})-\delta_{i,j}|\bf x-x^{\prime\prime}|^{2}}{|\bf x-x^{\prime\prime}|^{5}}, (3.7)

where

pi=Ωρ(𝐱)(xix′′,i)𝑑𝐱,qi,j=Ωρ(𝐱)(xix′′,i)(xjx′′,j)𝑑𝐱.\displaystyle p_{i}=\int_{\Omega}\rho({\bf x^{\prime}})(x^{\prime i}-x^{\prime\prime,i})d{\bf x^{\prime}},\ \ \ \ \ \ q_{i,j}=\int_{\Omega}\rho({\bf x^{\prime}})(x^{\prime i}-x^{\prime\prime,i})(x^{\prime j}-x^{\prime\prime,j})d{\bf x^{\prime}}.

In the above expressions, 𝐱′′{\bf x^{\prime\prime}} is chosen as 𝐱′′=Ω𝐱ρ(𝐱)𝑑𝐱/Ωρ(𝐱)𝑑𝐱{\bf x^{\prime\prime}}=\int_{\Omega}{\bf x}\rho({\bf x})d{\bf x}\big{/}\int_{\Omega}\rho({\bf x})d{\bf x}.

3.2 Moving mesh adaptive technique

The adaptive methods mainly include hh-adaptive method, pp-adaptive method and rr-adaptive method. The hh-adaptive method uses a posteriori error indicator for local refinement, pp-adaptive method uses higher-order polynomials on local mesh elements, rr-adaptive method uses control function or metric tensor (also known as metric matrix) for mesh redistribution. In this subsection, we introduce the detailed process for the rr-adaptive method which is used for mesh adaptive refinement in this paper.

The moving mesh adaptive (rr-adaptive) software packages mostly control mesh movement based on the control function or metric tensor. Some well-known finite element software packages such as AFEPack [18, 31, 32] are based on the control function. Other software packages such as BAMG [24], Mshmet and Mmg [17, 20] are based on metric tensor. Essentially, the control function and the measurement matrix are consistent. From mathematical point of view, they differ only by a constant factor. From the way of controlling the movement of the grid points, the control function is based on the error equal distribution principle, and the measurement matrix is based on the unit volume principle (BAMG) or the unit edge principle (mshmet and Mmg). Here, we use the three-dimensional anisotropic adaptive software Mshmet and Mmg3d (three-dimensional module in Mmg) based on the MM-unit side length principle, in which the measurement used is the correction of the Hessian matrix Hu(z)H_{u}(z) of the given adaptive function uu at the grid node zz. The detailed form is as follows:

(z)=RΛ~R1,\displaystyle\mathcal{M}(z)=R\widetilde{\Lambda}R^{-1}, (3.8)

where zz denotes the location of the grid node, RR denotes an orthogonal matrix composed of the orthogonal eigenfunctions of the Hessian matrix Hu(z)H_{u}(z), Λ~\widetilde{\Lambda} is defined by

Λ~:=(λ~1λ~2λ~n).\widetilde{\Lambda}:=\left(\begin{array}[]{cccc}\widetilde{\lambda}_{1}&&&\\ &\widetilde{\lambda}_{2}&&\\ &&\ddots&\\ &&&\widetilde{\lambda}_{n}\end{array}\right). (3.9)

To guarantee the positive definite of the measurement matrix, λ~i\widetilde{\lambda}_{i} is set to be

λ~i=min(max(Cd|λi|ε,1hmax2),1hmin2),\displaystyle\widetilde{\lambda}_{i}=\min\left(\max\Big{(}\displaystyle\frac{C_{d}|\lambda_{i}|}{\varepsilon},\displaystyle\frac{1}{h_{\max}^{2}}\Big{)},\displaystyle\frac{1}{h_{\min}^{2}}\right), (3.10)

where ε\varepsilon is used to control the P1P_{1}-interpolation error in the sense of LL^{\infty}-norm, λi\lambda_{i} denotes the eigenvalue of the Hessian matrix Hu(z)H_{u}(z), hmaxh_{max} and hminh_{min} represent the upper limit of the longest edge scale and the lower limit of the shortest edge scale, respectively. In addition, the coefficient CdC_{d} is selected based on the following LL^{\infty}-error estimate (see [2]):

Lemma 3.1.

Let KK be a mesh element (d-dimensional simplex) of mesh 𝒯h\mathcal{T}_{h}, EKE_{K} is a set of all edges on KK, and uu is a quadratic differentiable function. Then, we have the following LL^{\infty}-interpolation error estimate

uΠhu,KCdmax𝐲Kmax𝐞Ek𝐞T|Hu(𝐲)|𝐞,K𝒯h,\displaystyle\|u-\Pi_{h}u\|_{\infty,K}\leq C_{d}\max_{{\bf y}\in K}\max_{{\bf e}\in E_{k}}{\bf e}^{T}|H_{u}({\bf y})|{\bf e},\ \ \ \forall K\in\mathcal{T}_{h}, (3.11)

where

Cd=12(dd+1)2,|Hu|:=R|Λ|R1,\displaystyle C_{d}=\displaystyle\frac{1}{2}\left(\displaystyle\frac{d}{d+1}\right)^{2},\ \ |H_{u}|:=R|\Lambda|R^{-1}, (3.12)

with |Λ|:=diag{|λ1|,|λ2|,,|λn|}|\Lambda|:=diag\{|\lambda_{1}|,|\lambda_{2}|,\cdots,|\lambda_{n}|\}.

The computation of the right term of (3.11) is nontrivial. Thus, we first assume that there exists a measurement ¯(K)\overline{\mathcal{M}}(K), such that

max𝐲K𝐞T|Hu(𝐲)|𝐞𝐞T¯(K)𝐞,𝐞Ek.\displaystyle\max_{{\bf y}\in K}{\bf e}^{T}|H_{u}({\bf y})|{\bf e}\leq{\bf e}^{T}\overline{\mathcal{M}}(K){\bf e},\quad\forall{\bf e}\in E_{k}. (3.13)

To derive uΠhu,Kε\|u-\Pi_{h}u\|_{\infty,K}\leq\varepsilon, it is sufficient to require that

Cd𝐞T¯(K)𝐞=ε,𝐞Ek,orCdmax𝐞Ek𝐞T¯(K)𝐞=ε.\displaystyle C_{d}{\bf e}^{T}\overline{\mathcal{M}}(K){\bf e}=\varepsilon,\quad\forall{\bf e}\in E_{k},\ \ \text{or}\ \ C_{d}\max_{{\bf e}\in E_{k}}{\bf e}^{T}\overline{\mathcal{M}}(K){\bf e}=\varepsilon. (3.14)

By defining the measurement :=(Cd/ε)¯\mathcal{M}:=(C_{d}/\varepsilon)\overline{\mathcal{M}}, and based on (3.14), we know the measurement satisfies the following \mathcal{M}-unit edge length principle

𝐞T(K)𝐞=1,𝐞Ek.\displaystyle{\bf e}^{T}\mathcal{M}(K){\bf e}=1,\quad\forall{\bf e}\in E_{k}. (3.15)

That is, the length of side 𝐞{\bf e} of element KK under \mathcal{M} is 1, which is denoted by

(K)(𝐞)=1,𝐞Ek.\displaystyle\ell_{\mathcal{M}(K)}({\bf e})=1,\quad\forall{\bf e}\in E_{k}. (3.16)

In the actual calculation, \mathcal{M} can be determined by (3.8)-(3.10). In fact, in the software package Mshmet, we only need to adjust the parameters err(ε)(\varepsilon), hmin(hmin)(h_{min}), hmax(hmax)(h_{max}) to control the edge length of mesh elements. For more detailed introduction to the metric based adaptive mesh using the MM-unit edge length principle, please refer to [2, 20]. For more discussion on metric matrices and control functions, please refer to [19, 53, 54].

Next, we introduce a fast interpolation algorithm between two nonnested meshes. Let Ω0\Omega_{0} and Ω1\Omega_{1} be two different computing domains, 𝒯h(0)=iKi(0)\mathcal{T}_{h}^{(0)}=\cup_{i}K_{i}^{(0)} and 𝒯h(1)=iKi(1)\mathcal{T}_{h}^{(1)}=\cup_{i}K_{i}^{(1)} be the corresponding mesh decompositions on these two domains, respectively. The two decompositions are nonnested. Then, we briefly introduce the fast interpolation algorithm proposed by the FreeFEM team to deal with nonnested meshes [23].

Let Vh():={vC0(𝒯h())|v|Ki()P1},=0,1,V_{h}^{(\ell)}:=\big{\{}v\in C^{0}(\mathcal{T}_{h}^{(\ell)})\big{|}\ v|_{{K_{i}}^{(\ell)}}\in P_{1}\big{\}},\ \ell=0,1, be the finite element space defined on 𝒯h(0)\mathcal{T}_{h}^{(0)} and 𝒯h(1)\mathcal{T}_{h}^{(1)}. For fVh(0)f\in V_{h}^{(0)}, the problem is to find gVh(1)g\in V_{h}^{(1)} such that:

g(q)=f(q), vertex q of 𝒯h(1).\displaystyle g(q)=f(q),\quad\forall\text{ vertex }q\text{ of }\mathcal{T}_{h}^{(1)}. (3.17)

A fast interpolation algorithm is proposed in [23] which is of complexity 𝒪(N1lnN0)\mathcal{O}(N_{1}{\rm{ln}}N_{0}), where N0N_{0} is the number of vertices of 𝒯h(0)\mathcal{T}_{h}^{(0)}, N1N_{1} is the number of vertices of 𝒯h(1)\mathcal{T}_{h}^{(1)}. The detailed process is presented in Algorithm 1.

Data: First a quadtree is built containing all the vertices of the mesh 𝒯h(0)\mathcal{T}_{h}^{(0)} such that in each terminal element there are at least one, and at most 2d2^{d} vertices.
1
Result: g(q1)g(q^{1})
2
3for each vertex q1q^{1} in 𝒯h(1)\mathcal{T}_{h}^{(1)} do
4      Find the terminal cell of the quadtree containing q1q^{1};
5      Find the the nearest vertex qj0q_{j}^{0} to q1q^{1} in that cell;
6      Choose one triangle Ki(0)𝒯h(0)K_{i}^{(0)}\in\mathcal{T}_{h}^{(0)} which has qj0q_{j}^{0} for vertex;
7      Compute the barycentric coordinates {λj}j=1d+1\{\lambda_{j}\}_{j=1}^{d+1} of q1q^{1} in Ki(0)K_{i}^{(0)};
8      while Not all barycentric coordinates are positive do
9          
10          if One barycentric coordinate λi\lambda_{i} is negative then
11                replace Ki(0)K_{i}^{(0)} by the adjacent triangle opposite qi0q_{i}^{0}
12                else if two barycentric coordinates are negative then
13                     take one of the two randomly and replace Ki(0)K_{i}^{(0)} by the adjacent triangle as above
14                     end if
15                    Compute the barycentric coordinates {λj}j=1d+1\{\lambda_{j}\}_{j=1}^{d+1} of q1q^{1} in Ki(0)K_{i}^{(0)};
16                    
17                     end while
18                    Calculate g(q1)g(q^{1}) on Ki(0)K_{i}^{(0)} by linear interpolation of ff: g(q1)=j=1d+1λjf(qj(0))g(q^{1})=\sum_{j=1}^{d+1}\lambda_{j}f(q_{j}^{(0)});
19                    
20                     end for
Algorithm 1 Fast interpolation algorithm in FreeFEM

3.3 Nonnested augmented subspace method for Kohn-Sham equation

In this subsection, we introduce the nonnested augmented subspace algorithm for Kohn-Sham equation. To simplify the description, we define a nonlinear operator which is composed of the Kohn-Sham Hamiltonian operator and a positive constant:

H~Ψ=12Δ+Vext+μ+VHar(ρΨ)+Vxc(ρΨ),ΨV,\displaystyle\widetilde{H}_{\Psi}=-\displaystyle\frac{1}{2}\Delta+V_{ext}+\mu+V_{Har}(\rho_{\Psi})+V_{xc}(\rho_{\Psi}),\quad\forall\Psi\in V, (3.18)

where μ\mu is a positive constant that can be used to guarantee the coercive property.

The essence of the nonnested augmented method is to transform the solution of the Kohn-Sham equation on the fine mesh into solving the linear boundary value problems of the same scale and solving a small-scale Kohn-Sham equation in a low-dimensional subspace. In order to describe the nonnested augmented subspace algorithm, we generate a coarse mesh 𝒯H\mathcal{T}_{H} and corresponding linear finite element space SHS_{H}. The traditional multilevel correction method requires the multilevel finite element space sequence satisfies the nested relationship

𝒯H𝒯h1𝒯hN, and SHSh1ShN.\displaystyle\mathcal{T}_{H}\subset\mathcal{T}_{h_{1}}\subset\cdots\subset\mathcal{T}_{h_{N}},\text{ and }S_{H}\subset S_{h_{1}}\subset\cdots\subset S_{h_{N}}. (3.19)

The nonnested augmented subspace method presented in this paper does not require the mesh and finite element space to meet the above nested property, which guarantees that the augmented subspace method can be used in moving mesh sequence. In Algorithm 2, the flowchart of the moving mesh adaptive algorithm for the Kohn-Sham equation is given.

Data: A given electronic structure, and the initial guess of the ground state
Result: Ground state of the given electronic structure
1
2Give Kasm,KmaxK_{asm},K_{max}\in\mathbb{N} with Kasm<KmaxK_{asm}<K_{max}, tol+tol\in\mathbb{R}^{+}, and let k=0k=0;
3 repeat
4      Using the standard self-consistent field iteration method to solve the problem: Find (Λhk,Ψhk)×Vhk(\Lambda_{h_{k}},\Psi_{h_{k}})\in\mathbb{R}\times V_{h_{k}}, such that
{(HΨhkψi,hk,vhk)=λi,hk(ψi,hk,vhk),vhkShk,i=1,,N,Ωψi,hkψj,hk𝑑x=δij.\left\{\begin{array}[]{rcl}(H_{\Psi_{h_{k}}}\psi_{i,h_{k}},v_{h_{k}})&=&\lambda_{i,h_{k}}(\psi_{i,h_{k}},v_{h_{k}}),\quad\forall v_{h_{k}}\in S_{h_{k}},\ i=1,\cdots,N,\\ \int_{\Omega}\psi_{i,h_{k}}\psi_{j,h_{k}}dx&=&\delta_{ij}.\end{array}\right. (3.20)
5     Move the mesh grids according to the measurement (3.8) by using ρhk\sqrt{\rho_{h_{k}}} as the adaptive function;
6      Update the mesh from 𝒯hk\mathcal{T}_{h_{k}} to 𝒯hk+1\mathcal{T}_{h_{k+1}} and interpolate the wavefunctions into the new mesh;
7      k=k+1k=k+1;
8     
9      until k>Kasmk>K_{asm} or ΔE/E<tol\Delta E/E<tol;
10     while k<Kmaxk<K_{max} and ΔE/E>tol\Delta E/E>tol do
11           Using Algorithm 3 to solve the above problem (3.20);
12           Move the mesh grids according to the measurement (3.8) by using ρhk\sqrt{\rho_{h_{k}}} as the adaptive function;
13           Update the mesh from 𝒯hk\mathcal{T}_{h_{k}} to 𝒯hk+1\mathcal{T}_{h_{k+1}} and interpolate the wavefunctions into the new mesh;
14           k=k+1k=k+1;
15          
16           end while
17          
Algorithm 2 Moving mesh adaptive algorithm for Kohn-Sham equation

Next, we introduce the an augmented subspace method to solve the Kohn-Sham equation (3.20), which transforms the large-scale nonlinear eigenvalue problem into some linear boundary value problems of the same scale and small-scale Kohn-Sham equations defined in a low-dimensional augmented subspace. Through the augmented subspace method, the total computational work is asymptotically optimal since the dimension of the augmented subspace is small and fixed. The detailed process is described in Algorithm 3.

Data: The initial value (Λhk(0),Ψhk(0))(\Lambda_{h_{k}}^{(0)},\Psi_{h_{k}}^{(0)})
Result: The ground state (Λhk(),Ψhk())(\Lambda_{h_{k}}^{(\ell)},\Psi_{h_{k}}^{(\ell)})
1 Give KmaxK_{max}\in\mathbb{N}, and tol+tol\in\mathbb{R}^{+}, and let =0\ell=0;
2 repeat
3      Solve the following NN problems: Find ψ^i,hk(+1)Shk\widehat{\psi}_{i,h_{k}}^{(\ell+1)}\in S_{h_{k}} such that
(H~Ψhk()ψ^i,hk(+1),vhk)=(λi,hk()+μ)(ψi,hk(),vhk),vhkShk,i=1,,N.\displaystyle\begin{array}[]{rcr}\left(\widetilde{H}_{\Psi_{h_{k}}^{(\ell)}}\widehat{\psi}_{i,h_{k}}^{(\ell+1)},v_{h_{k}}\right)=\left(\lambda_{i,h_{k}}^{(\ell)}+\mu\right)(\psi_{i,h_{k}}^{(\ell)},v_{h_{k}}),\ \ \ \forall v_{h_{k}}\in S_{h_{k}},\ i=1,\cdots,N.\end{array} (3.22)
4     Solve the following small-scale Kohn-Sham equation in an augmented subspace SH,hk=SH+span{Ψ^hk(+1)}S_{H,h_{k}}=S_{H}+{\rm span}\{\widehat{\Psi}_{h_{k}}^{(\ell+1)}\}: Find (λi,hk(+1),ψi,hk(+1))×SH,hk(\lambda_{i,h_{k}}^{(\ell+1)},\psi_{i,h_{k}}^{(\ell+1)})\in\mathbb{R}\times S_{H,h_{k}} such that
(HΨhk(+1)ψi,hk(+1),vhk)=λi,hk(+1)(ψi,hk(+1),vhk),vhkShk,i=1,,N,\displaystyle\begin{array}[]{rcr}&&\left(H_{\Psi_{h_{k}}^{(\ell+1)}}\psi_{i,h_{k}}^{(\ell+1)},v_{h_{k}}\right)=\lambda_{i,h_{k}}^{(\ell+1)}(\psi_{i,h_{k}}^{(\ell+1)},v_{h_{k}}),\ \ \ \forall v_{h_{k}}\in S_{h_{k}},\ i=1,\cdots,N,\end{array} (3.24)
to get the new approximate eigenpair (Λhk(+1),Ψhk(+1))(\Lambda_{h_{k}}^{(\ell+1)},\Psi_{h_{k}}^{(\ell+1)});
5      Update the density function ρhk(+1)=i=1Nψi,hk(+1)\rho_{h_{k}}^{(\ell+1)}=\sum_{i=1}^{N}\psi_{i,h_{k}}^{(\ell+1)};
6      Let =+1\ell=\ell+1;
7     
8      until ρhk()ρhk(1)0<tol\|\rho_{h_{k}}^{(\ell)}-\rho_{h_{k}}^{(\ell-1)}\|_{0}<tol or k>Kmaxk>K_{max};
Algorithm 3 Augmented subspace method for Kohn-Sham equation

From Algorithm 3, we can find that the Kohn-Sham equation (3.24) is defined in a low-dimensional space SH,hkS_{H,h_{k}}, thus a small-scale linear eigenvalue problem is needed to be solved in each nonlinear iteration step, which requires little computational work. But the augmented subspace SH,hkS_{H,h_{k}} includes the basis functions Ψ^hk(+1)\widehat{\Psi}_{h_{k}}^{(\ell+1)} derived from the fine mesh 𝒯hk\mathcal{T}_{h_{k}}, so the matrices assembling should be performed on the fine mesh to keep the accuracy.

Next, we introduce the detailed process for solving the small-scale Kohn-Sham equation (3.24) in SH,hkS_{H,{h_{k}}}. For simplicity, we use hh, VhV_{h}, ψ^i,h\widehat{\psi}_{i,h} to denote hkh_{k}, VhkV_{h_{k}}, ψ^i,hk(+1)\widehat{\psi}_{i,h_{k}}^{(\ell+1)}, respectively. Define NH:=dimSHN_{H}:=\text{dim}S_{H} and Nk:=dimShkN_{k}:=\text{dim}S_{h_{k}}. Let {ψj,H}j=1NH\{\psi_{j,H}\}_{j=1}^{N_{H}} be the basis functions for SHS_{H}. When solving (3.24) by iteration method, a linear eigenvalue problem as follows is required to be solved in each iteration step:

FAUH=λhFBUH,\displaystyle F_{A}U_{H}=\lambda_{h}F_{B}U_{H}, (3.25)

where

FA:=(AH𝐛H𝐛HTβ),FB:=(BH𝐜H𝐜HTγ),UH=(𝐮Hα),F_{A}:=\left(\begin{array}[]{cc}A_{H}&{\bf b}_{H}\\ {\bf b}_{H}^{T}&{\bf\beta}\end{array}\right),\ \ F_{B}:=\left(\begin{array}[]{cc}B_{H}&{\bf c}_{H}\\ {\bf c}_{H}^{T}&{\bf\gamma}\end{array}\right),\ \ U_{H}=\left(\begin{array}[]{c}\mathbf{u}_{H}\\ {\bf\alpha}\end{array}\right), (3.26)

with AH,BHNH×NHA_{H},B_{H}\in\mathbb{R}^{N_{H}\times N_{H}}, 𝐛H,𝐜HNH×N{\bf b}_{H},{\bf c}_{H}\in\mathbb{R}^{N_{H}\times N}, β,γN×N\beta,\gamma\in\mathbb{R}^{N\times N}. Here, UH=(𝐮H,α)TU_{H}=(\mathbf{u}_{H},\alpha)^{\rm T} is the eigenvector to be solved in each iteration step, and dimUH=dimVH+N\text{dim}U_{H}=\text{dim}V_{H}+N, NN is the number of eigenpair to be solved. The mass matrix BH=((ϕi,H,ϕj,H)𝒯H)1i,jNHB_{H}=\big{(}(\phi_{i,H},\phi_{j,H})_{\mathcal{T}_{H}}\big{)}_{1\leq i,j\leq N_{H}} remains unchanged during the nonlinear iteration, which can be assembled once at the beginning of Algorithm 3. Hereafter, (,)𝒯(\cdot,\cdot)_{\mathcal{T}} denotes the L2L^{2}-inner product on the mesh 𝒯\mathcal{T}.

For the matrices cH=((ψ^j,h,ψi,H)𝒯h)1iNH,1jNc_{H}=\big{(}(\widehat{\psi}_{j,h},\psi_{i,H})_{\mathcal{T}_{h}}\big{)}_{1\leq i\leq N_{H},1\leq j\leq N} and γ=((ψ^j,h,ψ^i,h)𝒯h)1i,jN\gamma=\big{(}(\widehat{\psi}_{j,h},\widehat{\psi}_{i,h})_{\mathcal{T}_{h}}\big{)}_{1\leq i,j\leq N}, the involved basis functions {ψ^j,h}1jN\{\widehat{\psi}_{j,h}\}_{1\leq j\leq N} are defined on the fine mesh 𝒯h\mathcal{T}_{h}. Thus, to keep the accuracy, these matrices assembling should be performed on the fine mesh 𝒯h\mathcal{T}_{h}. As we can see, the basis functions {ψ^j,h}1jN\{\widehat{\psi}_{j,h}\}_{1\leq j\leq N} remain unchanged during the nonlinear iteration step, thus the matrices cHc_{H} and γ\gamma also can be assembled once at the beginning of Algorithm 3.

It is noted that, based on the above discussion, the mass matrix FBF_{B} only need to be assembled once at the beginning of the nonlinear iteration in Algorithm 3. No updates are required during the iteration.

Next, we discuss the stiffness matrix FAF_{A}. Let us divide the stiffness matrix into linear and nonlinear parts. The linear part AhLA_{h}^{L} is defined by:

(AhL)i,j=12(ψi,h,ψj,h)𝒯h+(Vextψi,h,ψj,h)𝒯h+(μψi,h,ψj,h)𝒯h.\displaystyle(A_{h}^{L})_{i,j}=\displaystyle\frac{1}{2}(\nabla\psi_{i,h},\nabla\psi_{j,h})_{\mathcal{T}_{h}}+(V_{ext}\psi_{i,h},\psi_{j,h})_{\mathcal{T}_{h}}+(\mu\psi_{i,h},\psi_{j,h})_{\mathcal{T}_{h}}. (3.27)

The nonlinear part AhNLA_{h}^{NL} consisting of the Hartree potential and exchange-correlation potential is defined by:

(AhNL)i,j=((VHar+Vxc)ψi,h,ψj,h)𝒯h,\displaystyle(A_{h}^{NL})_{i,j}=((V_{Har}+V_{xc})\psi_{i,h},\psi_{j,h})_{\mathcal{T}_{h}}, (3.28)

where VHarV_{Har} and VxcV_{xc} need to be updated in each nonlinear iteration because they depends on the density function that will be updated after each iteration. Let us define Ah:=AhL+AhNLA_{h}:=A_{h}^{L}+A_{h}^{NL}. Using the interpolation algorithm defined in Algorithm 1. The matrix AHA_{H} involved in FAF_{A} can be calculated in the following way

AH=(IHh)TAhIHh,\displaystyle A_{H}=(I_{H}^{h})^{\rm T}A_{h}I_{H}^{h}, (3.29)

where IHhI_{H}^{h} denotes the interpolate operator from SHS_{H} to ShS_{h} based on Algorithm 1.

The remaining parts bHb_{H} and β\beta can be calculated by:

bH=(IHh)TAhΨ^h\displaystyle b_{H}=(I_{H}^{h})^{\rm T}A_{h}\widehat{\Psi}_{h} (3.30)

and

β=Ψ^hTAhΨ^h.\displaystyle\beta=\widehat{\Psi}_{h}^{\rm T}A_{h}\widehat{\Psi}_{h}. (3.31)
Remark 3.1.

Based on the assembling process (3.25)-(3.31), the main computational work is spent on (3.28) in each nonlinear iteration. Fortunately, the matrix assembling can be performed in parallel since there is no date transfer, and meanwhile the software package used in this paper has an excellent parallel ability [29, 41], thus we assemble the matrix using parallel computing technique.

3.4 Convergence analysis and computational work estimate

In this subsection, we give the convergence analysis and computational complexity estimate for Algorithms 2 and 3. First, we can obtain the following theorem to guarantee the well-posedness of the linear boundary value problems.

Theorem 3.1.

With sufficiently small mesh size, there exists a positive constant μ\mu such that the following coercive property holds true

aμ(ϕ,ϕ)+(VHar(ρΨh)ϕ,ϕ)+(Vxc(ρΨh)ϕ,ϕ)ϕ02,ϕH01(Ω),\displaystyle a_{\mu}(\phi,\phi)+(V_{Har}(\rho_{\Psi_{h}})\phi,\phi)+(V_{xc}(\rho_{\Psi_{h}})\phi,\phi)\gtrsim\|\nabla\phi\|_{0}^{2},\quad\forall\phi\in H_{0}^{1}(\Omega), (3.32)

where

aμ(ϕ,ϕ)=12(ϕ,ϕ)+(Vextϕ,ϕ)+μ(ϕ,ϕ).\displaystyle a_{\mu}(\phi,\phi)=\displaystyle\frac{1}{2}(\nabla\phi,\nabla\phi)+(V_{ext}\phi,\phi)+\mu(\phi,\phi). (3.33)
Proof.

For the Coulomb potential Vext=k=1MZk/|xRk|V_{ext}=-\sum_{k=1}^{M}Z_{k}/|x-R_{k}|, using the following uncertainty principle lemma [45]:

Ωw2(x)|x|2𝑑x4Ω|w|2𝑑x,wH01(Ω),\displaystyle\int_{\Omega}\displaystyle\frac{w^{2}(x)}{|x|^{2}}dx\leq 4\int_{\Omega}|\nabla w|^{2}dx,\quad\forall w\in H_{0}^{1}(\Omega), (3.34)

we obtain

(Vextϕ,ϕ)\displaystyle(V_{ext}\phi,\phi) \displaystyle\leq (Ω(k=1MZkϕ|xRk|)2𝑑x)1/2ϕ0\displaystyle\left(\int_{\Omega}\Big{(}\sum\limits_{k=1}^{M}\displaystyle\frac{Z_{k}\phi}{|x-R_{k}|}\Big{)}^{2}dx\right)^{1/2}\|\phi\|_{0} (3.35)
\displaystyle\leq (Ω(k=1MZK2)(k=1Mϕ2|xRk|2)𝑑x)1/2ϕ0\displaystyle\left(\int_{\Omega}\Big{(}\sum\limits_{k=1}^{M}Z_{K}^{2}\Big{)}\Big{(}\sum\limits_{k=1}^{M}\displaystyle\frac{\phi^{2}}{|x-R_{k}|^{2}}\Big{)}dx\right)^{1/2}\|\phi\|_{0}
\displaystyle\leq 2M(k=1MZK2)1/2ϕ0ϕ0\displaystyle 2\sqrt{M}\left(\sum\limits_{k=1}^{M}Z_{K}^{2}\right)^{1/2}\|\nabla\phi\|_{0}\|\phi\|_{0}
\displaystyle\leq 18ϕ02+8M(k=1MZK2)ϕ02.\displaystyle\displaystyle\frac{1}{8}\|\nabla\phi\|_{0}^{2}+8M\left(\sum\limits_{k=1}^{M}Z_{K}^{2}\right)\|\phi\|_{0}^{2}.

For the Hartree potential, using (3.34) and Hölder inequality, we have

(VHar(ρΨh)ψ,ψ)\displaystyle(V_{Har}(\rho_{\Psi_{h}})\psi,\psi) \displaystyle\leq r1ρΨh0,ϕ0ϕ0\displaystyle\|r^{-1}\ast\rho_{\Psi_{h}}\|_{0,\infty}\|\phi\|_{0}\|\phi\|_{0} (3.36)
\displaystyle\leq 2Ψh0Ψh0ϕ0ϕ0\displaystyle 2\|\nabla\Psi_{h}\|_{0}\|\Psi_{h}\|_{0}\|\nabla\phi\|_{0}\|\phi\|_{0}
\displaystyle\leq 18ϕ02+8Ψh02Φh02ϕ02.\displaystyle\displaystyle\frac{1}{8}\|\nabla\phi\|_{0}^{2}+8\|\nabla\Psi_{h}\|_{0}^{2}\|\Phi_{h}\|_{0}^{2}\|\phi\|_{0}^{2}.

For the exchange-correlation potential, we have

(Vxc(ρΨh)ϕ,ϕ)\displaystyle(V_{xc}(\rho_{\Psi_{h}})\phi,\phi) =\displaystyle= ((Vxc(ρΨh)Vxc(0))ϕ,ϕ)+(Vxc(0)ϕ,ϕ).\displaystyle((V_{xc}(\rho_{\Psi_{h}})-V_{xc}(0))\phi,\phi)+(V_{xc}(0)\phi,\phi). (3.37)

From Assumption A, we have |Vxc(0)|a2|V_{xc}(0)|\leq a_{2}. For the first part of (3.37), the following estimate holds

Vxc(ρΨh)Vxc(0)\displaystyle V_{xc}(\rho_{\Psi_{h}})-V_{xc}(0) =\displaystyle= 2i=1NVxc(ρΨε)ψε,iψi\displaystyle 2\sum_{i=1}^{N}V_{xc}^{\prime}(\rho_{\Psi_{\varepsilon}})\psi_{\varepsilon,i}\psi_{i} (3.38)

with ψε,i=θψi,h+(1θ)0=θψi,h\psi_{\varepsilon,i}=\theta\psi_{i,h}+(1-\theta)0=\theta\psi_{i,h} and θ[0,1]\theta\in[0,1]. Using Assumption B, we can further derive

Vxc(ρΨh)Vxc(0)\displaystyle V_{xc}(\rho_{\Psi_{h}})-V_{xc}(0) \displaystyle\leq 2(1+(i=1Nψε,i2)α1)i=1Nψε,iψi,h\displaystyle 2\left(1+\left(\sum_{i=1}^{N}\psi_{\varepsilon,i}^{2}\right)^{\alpha-1}\right)\sum_{i=1}^{N}\psi_{\varepsilon,i}\psi_{i,h} (3.39)
=\displaystyle= 2(1+(i=1N(θψi,h)2)α1)i=1Nθψi,h22ρΨh+2ρΨhα.\displaystyle 2\left(1+\left(\sum_{i=1}^{N}(\theta\psi_{i,h})^{2}\right)^{\alpha-1}\right)\sum_{i=1}^{N}\theta\psi_{i,h}^{2}\leq 2\rho_{\Psi_{h}}+2\rho_{\Psi_{h}}^{\alpha}.

Inserting (3.39) into (3.37) and using Holder inequality, we can derive

(Vxc(ρΨh)ϕ,ϕ)2(ρΨhϕ,ϕ)+2(ρΨhαϕ,ϕ)+a2ϕ022ρΨh0,3ϕ0ϕ0,6+2ρΨhα0,3/αϕ0ϕ0,6/(32α)+a2ϕ022Cem(Ψh02+Ψh02α)ϕ0ϕ0+a2ϕ02,18ϕ02+8Cem2(Ψh02+Ψh02α)2ϕ02+a2ϕ02,\begin{array}[]{lll}(V_{xc}(\rho_{\Psi_{h}})\phi,\phi)&\leq&2(\rho_{\Psi_{h}}\phi,\phi)+2(\rho_{\Psi_{h}}^{\alpha}\phi,\phi)+a_{2}\|\phi\|_{0}^{2}\\ &&\\ &\leq&2\|\rho_{\Psi_{h}}\|_{0,3}\|\phi\|_{0}\|\phi\|_{0,6}+2\|\rho_{\Psi_{h}}^{\alpha}\|_{0,3/\alpha}\|\phi\|_{0}\|\phi\|_{0,6/(3-2\alpha)}+a_{2}\|\phi\|_{0}^{2}\\ &&\\ &\leq&2C_{em}(\|\nabla\Psi_{h}\|_{0}^{2}+\|\nabla\Psi_{h}\|_{0}^{2\alpha})\|\phi\|_{0}\|\nabla\phi\|_{0}+a_{2}\|\phi\|_{0}^{2},\\ &&\\ &\leq&\displaystyle\frac{1}{8}\|\nabla\phi\|_{0}^{2}+8C_{em}^{2}(\|\nabla\Psi_{h}\|_{0}^{2}+\|\nabla\Psi_{h}\|_{0}^{2\alpha})^{2}\|\phi\|_{0}^{2}+a_{2}\|\phi\|_{0}^{2},\end{array} (3.40)

where CemC_{em} is the mesh-independent constant involved in embedding theorem H01(Ω)L6(Ω)H_{0}^{1}(\Omega)\hookrightarrow L^{6}(\Omega), when Ω3\Omega\subset\mathbb{R}^{3}.

Combining (3.35), (3.36) and (3.40), the following inequality holds

aμ(ϕ,ϕ)+(VHar(ρΨh)ϕ,ϕ)+(Vxc(ρΨh)ϕ,ϕ)12ϕ02+μϕ0218ϕ0218ϕ0218ϕ028M(k=1MZK2)ϕ028Ψh02Ψh02ϕ028Cem2(Ψh02+Ψh02α)2ϕ02a2ϕ02.\begin{array}[]{l}a_{\mu}(\phi,\phi)+(V_{Har}(\rho_{\Psi_{h}})\phi,\phi)+(V_{xc}(\rho_{\Psi_{h}})\phi,\phi)\\ \hskip 50.00008pt\geq\displaystyle\frac{1}{2}\|\nabla\phi\|_{0}^{2}+\displaystyle\mu\|\phi\|_{0}^{2}-\displaystyle\frac{1}{8}\|\nabla\phi\|_{0}^{2}-\displaystyle\frac{1}{8}\|\nabla\phi\|_{0}^{2}-\displaystyle\frac{1}{8}\|\nabla\phi\|_{0}^{2}-8M\Big{(}\sum\limits_{k=1}^{M}Z_{K}^{2}\Big{)}\|\phi\|_{0}^{2}\\ \hskip 100.00015pt-8\|\nabla\Psi_{h}\|_{0}^{2}\|\Psi_{h}\|_{0}^{2}\|\phi\|_{0}^{2}-8C_{em}^{2}(\|\nabla\Psi_{h}\|_{0}^{2}+\|\nabla\Psi_{h}\|_{0}^{2\alpha})^{2}\|\phi\|_{0}^{2}-a_{2}\|\phi\|_{0}^{2}.\end{array} (3.41)

Then we derive the desired result (3.32) by choosing

μ=8M(k=1MZK2)+8Ψh02Ψh02+8Cem2(Ψh02+Ψh02α)2+a2,\mu=8M\Big{(}\sum\limits_{k=1}^{M}Z_{K}^{2}\Big{)}+8\|\nabla\Psi_{h}\|_{0}^{2}\|\Psi_{h}\|_{0}^{2}+8C_{em}^{2}(\|\nabla\Psi_{h}\|_{0}^{2}+\|\nabla\Psi_{h}\|_{0}^{2\alpha})^{2}+a_{2},

and the proof is completed. ∎

Theorem 3.2.

Under Assumption A-C, the eigenpair approximation (Λhk(+1),Ψhk(+1))(\Lambda_{h_{k}}^{(\ell+1)},\Psi_{h_{k}}^{(\ell+1)}) derived by by Algorithm 3 has following error estimates

ΨΨhk(+1)1|ΛΛhk()|+ΨΨhk()0+ΨhkΨ1,\|\Psi-\Psi_{h_{k}}^{(\ell+1)}\|_{1}\lesssim|\Lambda-\Lambda_{h_{k}}^{(\ell)}|+\|\Psi-\Psi_{h_{k}}^{(\ell)}\|_{0}+\|\Psi-\mathbb{P}_{h_{k}}\Psi\|_{1}, (3.42)
ΨΨhk(+1)0+|ΛΛhk(+1)|r(Vhk)ΨΨhk(+1)1,\|\Psi-\Psi_{h_{k}}^{(\ell+1)}\|_{0}+|\Lambda-\Lambda_{h_{k}}^{(\ell+1)}|\lesssim r(V_{h_{k}})\|\Psi-\Psi_{h_{k}}^{(\ell+1)}\|_{1}, (3.43)

where the projection operator hk:Vhk\mathbb{P}_{h_{k}}:\mathcal{H}\rightarrow V_{h_{k}} is defined by: hk=(Phk)N\mathbb{P}_{h_{k}}=(P_{h_{k}})^{N} and

aμ(Phku,vhk)=aμ(u,vhk),vhkShk,uH01(Ω).\displaystyle a_{\mu}(P_{h_{k}}u,v_{h_{k}})=a_{\mu}(u,v_{h_{k}}),\quad\forall v_{h_{k}}\in S_{h_{k}},\ \forall u\in H_{0}^{1}(\Omega). (3.44)
Proof.

From (2.8) and (3.44), the following equation holds true for i=1,,Ni=1,\cdots,N:

aμ(Phkψi,vhk)=aμ(ψi,vhk)=((λi+μ)ψi,vhk)(VHar(ρΨ)ψi,vhk)(Vxc(ρΨ)ψi,vhk),vhkShk.a_{\mu}(P_{h_{k}}\psi_{i},v_{h_{k}})=a_{\mu}(\psi_{i},v_{h_{k}})=\big{(}(\lambda_{i}+\mu)\psi_{i},v_{h_{k}}\big{)}-\big{(}V_{Har}(\rho_{\Psi})\psi_{i},v_{h_{k}}\big{)}-\big{(}V_{xc}(\rho_{\Psi})\psi_{i},v_{h_{k}}\big{)},\ \forall v_{h_{k}}\in S_{h_{k}}. (3.45)

Then from (3.22) and (3.45), we obtain

aμ(Phkψiψ^i,hk(+1),vhk)+((VHar(ρΨhk())+Vxc(ρΨhk()))(Phkψiψ^i,hk(+1)),vhk)=((λi+μ)ψi(λi,hk()+μ)ψi,hk(),vhk)+(VHar(ρΨhk())Phkψi,vhk)(VHar(ρΨ)ψi,vhk)+(Vxc(ρΨhk())Phkψi,vhk)(Vxc(ρΨ)ψi,vhk),vhkShk.\begin{array}[]{l}a_{\mu}(P_{h_{k}}\psi_{i}-\widehat{\psi}_{i,h_{k}}^{(\ell+1)},v_{h_{k}})+\Big{(}(V_{Har}(\rho_{\Psi_{h_{k}}^{(\ell)}})+V_{xc}(\rho_{\Psi_{h_{k}}^{(\ell)}}))(P_{h_{k}}\psi_{i}-\widehat{\psi}_{i,h_{k}}^{(\ell+1)}),v_{h_{k}}\Big{)}\\ \hskip 20.00003pt=\big{(}(\lambda_{i}+\mu)\psi_{i}-(\lambda_{i,h_{k}}^{(\ell)}+\mu)\psi_{i,h_{k}}^{(\ell)},v_{h_{k}}\big{)}+(V_{Har}(\rho_{\Psi_{h_{k}}^{(\ell)}})P_{h_{k}}\psi_{i},v_{h_{k}})-\big{(}V_{Har}(\rho_{\Psi})\psi_{i},v_{h_{k}}\big{)}\\ \hskip 40.00006pt+\big{(}V_{xc}(\rho_{\Psi_{h_{k}}^{(\ell)}})P_{h_{k}}\psi_{i},v_{h_{k}}\big{)}-\big{(}V_{xc}(\rho_{\Psi})\psi_{i},v_{h_{k}}\big{)},\quad\forall v_{h_{k}}\in S_{h_{k}}.\end{array} (3.46)

Now let us estimate the equation (3.46) termwise. We deduce from triangle inequality that

((λi+μ)ψi(λi,hk()+μ)ψi,hk(),vhk)|λiλi,hk()|ψi0vhk0+(λi,hk()+μ)ψiψi,hk()0vhk0.\big{(}(\lambda_{i}+\mu)\psi_{i}-(\lambda_{i,h_{k}}^{(\ell)}+\mu)\psi_{i,h_{k}}^{(\ell)},v_{h_{k}}\big{)}\lesssim|\lambda_{i}-\lambda_{i,h_{k}}^{(\ell)}|\|\psi_{i}\|_{0}\|v_{h_{k}}\|_{0}+(\lambda_{i,h_{k}}^{(\ell)}+\mu)\|\psi_{i}-\psi_{i,h_{k}}^{(\ell)}\|_{0}\|v_{h_{k}}\|_{0}.

For the Hartree potential, using the uncertain principle lemma, the following inequalities hold

(VHar(ρΨhk())Phkψi,vhk)(VHar(ρΨ)ψi,vhk)=(VHar(ρΨhk())(Phkψiψi),vhk)+((VHar(ρΨhk())VHar(ρΨ))ψi,vhk)=(r1ρΨhk(),(Phkψiψi)vhk)+(r1(ρΨhk()ρΨ),ψivhk)r1ρΨhk()0,Phkψiψi0vhk0+r1(ρΨhk()ρΨ)0,ψi0vhk0Ψhk()0Ψhk()0Phkψiψi0vhk0+Ψhk()Ψ0(Ψhk()+Ψ)0ψi0vhk0.\begin{array}[]{l}\Big{(}V_{Har}(\rho_{\Psi_{h_{k}}^{(\ell)}})P_{h_{k}}\psi_{i},v_{h_{k}}\Big{)}-\Big{(}V_{Har}(\rho_{\Psi})\psi_{i},v_{h_{k}}\Big{)}\\ \hskip 60.00009pt=\Big{(}V_{Har}(\rho_{\Psi_{h_{k}}^{(\ell)}})(P_{h_{k}}\psi_{i}-\psi_{i}),v_{h_{k}}\Big{)}+\Big{(}(V_{Har}(\rho_{\Psi_{h_{k}}^{(\ell)}})-V_{Har}(\rho_{\Psi}))\psi_{i},v_{h_{k}}\Big{)}\\ \hskip 60.00009pt=\big{(}r^{-1}*\rho_{\Psi_{h_{k}}^{(\ell)}},(P_{h_{k}}\psi_{i}-\psi_{i})v_{h_{k}}\big{)}+\big{(}r^{-1}*(\rho_{\Psi_{h_{k}}^{(\ell)}}-\rho_{\Psi}),\psi_{i}v_{h_{k}}\big{)}\\ \hskip 60.00009pt\lesssim\|r^{-1}*\rho_{\Psi_{h_{k}}^{(\ell)}}\|_{0,\infty}\|P_{h_{k}}\psi_{i}-\psi_{i}\|_{0}\|v_{h_{k}}\|_{0}+\|r^{-1}*(\rho_{\Psi_{h_{k}}^{(\ell)}}-\rho_{\Psi})\|_{0,\infty}\|\psi_{i}\|_{0}\|v_{h_{k}}\|_{0}\\ \hskip 60.00009pt\lesssim\|\Psi_{h_{k}}^{(\ell)}\|_{0}\|\nabla\Psi_{h_{k}}^{(\ell)}\|_{0}\|P_{h_{k}}\psi_{i}-\psi_{i}\|_{0}\|v_{h_{k}}\|_{0}+\|\Psi_{h_{k}}^{(\ell)}-\Psi\|_{0}\|\nabla(\Psi_{h_{k}}^{(\ell)}+\Psi)\|_{0}\|\psi_{i}\|_{0}\|v_{h_{k}}\|_{0}.\end{array} (3.47)

For any Γ\Gamma\in\mathcal{H}, based on Assumption B, the exchange-correlation potential can be estimated by

(Vxc(ρΨhk())hkΨ,Γ)(Vxc(ρΨ)Ψ,Γ)=(Vxc(ρΨhk())Ψhk(),Γ)(Vxc(ρΨ)Ψ,Γ)+(Vxc(ρΨhk())(hkΨΨhk()),Γ)=2(Vxc(ρΨξ)i=1Nψξ,i(ψi,hk()ψi),j=1Nψξ,jγj)+(Vxc(ρΨξ)(Ψhk()Ψ),Γ)+(Vxc(ρΨhk())(hkΨΨhk()),Γ)(Vxc(ρΨξ)ρΨξ1/2(i=1N(ψi,hk()ψi)2)1/2,ρΨξ1/2(j=1Nγj2)1/2)+(Vxc(ρΨξ)(Ψhk()Ψ),Γ)+(Vxc(ρΨhk())(hkΨΨhk()),Γ)(Vxc(ρΨξ)ρΨξ(i=1N(ψi,hk()ψi)2)1/2,(j=1Nγj2)1/2)+(Vxc(ρΨξ)(Ψhk()Ψ),Γ)+(Vxc(ρΨhk())(hkΨΨhk()),Γ)((ρΨξ+ρΨξα)(i=1N(ψi,hk()ψi)2)1/2,(j=1Nγj2)1/2)+(Vxc(ρΨξ)(Ψhk()Ψ),Γ)+(Vxc(ρΨhk())(hkΨΨhk()),Γ),\begin{array}[]{l}\Big{(}V_{xc}(\rho_{\Psi_{h_{k}}}^{(\ell)})\mathbb{P}_{h_{k}}\Psi,\Gamma\Big{)}-\Big{(}V_{xc}(\rho_{\Psi})\Psi,\Gamma\Big{)}\\ \hskip 10.00002pt=\big{(}V_{xc}(\rho_{\Psi_{h_{k}}}^{(\ell)})\Psi_{h_{k}}^{(\ell)},\Gamma\big{)}-\big{(}V_{xc}(\rho_{\Psi})\Psi,\Gamma\big{)}+\big{(}V_{xc}(\rho_{\Psi_{h_{k}}}^{(\ell)})(\mathbb{P}_{h_{k}}\Psi-\Psi_{h_{k}}^{(\ell)}),\Gamma\big{)}\\ \hskip 10.00002pt=2\Big{(}V^{\prime}_{xc}(\rho_{\Psi_{\xi}})\displaystyle\sum_{i=1}^{N}\psi_{\xi,i}(\psi_{i,h_{k}}^{(\ell)}-\psi_{i}),\displaystyle\sum_{j=1}^{N}\psi_{\xi,j}\gamma_{j}\Big{)}+\Big{(}V_{xc}(\rho_{\Psi_{\xi}})(\Psi_{h_{k}}^{(\ell)}-\Psi),\Gamma\Big{)}\\ \hskip 40.00006pt+\big{(}V_{xc}(\rho_{\Psi_{h_{k}}}^{(\ell)})(\mathbb{P}_{h_{k}}\Psi-\Psi_{h_{k}}^{(\ell)}),\Gamma\big{)}\\ \hskip 10.00002pt\lesssim\Big{(}V^{\prime}_{xc}(\rho_{\Psi_{\xi}})\rho_{\Psi_{\xi}}^{1/2}\big{(}\displaystyle\sum_{i=1}^{N}(\psi_{i,h_{k}}^{(\ell)}-\psi_{i})^{2}\big{)}^{1/2},\rho_{\Psi_{\xi}}^{1/2}\big{(}\displaystyle\sum_{j=1}^{N}\gamma_{j}^{2}\big{)}^{1/2}\Big{)}+\big{(}V_{xc}(\rho_{\Psi_{\xi}})(\Psi_{h_{k}}^{(\ell)}-\Psi),\Gamma\big{)}\\ \hskip 40.00006pt+\big{(}V_{xc}(\rho_{\Psi_{h_{k}}}^{(\ell)})(\mathbb{P}_{h_{k}}\Psi-\Psi_{h_{k}}^{(\ell)}),\Gamma\big{)}\\ \hskip 10.00002pt\lesssim\Big{(}V^{\prime}_{xc}(\rho_{\Psi_{\xi}})\rho_{\Psi_{\xi}}\big{(}\displaystyle\sum_{i=1}^{N}\big{(}\psi_{i,h_{k}}^{(\ell)}-\psi_{i}\big{)}^{2}\big{)}^{1/2},\big{(}\displaystyle\sum_{j=1}^{N}\gamma_{j}^{2}\big{)}^{1/2}\Big{)}+\big{(}V_{xc}(\rho_{\Psi_{\xi}})(\Psi_{h_{k}}^{(\ell)}-\Psi),\Gamma\big{)}\\ \hskip 40.00006pt+\big{(}V_{xc}(\rho_{\Psi_{h_{k}}}^{(\ell)})(\mathbb{P}_{h_{k}}\Psi-\Psi_{h_{k}}^{(\ell)}),\Gamma\big{)}\\ \hskip 10.00002pt\lesssim\Big{(}(\rho_{\Psi_{\xi}}+\rho_{\Psi_{\xi}}^{\alpha})\big{(}\displaystyle\sum_{i=1}^{N}(\psi_{i,h_{k}}^{(\ell)}-\psi_{i})^{2}\big{)}^{1/2},\big{(}\displaystyle\sum_{j=1}^{N}\gamma_{j}^{2}\big{)}^{1/2}\Big{)}+\big{(}V_{xc}(\rho_{\Psi_{\xi}})(\Psi_{h_{k}}^{(\ell)}-\Psi),\Gamma\big{)}\\ \hskip 40.00006pt+\big{(}V_{xc}(\rho_{\Psi_{h_{k}}}^{(\ell)})(\mathbb{P}_{h_{k}}\Psi-\Psi_{h_{k}}^{(\ell)}),\Gamma\big{)},\end{array} (3.48)

where Ψξ=ξΨhk()+(1ξ)Ψ\Psi_{\xi}=\xi\Psi_{h_{k}}^{(\ell)}+(1-\xi)\Psi with ξ[0,1]\xi\in[0,1].

For the first part of (3.48), we have

((ρΨξ+ρΨξα)(i=1N(ψi,hk()ψi)2)1/2,(j=1Nγj2)1/2)((ρΨξ+ρΨξα)(i=1N(ψi,hk()ψi)2)1/2,j=1N|γj|)j=1NρΨξα0,3/α(i=1N(ψi,hk()ψi)2)1/20,Ωγj0,6/(32α)+j=1NρΦξ0,3(i=1N(ψi,hk()ψi)2)1/20,Ωγj0,6Ψhk()Ψ0,ΩΓ1,Ω.\begin{array}[]{l}\Big{(}(\rho_{\Psi_{\xi}}+\rho_{\Psi_{\xi}}^{\alpha})\big{(}\displaystyle\sum_{i=1}^{N}(\psi_{i,h_{k}}^{(\ell)}-\psi_{i})^{2}\big{)}^{1/2},\big{(}\displaystyle\sum_{j=1}^{N}\gamma_{j}^{2}\big{)}^{1/2}\Big{)}\\ \hskip 80.00012pt\lesssim\Big{(}(\rho_{\Psi_{\xi}}+\rho_{\Psi_{\xi}}^{\alpha})\Big{(}\displaystyle\sum_{i=1}^{N}(\psi_{i,h_{k}}^{(\ell)}-\psi_{i})^{2}\Big{)}^{1/2},\displaystyle\sum_{j=1}^{N}|\gamma_{j}|\Big{)}\\ \hskip 80.00012pt\lesssim\displaystyle\sum_{j=1}^{N}\|\rho_{\Psi_{\xi}}^{\alpha}\|_{0,3/\alpha}\Big{\|}\Big{(}\displaystyle\sum_{i=1}^{N}(\psi_{i,h_{k}}^{(\ell)}-\psi_{i})^{2}\Big{)}^{1/2}\Big{\|}_{0,\Omega}\|\gamma_{j}\|_{0,6/(3-2\alpha)}\\ \hskip 100.00015pt+\displaystyle\sum_{j=1}^{N}\|\rho_{\Phi_{\xi}}\|_{0,3}\Big{\|}\Big{(}\displaystyle\sum_{i=1}^{N}(\psi_{i,h_{k}}^{(\ell)}-\psi_{i})^{2}\Big{)}^{1/2}\Big{\|}_{0,\Omega}\|\gamma_{j}\|_{0,6}\\ \hskip 80.00012pt\lesssim\|\Psi_{h_{k}}^{(\ell)}-\Psi\|_{0,\Omega}\|\Gamma\|_{1,\Omega}.\end{array} (3.49)

For the second and third parts of (3.48), using the proof technique for (3.40), the following estimate holds

(Vxc(ρΨξ)(Ψhk()Ψ),Γ)+(Vxc(ρΨhk())(hkΨΨhk()),Γ)(ΨΨhk()0,Ω+ΨhkΨ0,Ω)Γ1,Ω.\big{(}V_{xc}(\rho_{\Psi_{\xi}})(\Psi_{h_{k}}^{(\ell)}-\Psi),\Gamma\big{)}+\big{(}V_{xc}(\rho_{\Psi_{h_{k}}}^{(\ell)})(\mathbb{P}_{h_{k}}\Psi-\Psi_{h_{k}}^{(\ell)}),\Gamma\big{)}\lesssim(\|\Psi-\Psi_{h_{k}}^{(\ell)}\|_{0,\Omega}+\|\Psi-\mathbb{P}_{h_{k}}\Psi\|_{0,\Omega})\|\Gamma\|_{1,\Omega}. (3.50)

Using (3.48), (3.49) and (3.50), there holds

(Vxc(ρΨhk())hkΨ,Γ)(Vxc(ρΨ)Ψ,Γ)(ΨΨhk()0,Ω+ΨhkΨ0,Ω)Γ1,Ω.\displaystyle\Big{(}V_{xc}(\rho_{\Psi_{h_{k}}}^{(\ell)})\mathbb{P}_{h_{k}}\Psi,\Gamma\Big{)}-\Big{(}V_{xc}(\rho_{\Psi})\Psi,\Gamma\Big{)}\lesssim\Big{(}\|\Psi-\Psi_{h_{k}}^{(\ell)}\|_{0,\Omega}+\|\Psi-\mathbb{P}_{h_{k}}\Psi\|_{0,\Omega}\Big{)}\|\Gamma\|_{1,\Omega}. (3.51)

Taking vhk=Phkψiψ^i,hk(+1)v_{h_{k}}=P_{h_{k}}\psi_{i}-\widehat{\psi}_{i,h_{k}}^{(\ell+1)} in (3.46), due to Lemma 3.1, (3.47), (3.48) and (3.51), we derive

hkΨΨ^hk(+1)12=i=1NPhkψiψ^i,hk(+1)12i=1N{aμ(Phkψiψ^i,hk(+1),Phkψiψ^i,hk(+1))+(VHar(ρΨhk())(Phkψiψ^i,hk(+1)),Phkψiψ^i,hk(+1))+(Vxc(ρΨhk())(Phkψiψ^i,hk(+1)),Phkψiψ^i,hk(+1))}(|ΛΛhk()|+ΨΨhk()0+ΨPhkΨ0)hkΨΨ^hk(+1)1,\begin{array}[]{lll}\|\mathbb{P}_{h_{k}}\Psi-\widehat{\Psi}_{h_{k}}^{(\ell+1)}\|_{1}^{2}&=&\displaystyle\sum_{i=1}^{N}\|P_{h_{k}}\psi_{i}-\widehat{\psi}_{i,h_{k}}^{(\ell+1)}\|_{1}^{2}\\ &\lesssim&\displaystyle\sum_{i=1}^{N}\Big{\{}a_{\mu}(P_{h_{k}}\psi_{i}-\widehat{\psi}_{i,h_{k}}^{(\ell+1)},P_{h_{k}}\psi_{i}-\widehat{\psi}_{i,h_{k}}^{(\ell+1)})\\ &&\hskip 10.00002pt+(V_{Har}(\rho_{\Psi_{h_{k}}^{(\ell)}})(P_{h_{k}}\psi_{i}-\widehat{\psi}_{i,h_{k}}^{(\ell+1)}),P_{h_{k}}\psi_{i}-\widehat{\psi}_{i,h_{k}}^{(\ell+1)})\\ &&\hskip 20.00003pt+(V_{xc}(\rho_{\Psi_{h_{k}}^{(\ell)}})(P_{h_{k}}\psi_{i}-\widehat{\psi}_{i,h_{k}}^{(\ell+1)}),P_{h_{k}}\psi_{i}-\widehat{\psi}_{i,h_{k}}^{(\ell+1)})\Big{\}}\\ &\lesssim&\Big{(}|\Lambda-\Lambda_{h_{k}}^{(\ell)}|+\|\Psi-\Psi_{h_{k}}^{(\ell)}\|_{0}+\|\Psi-P_{h_{k}}\Psi\|_{0}\Big{)}\|\mathbb{P}_{h_{k}}\Psi-\widehat{\Psi}_{h_{k}}^{(\ell+1)}\|_{1},\end{array} (3.52)

which yields

ΨΨ^hk(+1)1\displaystyle\|\Psi-\widehat{\Psi}_{h_{k}}^{(\ell+1)}\|_{1} \displaystyle\lesssim ΨhkΨ1+PhkΨΨ^hk(+1)1\displaystyle\|\Psi-\mathbb{P}_{h_{k}}\Psi\|_{1}+\|P_{h_{k}}\Psi-\widehat{\Psi}_{h_{k}}^{(\ell+1)}\|_{1} (3.53)
\displaystyle\lesssim ΨhkΨ1+|ΛΛhk()|+ΨΨhk()0.\displaystyle\|\Psi-\mathbb{P}_{h_{k}}\Psi\|_{1}+|\Lambda-\Lambda_{h_{k}}^{(\ell)}|+\|\Psi-\Psi_{h_{k}}^{(\ell)}\|_{0}.

Since SH,hS_{H,h} is a subspace of ShkS_{h_{k}}, the Kohn-Sham equation (3.24) can be regarded as a subspace approximation for (2.9). From Assumption C and (3.53), we have

ΨΨhk(+1)1ΨΨ^hk(+1)1ΨhkΨ1+|ΛΛhk()|+ΨΨhk()0.\displaystyle\|\Psi-\Psi_{h_{k}}^{(\ell+1)}\|_{1}\lesssim\|\Psi-\widehat{\Psi}_{h_{k}}^{(\ell+1)}\|_{1}\lesssim\|\Psi-\mathbb{P}_{h_{k}}\Psi\|_{1}+|\Lambda-\Lambda_{h_{k}}^{(\ell)}|+\|\Psi-\Psi_{h_{k}}^{(\ell)}\|_{0}.

This is the desired result (3.42). The estimate (3.43) can be obtained by Assumption C, and the proof is completed. ∎

Theorem 3.2 shows that the augmented subspace method defined by Algorithm 3 can really improve the accuracy after each iteration, which is the base for designing the nonnested augmented subspace method for Kohn-Sham equation.

Next, we estimate the computational work of the nonnested augmented subspace method. In this paper, we use Mshmet and Mmg3d [17, 20] to realize the moving mesh process. Therefore, the unit mesh principle shall be met [17, 20]. That is, for any K𝒯hK\in\mathcal{T}_{h}, there holds

eT(k)e=1,eEK,\displaystyle e^{\rm T}\mathcal{M}(k)e=1,\quad\forall e\in E_{K}, (3.54)

where (k)\mathcal{M}(k) is the metric on the mesh element KK, EKE_{K} is the union of the boundaries of KK. Based on the definition of \mathcal{M} and the unit mesh principle (3.54), we can change the length of each edge through adjusting the value of ε\varepsilon, which then leads to the following relationship for the number of degrees of freedom:

NkηnkNn,k=1,2,n,\displaystyle N_{k}\approx\eta^{n-k}N_{n},\quad k=1,2\cdots,n, (3.55)

where η\eta denotes the coarsening rate between two consecutive meshes.

Let WkW_{k} denote the computational work in the kk-th finite element space, 𝒪(Mk0)\mathcal{O}(M_{k_{0}}) denote the computational work for solving the Kohn-Sham equation in the first k0k_{0} adaptive spaces, nn denote the number of mesh levels, ϖ\varpi denote the nonlinear iteration times, ϑ\vartheta denote the number of processes. We use parallel computing technique to assemble the matrix in step 3 of Algorithm 3, and the resultant algebraic system is solved by the parallel algebraic multigrid method. Thus the computational work for the NN linear boundary value problems is 𝒪(NNk/ϑ)\mathcal{O}(NN_{k}/\vartheta). For the small-scale nonlinear eigenvalue problem involved in step 4 of Algorithm 3, the matrices are assembled through parallel computing technique, and the small-scale algebraic eigenvalue problem is solved in serial computing with computational work 𝒪(MH)\mathcal{O}(M_{H}). Then the total computational work in the kk-th (k>k0)(k>k_{0}) finite element space is

Wk=𝒪(NNkϑ+ϖ(Nkϑ+MH)).\displaystyle W_{k}=\mathcal{O}\Big{(}N\displaystyle\frac{N_{k}}{\vartheta}+\varpi\Big{(}\displaystyle\frac{N_{k}}{\vartheta}+M_{H}\Big{)}\Big{)}. (3.56)
Theorem 3.3.

Assume that the number of degrees of freedom on two consecutive meshes satisfies the proportional relationship (3.55). Then the total computational work of Algorithm 3 can be estimated as follows

Wtotal=𝒪(N+ϖϑNn+ϖlogNnMH+Mk0).\displaystyle W_{total}=\mathcal{O}\Big{(}\displaystyle\frac{N+\varpi}{\vartheta}N_{n}+\varpi{\rm log}N_{n}M_{H}+M_{k_{0}}\Big{)}. (3.57)
Proof.

Based on the computational work (3.56) in one finite element space and the proportional relationship (3.55), we have

Wtotal\displaystyle W_{total} =\displaystyle= k=1NWk=𝒪(Mk0+k=k0+1n(NNkϑ+ϖ(Nkϑ+MH)))\displaystyle\sum_{k=1}^{N}W_{k}=\mathcal{O}\left(M_{k_{0}}+\sum_{k=k_{0}+1}^{n}\Big{(}N\displaystyle\frac{N_{k}}{\vartheta}+\varpi(\displaystyle\frac{N_{k}}{\vartheta}+M_{H})\Big{)}\right) (3.58)
=\displaystyle= 𝒪(N+ϖϑk=k0+1nNk+ϖlogNnMH+Mk0)\displaystyle\mathcal{O}\left(\displaystyle\frac{N+\varpi}{\vartheta}\sum_{k=k_{0}+1}^{n}N_{k}+\varpi{\rm log}N_{n}M_{H}+M_{k_{0}}\right)
=\displaystyle= 𝒪(N+ϖϑNn+ϖlogNnMH+Mk0).\displaystyle\mathcal{O}\left(\displaystyle\frac{N+\varpi}{\vartheta}N_{n}+\varpi{\rm log}N_{n}M_{H}+M_{k_{0}}\right).

Then the proof is completed. ∎

Remark 3.2.

For complicated molecular system, the number of the desired eigenpairs (N)(N) and the number of nonlinear iteration times (ϖ)(\varpi) will be large. But fortunately, the software package FreeFEM [29] has a good scalability. Thus, when the number of processes ϑ\vartheta is large, we can still derive an asymptotically optimal computational work estimate.

4 Numerical experiments

In this section, we provide four numerical examples to validate the efficiency of the proposed nonnested augmented subspace method in this paper. These numerical examples are implemented on the high performance computing platform LSSC-IV in the State Key Laboratory of Scientific and Engineering Computing, Chinese Academy of Sciences. Each computing node has two 18-core Intel Xeon Gold 6140 processors at 2.3 GHz and 192 GB memory. All the parallel solving processes in this paper use 72 cores. We adopt the open source finite element software package FreeFEM [23, 29] to do the numerical simulation. The anisotropic measurement is generated by the Meshmet of Hessian matrix based on adaptive function (density function), and the adaptive mesh is generated by the software package Mmg3d [17, 20]. The involved linear boundary value problems are solved by PETSc-GAMG [5], and the linear eigenvalue problems are solved by Krylov-Schur method [25] in SLEPc [46]. In all the numerical experiments, we set the threshold in Algorithm 2 to be Kasm=4K_{asm}=4, and set the positive constant μ\mu in Algorithm 3 to be μ=8M(k=1MZK2)\mu=8M\big{(}\sum_{k=1}^{M}Z_{K}^{2}\big{)}.

For the nonlinear eigenvalue problems, we use the Anderson mixing scheme to accelerate the convergence rate [4]. The detailed process can be described as follows: Let ρh,in(m)\rho_{h,in}^{(m)} and ρh,out(m)\rho_{h,out}^{(m)} represent the input and output electron densities of the mm-th self-consistent iteration. To input the (m+1)(m+1)-th self-consistent iteration, ρh,in(m+1)\rho_{h,in}^{(m+1)} is computed as follows:

ρh,in(m+1)=βρ~h,out+(1β)ρ~h,in,\displaystyle\rho_{h,in}^{(m+1)}=\beta\widetilde{\rho}_{h,out}+(1-\beta)\widetilde{\rho}_{h,in}, (4.1)

where

ρ~h,in(out)=αmρh,in(out)(m)+j=m0m1αjρh,in(out)(j),\displaystyle\widetilde{\rho}_{h,in(out)}=\alpha_{m}\rho_{h,in(out)}^{(m)}+\sum_{j=m_{0}}^{m-1}\alpha_{j}\rho_{h,in(out)}^{(j)}, (4.2)

and the sum of the coefficients equals to one, i.e.,

αm0+αm0+1++αm=1.\displaystyle\alpha_{m_{0}}+\alpha_{m_{0}+1}+\cdots+\alpha_{m}=1. (4.3)

According to (4.3), the equation (4.2) can be written as

ρ~h,in(out)=ρh,in(out)(m)+j=m0m1αj(ρh,in(out)(j)ρh,in(out)(m)),\displaystyle\widetilde{\rho}_{h,in(out)}=\rho_{h,in(out)}^{(m)}+\sum_{j=m_{0}}^{m-1}\alpha_{j}\big{(}\rho_{h,in(out)}^{(j)}-\rho_{h,in(out)}^{(m)}\big{)}, (4.4)

Here the positive integer m0[1,m]m_{0}\in[1,m], and the depth of the mixing scheme is defined by depth:=mm0+1:=m-m_{0}+1, β\beta is a given weight value.

Denoting F(m)=ρh,out(m)ρh,in(m)F^{(m)}=\rho_{h,out}^{(m)}-\rho_{h,in}^{(m)} and F~=ρ~h,outρ~h,in\widetilde{F}=\widetilde{\rho}_{h,out}-\widetilde{\rho}_{h,in}. Based on (4.4), there holds

F~=F(m)+j=m0m1αj(F(j)F(m)).\displaystyle\widetilde{F}=F^{(m)}+\sum_{j=m_{0}}^{m-1}\alpha_{j}\big{(}F^{(j)}-F^{(m)}\big{)}. (4.5)

The coefficients αj\alpha_{j} are determined by minimizing F~22=ρ~h,inρ~h,out22\|\widetilde{F}\|_{2}^{2}=\|\widetilde{\rho}_{h,in}-\widetilde{\rho}_{h,out}\|_{2}^{2}, which amounts to solve the following equations:

k=m0m1(F(m)F(j),F(m)F(k))αk=(F(m)F(j),F(m)),j=m0,,m1.\displaystyle\sum_{k=m_{0}}^{m-1}\big{(}F^{(m)}-F^{(j)},F^{(m)}-F^{(k)}\big{)}\alpha_{k}=\big{(}F^{(m)}-F^{(j)},F^{(m)}\big{)},\quad j=m_{0},\cdots,m-1. (4.6)

In our numerical experiments, we choose the depth=5=5, the damping coefficient β=0.7\beta=0.7.

4.1 Kohn-Sham equation for Helium

In the first example, we solve the following Kohn-Sham equation for Helium:

{(12Δ2|x|+Ωρ(y)|xy|𝑑y+Vxc)ψ=λψ,in Ω,ψ=0,on Ω,Ω|ψ|2𝑑x=1,\left\{\begin{array}[]{l}\Big{(}-\displaystyle\frac{1}{2}\Delta-\displaystyle\frac{2}{|x|}+\displaystyle\int_{\Omega}\frac{\rho(y)}{|x-y|}dy+V_{xc}\Big{)}\psi=\lambda\psi,\quad\text{in }\Omega,\\ \\ \psi=0,\quad\text{on }{\partial\Omega},\\ \\ \displaystyle\int_{\Omega}|\psi|^{2}dx=1,\end{array}\right. (4.7)

where Ω=(10,10)3\Omega=(-10,10)^{3}. In this example, the electron density ρ=2|ψ|2\rho=2|\psi|^{2}. The exchange-correlation potential is chosen according to (3.2) and (3.3). The experimental value of non-relativistic ground state energy of Helium atom is -2.90372 hartree [50].

Here, we use three types of algorithms to solve the Kohn-Sham equation (4.7). The first one uses the self-consistent field iteration to solve (4.7) directly on the fixed structure mesh. The second one uses the self-consistent field iteration to solve (4.7) directly on the adaptive moving mesh (i.e. step 3 of Algorithm 2 is solved directly by the self-consistent field iteration). The third one uses the nonnested augmented subspace method to solve (4.7). In the moving mesh adaptive process, the metric matrix is given by the modified Hessian matrix (3.8) of ρ1/2(x)\rho^{1/2}(x). The tolerance in Algorithm 2 is set to be 1E31E-3. The tolerance in Algorithm 3 is set to be 2E42E-4.

Refer to caption
Refer to caption
Figure 1: Contour plot of the electron density (left) and the adaptive moving mesh (right) for Example 1
Refer to caption
Refer to caption
Figure 2: The ground state energy (left) and the corresponding error estimates (right) for Example 1

The density function and the adaptive mesh of the nonnested augmented subspace method are presented in Figure 1. The ground state energy and the corresponding error estimates derived by these three methods are presented in Figure 2. It can be seen from Figure 2 that the ground state energy of Helium atom first decreases quickly and then tends to be stable with the adaptive refinement of the mesh. Besides, we also can see that the adaptive iterative methods have a better accuracy than the finite element method with the uniform mesh.

4.2 Kohn-Sham equation for Hydrogen-Lithium

In the second example, we solve the following Kohn-Sham equation for Hydrogen-Lithium:

{(12Δ3|xr1|1|xr2|+Ωρ(y)|xy|𝑑y+Vxc)ψi=λiψi,in Ω,i=1,2,ψi=0,on Ω,i=1,2,Ωψiψj𝑑Ω=δi,j,i,j=1,2,\left\{\begin{array}[]{l}\Big{(}-\displaystyle\frac{1}{2}\Delta-\displaystyle\frac{3}{|x-r_{1}|}-\displaystyle\frac{1}{|x-r_{2}|}+\displaystyle\int_{\Omega}\frac{\rho(y)}{|x-y|}dy+V_{xc}\Big{)}\psi_{i}=\lambda_{i}\psi_{i},\ \ \text{in }\Omega,\ \ \ \ i=1,2,\\ \\ \psi_{i}=0,\ \ \ \ \ \ \text{on }{\partial\Omega},\ \ i=1,2,\\ \\ \displaystyle\int_{\Omega}\psi_{i}\psi_{j}d\Omega=\delta_{i,j},\ \ \ i,j=1,2,\end{array}\right. (4.8)

where Ω=(10,10)3\Omega=(-10,10)^{3}. In this equation, the electron density ρ=2(|ψ1|2+|ψ2|2)\rho=2(|\psi_{1}|^{2}+|\psi_{2}|^{2}), rj(j=1,2)r_{j}\ (j=1,2) is the position of lithium atom and hydrogen atom and we take r1=(1.0075,0,0)r_{1}=(-1.0075,0,0), r2=(2.0075,0,0)r_{2}=(2.0075,0,0). The exchange-correlation potential is chosen according to (3.2) and (3.3). The experimental value of non relativistic ground state energy of Hydrogen-Lithium molecular system is -8.070 hartree [12]. In this example, we set the tolerance in Algorithm 2 to be 1E31E-3 and tolerance in Algorithm 3 to be 2E42E-4. We also use these three numerical methods as described in the first example to solve (4.8).

Refer to caption
Refer to caption
Figure 3: Contour plot of the electron density (left) and the adaptive moving mesh (right) for Example 2
Refer to caption
Refer to caption
Figure 4: The ground state energy (left) and the corresponding error estimates (right) for Example 2

The density function and the adaptive mesh for Hydrogen-Lithium are presented in Figure 3. The ground state energy and the corresponding error estimates derived by these three methods are presented in Figure 4. It can be seen from Figure 4 that the ground state energy of Hydrogen-Lithium decreases quickly to a stable constant with the adaptive refinement of the mesh. Besides, we also can see that the adaptive iterative methods have a better accuracy than the finite element method with uniform mesh. At the same time, it can be seen that the convergence rate of Algorithm 3 tends to 2/32/3 with mesh refinement.

Elements (Direct method) 9008 11463 15943 29015 57078 113729 240435 518786
Time (Direct method) 7.024 10.231 14.188 18.587 23.694 32.339 46.215 74.595
Elements (Algorithm 3) 8819 11240 17235 31297 55690 113168 236780 510949
Time (Algorithm 3) 8.642 11.176 15.370 19.260 23.340 30.560 38.086 49.016
Table 1: CPU time (in seconds) for the nonnested augmented subspace method and the direct adaptive finite element method.

In Table 1, we present the computational time of the nonnested augmented subspace method and the direct adaptive finite element method (i.e. solve the Kohn-Sham equation directly using the moving mesh adaptive technique). It can be seen that the nonnested augmented subspace method is more efficient when the number of mesh elements reaches 55690 or more, and the advantage is more obvious with the increase of the number of mesh elements.

4.3 Kohn-Sham equation for Methane

In the third example, we consider the Kohm-Sham equation for Methane. To show the efficiency of the nonnested augmented subspace method intuitively, we also use these three methods described in Example 4.1 to solve the Methane molecules. The computational domain is set to be Ω=(10,10)3\Omega=(-10,10)^{3}, and the atomic positions of Methane are shown in Table 2.

Atom x y z Nuclear charge
C1\rm C_{1} 0.0000 0.0000 0.0000 6
H2\rm H_{2} 1.3092 1.3092 1.3092 1
H3\rm H_{3} -1.3092 -1.3092 1.3092 1
H4\rm H_{4} 1.3092 -1.3092 -1.3092 1
H5\rm H_{5} -1.3092 1.3092 -1.3092 1
Table 2: The position and the nuclear charge of each atom in Methane.

For a full potential calculation, there are total ten electrons. Since we don’t consider spin polarisation, five eigenpairs need to be calculated. The tolerance setting in Algorithms 2 and 3 is the same as that of Example 4.1. The reference value of non relativistic ground state energy of methane molecule is set to be -40.41 hartree [28].

Figure 5 shows the electron density distribution and adaptive mesh of Methane molecule. Figure 6 shows the change curve of ground state energy and the corresponding error estimates for Methane molecule with the increasement of the number of mesh elements.

Refer to caption
Refer to caption
Figure 5: Contour plot of the electron density (left) and the adaptive moving mesh (right) for Example 3
Refer to caption
Refer to caption
Figure 6: The ground state energy (left) and the corresponding error estimates (right) for Example 3

Table 3 shows the computational time of the nonnested augmented subspace method and the direct adaptive finite element method. It can be seen that when the number of mesh elements reaches 499064, the nonnested augmented subspace method has an advantages in solving efficiency over the direct adaptive finite element method.

Elements (Direct method) 10208 11496 22267 45982 102415 225074 492919 1072524 2329210
Time (Direct method) 10.904 15.141 20.737 29.902 42.412 68.716 140.839 312.876 756.633
Elements (Algorithm 3) 10545 10599 22682 51646 108014 230730 499064 1083722 2342607
Time (Algorithm 3) 10.762 14.027 19.386 30.579 53.005 70.812 86.976 149.184 209.735
Table 3: CPU time (in seconds) for the nonnested augmented subspace method and the direct adaptive finite element method.

4.4 Kohn-Sham equation for Benzene

In the last example, we consider the Kohn-Sham equation for the Benzene molecule. The computational domain is taken as Ω=(10,10)3\Omega=(-10,10)^{3}, and the atomic positions of Methane are shown in Table 4.

Atom x y z Nuclear charge
C1\rm C_{1} 0.0000 1.3970 0.0000 6
C2\rm C_{2} 1.2098 0.6985 0.0000 6
C3\rm C_{3} 1.2098 -0.6985 0.0000 6
C4\rm C_{4} 0.0000 -1.3970 0.0000 6
C5\rm C_{5} -1.2098 -0.6985 0.0000 6
C6\rm C_{6} -1.2098 0.6985 0.0000 6
H7\rm H_{7} 0.0000 2.4810 0.0000 1
H8\rm H_{8} 2.1486 1.2405 0.0000 1
H9\rm H_{9} 2.1486 -1.2405 0.0000 1
H10\rm H_{10} 0.0000 -2.4810 0.0000 1
H11\rm H_{11} -2.1486 -1.2405 0.0000 1
H12\rm H_{12} -2.1486 1.2405 0.0000 1
Table 4: The position and the nuclear charge number of each atom in Benzene.

For a full potential calculation, there are total 42 electrons. Since we don’t consider spin polarisation, 21 eigenpairs need to be calculated. The tolerance setting in Algorithms 2 and 3 is the same as that of Example 4.1. The reference value of non relativistic ground state energy of methane molecule is set to be -231.78 hartree [28].

Elements (Direct method) 8946 13095 21675 58635 198145 535501 1245081 2789529
Time (Direct method) 19.079 28.454 40.958 63.495 109.606 223.390 470.353 1027.426
Elements (Algorithm 3) 8897 12505 20535 62348 207362 550236 1262297 2796022
Time (Algorithm 3) 14.235 21.239 35.367 62.337 79.789 133.229 187.119 294.440
Table 5: CPU time (in seconds) for the nonnested augmented subspace method and the direct adaptive finite element method.
Refer to caption
Refer to caption
Figure 7: Contour plot of the electron density (left) and the adaptive moving mesh (right) for Example 4

Three numerical methods described in Example 4.1 are tested in this example. Figure 7 shows the electron density and adaptive mesh of the nonnested augmented subspace method. It can be seen from Figure 7 that the mesh nodes gather in the region with singular electron density (near the atomic centers), while in the region far away from the atomic centers, the mesh node distribution is sparse, which is consistent with the distribution of electron density function.

Refer to caption
Refer to caption
Figure 8: The ground state energy (left) and the corresponding error estimates (right) for Example 4

Figure 8 shows the decline curve of ground state energy and corresponding error estimates with mesh adaptive movement. From Figure 8, we can see that compared with the moving mesh adaptive method (red line and yellow line), the finite element method performed on the fixed structural mesh (blue line) derives a slower convergence rate. Moreover, when the number of mesh elements reaches 233280, the nonlinear iteration on fixed structure mesh still does not converge even if the Anderson acceleration technology is adopted.

Refer to caption
Refer to caption
Figure 9: The computational time and parallel scalability of the nonnested augmented subspace method for Example 4

Table 5 compares the computational time of the nonnested augmented subspace method and the direct adaptive finite element method. It can be seen that when the number of mesh elements reaches 207362, the nonnested augmented subspace method has advantage in solving efficiency over the direct adaptive finite element method.

In addition, we also present the computational time of the nonnested augmented subspace method for Benzene in Figure 9 to test its linear complexity and the parallel scalability. Figure 9 shows that when the number of mesh elements reaches 500000, the nonnested augmented subspace method has a linear computational complexity with the increase of the number of mesh elements. The strong scalability and weak scalability is also presented in Figure 9. In Figure 9, the label “All meshes” (blue line) represents the total computational time from the coarsest mesh to the finest mesh. The labeled “finest mesh” (red line) represents only the computational time in the finest mesh, The green line is the result of weak scalability, and 9, 18, 36, 72, 144 and 288 processes are used, respectively. From Figure 9, we can find that the nonnested augmented subspace method has a good scalability.

5 Concluding remarks

In this paper, a nonnested augmented subspace method is proposed to solve the Kohn-Sham equation based on the moving mesh adaptive technique and augmented subspace method. Because the moving mesh adaptive technology is used to generate nonnested mesh sequence, the redistributed mesh is almost optimal. In the solving process, we transform the classical nonlinear eigenvalue problem on a fine mesh into a series of linear boundary value problems of the same scale on the adaptive mesh sequence, and subsequently correct the approximate solutions by solving the small-scale nonlinear eigenvalue problems in a special low-dimensional augmented subspace. Since solving large-scale nonlinear eigenvalue problem is avoided which is time-consuming, the total solving efficiency can be greatly improved. Some numerical experiments are also presented to verify the computational efficiency and energy accuracy of the algorithm proposed in this paper.

6 Acknowledgement

This research is supported partly by National Key R&D Program of China 2019YFA0709600, 2019YFA0709601, National Natural Science Foundations of China (Grant Nos. 11922120, 11871489 and 11771434), FDCT of Macao SAR (0082/2020/A2), MYRG of University of Macau (MYRG2020-00265-FST), the National Center for Mathematics and Interdisciplinary Science, CAS, Beijing Municipal Natural Science Foundation (Grant No. 1232001), and the General projects of science and technology plan of Beijing Municipal Education Commission (Grant No. KM202110005011).

References

  • [1] R. A. Adams, Sobolev spaces, Academic Press, New York, 1975.
  • [2] F. Alauzet and P.J. Frey, Estimateur d’erreur géométrique et métriques anisotropes pour l’adaptation de maillage. partie i : aspects théoriques, Rapport de recherche RR-4759, INRIA, 2003.
  • [3] R. Alexander, P. Manselli and K. Miller, Moving finite elements for the Stefan problem in two dimensions, Ren. Accad., 1979, Naz. Lincei (Rome) LXVII:57–61.
  • [4] D. Anderson, Iterative procedures for nonlinear integral equations, J. Assoc. Comput. Mach., 12 (1965), 547–560.
  • [5] S. Balay, S. Abhyankar, M. Adams, et al., PETSc users manual, Technical Report ANL-95/11- Revision 3.13, 2020.
  • [6] G. Bao, G. Hu and D. Liu, Numerical solution of the Kohn-Sham equation by finite element methods with an adaptive mesh redistribution technique, J. Sci. Comput., 55(2) (2012), 372–391.
  • [7] T. L. Beck, Real-space mesh techniques in density functional theory, Rev. Modern Phys., 72 (2000), 1041–1080.
  • [8] E. J. Bylaska, M. Host and J. H. Weare, Adaptive finite element method for solving the exact Kohn-Sham equation of density functional theory, J. Chem. Theory Comput., 5 (2009), 937–948.
  • [9] E. Cancès, R. Chakir and Y. Maday, Numerical analysis of nonlinear eigenvalue problems, J. Sci. Comput., 45(1–3) (2010), 90–117.
  • [10] E. Cancès, R. Chakir and Y. Maday, Numerical analysis of the planewave discretization of some orbital-free and Kohn-Sham models, ESAIM Math. Model. Numer. Anal., 46 (2012), 341–388.
  • [11] A. Castro, H. Appel, M. Oliveira, C. A. Rozzi, X. Andrade, F. Lorenzen, M. A. L. Marques, E. K. U. Gross, A. Rubio, Octopus: A tool for the application of time-dependent density functional theory, Phys. Status Solidi B, 243 (2006), 2465–2488.
  • [12] W. Cencek and J. Rychlewski, Benchmark calculations for He2+He^{2+} and LiH molecules using explicitly correlated Gaussian functions, Chem. Phys. Lett., 320 (2000), 549–552.
  • [13] J. R. Chelikowsky, N. Troullier and Y. Saad, Finite-difference pseudopotential method: Electronic structure calculations without a basis, Phys. Rev. Lett., 72 (1994), 1240–1243.
  • [14] H. Chen, X. Dai, X. Gong, L. He, Z. Yang and A. Zhou, Adaptive finite element approximations for Kohn-Sham models, Multi. Model. Simul., 12(4) (2014), 1828–1869.
  • [15] H. Chen, L. He and A. Zhou, Finite element approximations of nonlinear eigenvalue problems in quantum physics, Comput. Methods Appl. Mech. Engrg., 200(21) (2011), 1846–1865.
  • [16] H. Chen, X. Gong, L. He, Z. Yang and A. Zhou, Numerical analysis of finite dimensional approximations of Kohn-Sham models, Adv. Comput. Math., 38 (2013), 225–256.
  • [17] C. Dapogny, C. Dobrzynski and P.J. Frey, Three-dimensional adaptive domain remeshing, implicit domain meshing, and applications to free and moving boundary problems, J. Comput. Phys., 262 (2014), 358–378.
  • [18] Y. Di, R. Li, T. Tang, et al., Moving mesh finite element method for the incompressible Navier-Stokes equations, SIAM J. Sci. Comput., 26(3) (2005), 1036–1056.
  • [19] Y. Di, H. Xie and X. Yin, Anisotropic meshes and stabilization parameter design of linear SUPG method for 2D convection-dominated convection-diffusion equations, J. Sci. Comput., 76(1) (2018), 48–68.
  • [20] P.J. Frey and F. Alauzet, Anisotropic mesh adaptation for CFD computations, Comput. Methods Appl. Mech. Engrg, 194 (2005), 5068–5682.
  • [21] W. J. Hehre, R. F. Stewart and J. A. Pople, Self-consistent molecular-orbital methods. I. Use of Gaussian expansions of Slater-type atomic orbitals, J. Chem. Phys., 51 (1969), 2657–2664.
  • [22] F. Jensen, Introduction to Computational Chemistry, Wiley Publishers, 1999.
  • [23] F. Hecht, FreeFEM documentation release 4.6, 2020, https://doc.freefem.org/pdf/ FreeFEM-documentation.pdf.
  • [24] F. Hecht, Bidimensional anisotropic mesh generator. Technical report, INRIA, Roc-quencourt, 1997. Sourcecode: http://www-rocq1.inria.fr/gamma/cdrom/www/bamg/eng.htm.
  • [25] V. Hernandez, J.E. Roman, A. Tomas, et al., Krylov-Schur methods in SLEPc, SLEPc Technical Report STR-7, 2007. http://slepc.upv.es.
  • [26] P. Hohenberg and W. Kohn, Inhomogeneous electron gas, Phys. Rev., 136 (1964), B864–B871.
  • [27] S. Jia, H. Xie, M. Xie and F. Xu, A full multigrid method for nonlinear eigenvalue problems, Science China: Mathematics, 59 (2016), 2037–2048.
  • [28] R. Johnson, Nist computational chemistry comparison and benchmark database, 2011, http://cccbdb. nist.gov.
  • [29] P. Jolivet, F. Hecht, F. Nataf, et al., Scalable domain decomposition preconditioners for heterogeneous elliptic problems, Proceedings of the 2013 ACM/IEEE conference on Supercomputing. SC13. Best paper finalist. ACM, 80 (2013), 1–11.
  • [30] W. Kohn and L. Sham, Self-consistent equations including exchange and correlation effects, Phys. Rev. A, 140 (1965), 1133–1138.
  • [31] R. Li, T. Tang and P.W. Zhang, Moving mesh methods in multiple dimensions based on harmonic maps, J. Comput. Phys., 170 (2001), 562–588.
  • [32] R. Li, T. Tang and P.W. Zhang, A moving mesh finite element algorithm for singular problems in two and three space dimensions, J. Comput. Phys., 177 (2002), 365–393.
  • [33] L. Lin, J. Lu, L. Ying and W. E, Adaptive local basis set for Kohn-Sham density functional theory in a discontinuous Galerkin framework I: Total energy calculation, J. Comput. Phys., 231 (2012), 2140–2154.
  • [34] Q. Lin and H. Xie, A multi-level correction scheme for eigenvalue problems, Math. Comp., 84(291) (2015), 71–88.
  • [35] B. Liu, H. Chen, G. Dusson, J. Fang and X. Gao, An adaptive planewave method for electronic structure calculations, 2021, arXiv:2012.14806v2.
  • [36] A. Masud and R. Kannan, B-splines and NURBS based finite element methods for Kohn-Sham equations, Comput. Methods Appl. Mech. Engrg., 241-244 (2012), 112–127.
  • [37] K. Miller and R.N. Miller, Moving finite element methods I, SIAM J. Numer. Anal., 18 (1981) 1019–1032.
  • [38] K. Miller, Moving finite element methods II, SIAM J. Numer. Anal., 18 (1981), 1033–1057.
  • [39] N. A. Modine, G. Zumbach and E. Kaxiras, Adaptive-coordinate real-space electronic-structure calculations for atoms, molecules and solids, Phys. Rev. B, 55 (1997), 289–301.
  • [40] P. Motamarri, M. Nowak, K. Leiter, J. Knap and V. Gavini, Higher-order adaptive finite-element methods for Kohn-Sham density functional theory, J. Comput. Phys., 253 (2013), 308–343.
  • [41] J. Moulin, P. Jolivet and O. Marquet, Augmented Lagrangian preconditioner for large-scale hydrodynamic stability analysis, Comput. Methods Appl. Mech. Engrg., 351 (2019), 718–743.
  • [42] J. E. Pask, B. M. Klein, P. A. Sterne and C. Y. Fong, Finite element methods in electronic-structure theory, Comput. Phys. Comm., 135 (2001), 1–34.
  • [43] J. E. Pask and P. A. Sterne, Finite element methods in ab initio electronic structure calculations, Model. Simul. Mater. Sci. Eng., 13 (2005), R71–R96.
  • [44] J. Perdew, A. Zunger, Self-interaction correction to density-functional approximation for many-electron systems, Phys. Rev., 23 (1981), 5048–5079.
  • [45] M. Reed and B. Simon, Methods of Modern Mathematical Physics, Academic Press, New York, 1975.
  • [46] J.E. Roman, C. Campos, E. Romero, et al., Krylov-Schur methods in SLEPc, Technical Report DSIC-II/24/02, 2020. http://slepc.upv.es.
  • [47] V. Schauer and C. Linder, All-electron Kohn-Sham density functional theory on hierarchic finite element spaces, J. Comput. Phys., 250 (2013), 644–664.
  • [48] C. K. Skylaris, P. D. Haynes, A. A. Mostofi and M. C. Payne, Introducing ONETEP: Linear-scaling density functional simulations on parallel computers, J. Chem. Phys., 122 (2005), 084119.
  • [49] P. Suryanarayana, V. Gavini, T. Blesgen, K. Bhattacharya and M. Ortiz, Non-periodic finite-element formulation of Kohn-Sham density functional theory, J. Mech. Phys. Solids, 58 (2010), 256–280.
  • [50] A. Veillard and E. Clementi, Correlation energy in atomic systems. V. Degeneracy effects for the secondrow atoms, J. Chem. Phys., 49 (1968), 2415–2421.
  • [51] H. Xie, A multigrid method for eigenvalue problem, J. Comput. Phys., 274 (2014), 550–561.
  • [52] H. Xie, A multigrid method for nonlinear eigenvalue problems, Science China: Mathematics (Chinese), 45(8) (2015), 1193–1204.
  • [53] H. Xie and X. Yin, Metric tensors for the interpolation error and its gradient in LpL^{p} norm, J. Comput. Phys., 256 (2014), 543–562.
  • [54] W.Z. Huang and R.D. Russell, Adaptive moving mesh methods, Springer, New York, 2011.