Abstract
In wavelet-based solution of eigenvalue-type differential equations, like the Schrödinger equation, refinement in the resolution of the solution is a costly task, as the number of the potential coefficients in the wavelet expansion of the solution increases exponentially with the resolution.
Predicting the magnitude of the next resolution level coefficients from an already existing solution in an economic way helps to either refine the solution,or to select the coefficients, which are to be included into the next resolution level calculations, or to estimate the magnitude of the error of the solution. However, after accepting a solution with a predicted refinement as a basis, the error can still be estimated by a second prediction, i.e., from a prediction to the second finer resolution level coefficients. These secondary predicted coefficients are proven to be oscillating around the values of the wavelet expansion coefficients of the exact solution. The optimal averaging of these coefficients is presented in the following paper using a sliding average with three optimized coefficients for simple, one-dimensional electron structures.
1 Introduction
Wavelet analysis [1, 2] is mainly used for data processing or image compression [3, 4]. As in wavelet theory the key is to divide the space into resolution levels (i.e., components of different frequency), and the various frequency terms also have a spatial index, it is possible to create local refinement with wavelets. The wavelets themselves are the basis functions of such refinement levels, thus it is possible to write a function as a linear combination of these wavelet basis functions. Theoretically wavelet expansions can contain infinitely fine resolution terms, however, usually a finite maximum resolution is sufficient, or at least the function can be approximated reasonably well at a finite resolution level.
The basis functions of the wavelet theory provide a system, where high resolution terms can be either omitted, where there is no fine detail in the function to be represented, or included, if it is necessary. This local refinement possibility is desirable also in discretization [5] and solving [6, 7] differential equations, as mostly the solutions have fine details, quick variation only at certain positions and in most of the space they are smooth. The other advantage of using wavelet basis set is that the discretization of the differential operator is usually quite simple, and it is the same for any system – provided that the operator and the used basis set are the same –, so after calculating the elements of the matrix that represents an operator, the matrix element can be used at any other system, where the same operator arises.
For an adaptively refining solution, the differential equation has to be solved again with the basis functions already included in the previous, rough solution completed with the basis functions at the position where the refinement is necessary. This problem is more emphasized in case of differential equations that lead to eigenvalue-type discretized equations, as the cost of solving an eigenvalue equation, even in a sparse matrix is significantly larger than to solve a set of linear equations. This is the reason why most of the applications of wavelets, like [6, 8–10] are for non-eigenvalue type of equations.
In electron structure calculations wavelets first appeared in the 1990s [11–13], and by now there are a couple of groups using wavelet [11, 12, 14, 15] or multiwavelet [16–19] differential equation solution methods in quantum chemistry. The solvers are usually for two resolution levels, but in the literature some more resolution level using algorithms are also presented [20–25].
In [24] we presented a method for an economic prediction of the finer resolution wavelet coefficients from the previously calculated rough resolution level solution based on a one wavelet perturbation of the solution. This prediction method gives reasonably good approximation of the coefficients (though almost always overshooting a bit) for a very low cost. In [25] we further applied the same algorithm to get a second prediction from the first predicted solution, and the solution is found to be oscillating around the exact expansion coefficients. These former results are summarized in Section III. In Section IV we summarize the way of calculating matrix elements of differential, polynomial and step function operators. In Section V an optimization method is described and tested for getting a good second prediction from the oscillating values in order to approximate the error of the first prediction. The secondary predicted coefficient values are averaged using their first and second neighbors with different weights, and the ideal weights are given for both Euclidean and max norms. The test systems are 1-dimensional harmonic oscillator and electron in a box.
2 Wavelet based discretization of differential eqauations
In discrete wavelet analysis of the square integrable functions’ Hilbert space there are two types of basis functions completing one another. The elements of first type, which expand the resolution levels are called scaling functions. All the scaling functions of a basis set are generated from one mother scaling function ϕ(x) as
with k being the position or shift index, and m the resolution level index. The refinement levels are embedded into one another, thus there is a special condition, a so called refinement equation connecting the neighboring resolution level scaling functions, i.e.,
The coefficients hi determine the shape of the scaling functions, with the condition
The other type of basis functions ensure the refinement between the consecutive resolution levels. These basis functions, the wavelets are very similarly generated from one mother wavelet ψ(x), as the scaling functions, i.e.,
As the wavelets expand the subspace between the two scaling function subspaces, they are also elements of the finer resolution level subspace, i.e., they can be written as
where the coefficient gi = (–1)i hNs–i.
Any square integrable function, like the wave function of the electron system, can be expanded at resolution level M in two ways,
either purely with the Mth level scaling functions, or starting from a rough resolution level m = 0 scaling function expansion and completing with wavelets from the resolution level between the starting level m = 0 and the desired resolution M. In both of the formulae, the index sets Ωm consist of the indices of the scaling functions that are necessary for expanding the function at resolution level m. Similarly, the sets with w in the index correspond to the wavelets that are needed for the mixed, scaling function–wavelet expansions.
It is usual, to use a common notation for the two basis function types, the basis function
with the composite index which contains the the type (ϕ or ψ), resolution level (m), and the shift (k) indices.
For discretizing a differential equation, such as the Schrödinger equation
at resolution level M, we can use (2.5) or (2.6) for wave function Ψ, and arrive at a matrix equation
The notation is the following, the energy E has its Mth level approximation E[M], whereas the differential operator Ĥ is discretized receiving the matrix elements
Here the * is complex conjugation, x is the variable of the functions (it can be also d > 1 dimensional), and Ĥf is the effect of operator Ĥ to function f.
Solving such an equation at very high resolution level, and discarding those coefficients dm,l that are approximately 0 is clearly an extremely expensive task. It is also expensive to go from one rough resolution level to a finer by first including all the wavelets of the finer resolution level that are in the domain of the problem and then selecting the large ones. In electron structures the wave functions have such a wavelet expansion, where the domain of the refinement is shrinking as the resolution increases [21, 22], thus we can win a lot of time by not including those domains to the next refinement level, that had already not been in the previous refinement level. However, by predicting the next resolution level expansion coefficients, we can include only those wavelets, that will really be important in the next level expansion, and the gap between the two sets of wavelets (i.e., the wavelets that seem to be important based on the previous important domain, and the wavelets that seem to be important based on the prediction) can still win a lot of computing time.
3 First and second prediction
Based on a one-wavelet perturbation
of the Mth level wave function solution Ψ[M] we have proved [24] that the prediction
approximates the exact wavelet expansion coefficients rather well, the difference of the predicted and the exact coefficients is less than 20 percent even in very rough resolution levels, moreover, the difference percentage is decreasing with the increase of the resolution. Here we introduced the notation
These predicted coefficients αM,k can be used as not only for selecting, which coefficients should be included into the refinement, but also for estimating the error we caused by not including the next resolution level into the solution. However, there is a temptation for using it as a cheap last refinement step. In order to have an approximation of the solution thus arising, we need a second prediction of the coefficients, based on the first prediction.
Starting from the predicted wave function
i.e., from the wave function Ψ[M] calculated from the M resolution level eigenvalue equation, and the predicted wavelet coefficients αk, we can introduce a second one-wavelet perturbation
Using this as a basis of the Ritz variation principle, similarly to the first prediction, we arrive at the second predicted coefficients
with
This expression is more complicated than the first prediction, as the predicted energy
We showed that the above considerations give good results not only for ground state, but for excited states, too [24, 25].
4 Calculation of the matrix elements
We used two model systems, both one dimensional. As the matrix elements of a harmonic potential and a box potential can be calculated relatively easily [10, 26], we selected the harmonic oscillator and the electron in a potential box problem. These problems describe some properties of the real life wave functions well, the one having smooth tails, the other derivative singularities.
Calculation of the matrix elements
and a potential energy term, which is in case of the harmonic oscillator
and in case of the electron in a box problem
where Ωbox is the support of the box. According to (4.1), (4.2), and (4.3), the following matrix elements should be calculated,
Using the refinement equation (2.2), its ath derivatives,
and their wavelet counterparts (2.4) and
the matrix elements (4.4), (4.5) and (4.6) can be expressed – by lengthy but straightforward calculations containing integral variable exchanges – using the simpler terms
For the above matrix elements the integration can be carried out either numerically, or analytically. Numerical integration is of course computationally very costly, and for chemical calculation high precision is necessary. Even though the matrix elements have to be calculated only once (and stored and loaded afterwards during the actual solution of the differential equation) it is still worth to perform the analytic calculation as the results are more precise, and simpler to obtain.
During the analytic calculation [26] of the matrix elements of the derivative operator (4.1), the integration itself can be written as
which is, as it can be seen, an eigenvalue equation for the non-zero matrix elements Ki. Note, that similar eigenvalue equations are valid for the 0th, 1st, 3rd, etc. derivatives, only the constant in front of the summation is different: instead of 4, in case of the non-derivative the constant is 1, for the first derivative 2, for the third derivative 8, etc. The matrix elements Ki are non-zero, if (-Ns) < i < Ns.
In case of the harmonic potential the calculation is a bit more complex, and a notation for the power of the polynomial is to be introduced, thus
Here, the matrix element of the 0th order polynomial can be calculated according to the note after (4.12); it is the 0th derivative as well. The matrix elements of the higher order polynomials can be calculated from the matrix elements of all the lower order polynomials by a matrix equation similar to (4.13), as it is detailed in [24].
The matrix elements of the box potential can be derived from matrix elements of unit length boxes, i.e., from
The calculation is very similar to (4.12) and (4.13),
It can be seen, that the result is again an eigenvalue equation, but whereas in (4.12) the number of the non-zero elements Ki – i.e., the size of the eigenvalue problem – was (2Ns-1), here, the size is (Ns·Ns). (The support of the scaling function ϕ0,0 is [0, Ns], thus with each of the Ns intervals, where the function ϕ0,0 is not zero, Ns of the shifted scaling functions ϕ0,i overlap.)
If the matrix elements are at the basic resolution level, but none of them has 0 shift index, a straightforward integral variable exchange can transform the matrix elements to Ki,
In the last formula the integral is not restricted to the whole domain outside of the box, like in (4.6), but to the interval
If the matrix elements are between higher resolution level scaling functions, the refinements equation (2.2) and its derivatives (4.7) can be used for stepping down one resolution level. For example, let us see one step in case of the kinetic energy matrix elements,
Similarly, any resolution level can be reached for both of the basis functions, in case of all the three operators.
Also changing one or both of the basis functions to wavelets can be carried out by using the wavelet expansion (2.4) or (4.8).
5 Calculated predictions and averaging
In case of the harmonic oscillator and the electron in a box the one-dimensional problems are solved, and first and second predictions were calculated for the ground state and the first 5 excited states. The resolution level varied from m = 0 wavelets (in this case only first predictions could be made from the scaling function expansion) to m = 4. Two examples at a modest resolution level are given in Fig. 1 and Fig. 2.
The first prediction overestimates usually the real value of the coefficients. The second prediction clearly oscillates around the exact value of the coefficient. We applied a sliding average
with a +2b +2c = 1. Using parameters a and b for the optimization, we got the optimized second prediction given in blue line in Fig. 1 and Fig. 2.
The values of a, b and c are not independent, thus a two-parameter optimization can be carried out. We used two types of norms to determine the distance of the optimized coefficients βk,avg from the exact coefficients dM,k, first, the maximum of the distances of the corresponding elements, and second the Euclidean distance of the vectors (only the components at the last, highest resolution level M, we did not measure the variation of in the lower resolution part of the coefficient vector).
In Fig. 3 an example from the box potential case can be seen. For this system, the minimum distances tend to be around the parameter space point (a = 0.6, b = 0.2) (practically no c is necessary), both for the maximum and for the Euclidean distance case. The errors are usually between 10–4 and 10-3. In Fig. 4 examples from the harmonic oscillator case are presented, here, the minima tend to be nearer to the axis b (i.e., c plays an essential role in compensating the oscillation of the predicted coefficients), and also the error can larger up to 3 · 10-3.
In case of both of the model systems such cases appear, where no minimum can be found at the studied interval, like the second row of Fig. 4, though in case of the harmonic oscillator this happens more often.
The optimized values vary a bit for the two systems, for the five resolution levels, and for the various excitations. The average value of the optimized parameters are a = 0.5, b = 0.2, and the remaining c = 0.05 gives a good approximation of the wavelet coefficients, at least for error prediction, as it can be seen in Figs. 1 and 2. Note, that the goodness measure (the deviation from the exact eigenvector elements dm,k) is very flat, so a quite broad range of parameters fulfill the job of averaging quite well, producing about 20 percent more error than the first prediction in quadratic distance measure.
6 Conclusion
In the previous considerations we studied, whether the method for generating coefficients using a one-wavelet perturbation can be carried out for already predicted solutions. Two model systems, the one-dimensional harmonic oscillator and the one-dimensional electron in a box model was used to derive the conclusion. The second prediction coefficients alone give much higher error, than the first predictions, however, with a uniform optimization process using sliding averaging, the second prediction can be improved and used for estimating the error of the first predicted result. Knowing this fact opens a door in front of an economic last step refinement (i.e., the first prediction) for wavelet-based solutions of quantum mechanical systems or other eigenvalue type differential equations.
Acknowledgement
Supported by the ÚNKP-16-4 New National Excellence Program of the Ministry of Human Capacities of Hungary.
References
[1] Daubechies I., Ten Lectures on Wavelets, CBMS-NSF regional conference series in applied mathematics 61, SIAM, Philadelphia, 199210.1137/1.9781611970104Search in Google Scholar
[2] Chui C.K., An Introduction to Wavelets, Academic Press, San Diego, 199210.1063/1.4823126Search in Google Scholar
[3] Kiely A., Klimesh M., The ICER Progressive Wavelet Image Compressor, IPN Progress Report 42-155, November 15, 2003 http://ipnpr.jpl.nasa.gov/tmo/progress report/42-155/155J.pdfSearch in Google Scholar
[4] Christopoulos Ch., Skodras A., Ebrahimi T., The JPEG2000 Still Image Coding System: An Overview, IEEE Trans. Consumer Electronics, 2000, 46, 1103-1127 10.1109/30.920468Search in Google Scholar
[5] Galerkin B.G., “On electrical circuits for the approximate solution of the Laplace equation” – in Russian, Vestnik Inzh., 1915, 1, 897Search in Google Scholar
[6] Dahmen W., Wavelets and Multiscale Methods for Operator Equations, Acta Numerica, 1997, 6, 5510.1007/978-3-540-39810-3_2Search in Google Scholar
[7] Urban K., Wavelet Methods for Elliptic Partial Differential Equations, Oxford University Press, Oxford, 200910.1093/acprof:oso/9780198526056.001.0001Search in Google Scholar
[8] Yang Sh., Ni G., Ho S.L., Machado J.M., Rahman M.A., Wong H.C., Wavelet-Galerkin Method for Computations of Electromagnetic Fields – Computation of Connection Coefficients, IEEE Trans. Magn., 2000, 36, 64410.1109/20.877532Search in Google Scholar
[9] Rickard Y.,An efficient wavelet-based solution of electromagnetic field problems, Appl. Numer. Math., 2008, 58, 47210.1016/j.apnum.2007.01.020Search in Google Scholar
[10] Nagy Sz., On wavelet based modeling of the nitrogen oxides emission and concentration due to road traffic in urban environment, Acta Techn. Jaurinensis, 2015, 8, 47-6210.14513/actatechjaur.v8.n1.348Search in Google Scholar
[11] Goedecker S., Ivanov O., Linear scaling solution of the Coulomb problem using wavelets, Solid State Commun., 1998, 105, 665-669.10.1016/S0038-1098(97)10241-1Search in Google Scholar
[12] Goedecker S., Linear scaling electronic structure methods, Rev. Mod. Phys., 1999, 71, 108510.1103/RevModPhys.71.1085Search in Google Scholar
[13] Harrison R.J., Fann G.I., Yanai T., Gan Zh. and Beylkin G., Multiresolution quantum chemistry: basic theory and initial applications, J. Chem. Phys., 2004, 121, 11587.10.1063/1.1791051Search in Google Scholar PubMed
[14] Genovese L., Neelov A., Goedecker S., Deutsch T., Ghasemi S.A., Willand A., et al., Daubechies wavelets as a basis set for density functional pseudopotential calculations, J. Chem. Phys., 2008, 129, 014109.10.1063/1.2949547Search in Google Scholar PubMed
[15] Mohr S., Ratcliff L.E., Genovese L., Caliste D., Boulanger P., Goedecker S., Deutsch T., Accurate and efficient linear scaling DFT calculations with universal applicability, Phys. Chem. Chem. Phys., 2015, 17, 31360-3137010.1039/C5CP00437CSearch in Google Scholar
[16] Jensen S.R., Juslius J., Durdek A., Flå T., Wind P., and Frediani L., Linear scaling Coulomb interaction in the multiwavelet basis, a parallel implementation, Int. J. Model. Simul. Sci. Comput., 2014, 05, 144100310.1142/S1793962314410037Search in Google Scholar
[17] Durdek A.P.R., Jensen S.R., Juselius J., Wind P., FlåT., and Frediani L., Adaptive order polynomial algorithm in a multiwavelet representation scheme, Appl. Numerical Math., 2014, 92, 40-53.10.1016/j.apnum.2014.12.006Search in Google Scholar
[18] Frediani L., Fossgaard E., FlåT., and Ruud K., Fully adaptive algorithms for multivariate integral equations using the non-standard form and multiwavelets with applications to the Poisson and bound-state Helmholtz kernels in three dimensions, Molecular Phys., 2013, 111, 1143-116010.1080/00268976.2013.810793Search in Google Scholar
[19] Yanai T., Fann G.I., Beylkin G., Harrison R.J., Multiresolution quantum chemistry in multiwavelet bases: excited states from time-dependent Hartree-Fock and density functional theory via linear response, Phys. Chem. Chem. Phys., 2015, 17, 31405-3141610.1039/C4CP05821FSearch in Google Scholar
[20] Flad H.-J., Hackbusch W., Luo H., and Kolb D., Wavelet-Based Multiscale Methods for Electronic Structure Calculations, In: Analysis, Modeling and Simulation of Multiscale Problems, ed. Alexander Mielke, Springer, Berlin-Heidelberg, 2006, pp. 299-330. 10.1007/3-540-35657-6_11Search in Google Scholar
[21] Nagy Sz., Pipek J., Multiresolution Analysis of Density Operators, Electron Density, and Energy Functionals, Int. J. Quantum Chem., 2001, 84, 52310.1002/qua.1406Search in Google Scholar
[22] Pipek J., Nagy Sz., Refinement trajectory and determination of eigenstates by a wavelet based adaptive method, J. Chem. Phys., 2006, 125, 17410710.1063/1.2363368Search in Google Scholar PubMed
[23] Nagy Sz., Pipek J., A wavelet-based adaptive method for determining eigenstates of electronic systems, Theor. Chim. Acta, 2010, 125, 471-47910.1007/s00214-009-0653-6Search in Google Scholar
[24] Pipek J., Nagy Sz., An Economic Prediction of Refinement Coefficients in Wavelet-Based Adaptive Methods for Electron Structure Calculations, J. Comput. Chem., 2013, 34, 460-46510.1002/jcc.23154Search in Google Scholar PubMed
[25] Nagy Sz., Pipek J., An economic prediction of the finer resolution level wavelet coefficients in electronic structure calculations, Phys. Chem. Chem. Phys., 2015, 17, 31558-3156510.1039/C5CP01214GSearch in Google Scholar
[26] Dahmen W., Micchelli C.A., Using the refinement equation for evaluating integrals of wavelets, SIAM J. Numer. Anal., 1993, 30, 50710.1137/0730024Search in Google Scholar
© 2016 Brigita Sziová et al.
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 3.0 License.