SIRIUS 7.5.0
Electronic structure library and applications
sbessel.hpp
Go to the documentation of this file.
1// Copyright (c) 2013-2018 Anton Kozhevnikov, Thomas Schulthess
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without modification, are permitted provided that
5// the following conditions are met:
6//
7// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
8// following disclaimer.
9// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
10// and the following disclaimer in the documentation and/or other materials provided with the distribution.
11//
12// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
13// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
14// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
15// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
16// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
17// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
18// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19
20/** \file sbessel.hpp
21 *
22 * \brief Contains implementation of sirius::Spherical_Bessel_functions class.
23 */
24
25#ifndef __SBESSEL_HPP__
26#define __SBESSEL_HPP__
27
28#include <vector>
29#include "radial/spline.hpp"
31
32namespace sirius {
33
34namespace sf {
35
36/// Spherical Bessel functions \f$ j_{\ell}(q x) \f$ up to lmax.
38{
39 private:
40 double q_{0};
41
42 Radial_grid<double> const* rgrid_{nullptr};
43
44 std::vector<Spline<double>> sbessel_;
45
46 public:
48
49 Spherical_Bessel_functions(int lmax__, Radial_grid<double> const& rgrid__, double q__);
50
51 static void sbessel(int lmax__, double t__, double* jl__);
52
53 static void sbessel_deriv_q(int lmax__, double q__, double x__, double* jl_dq__);
54
55 Spline<double> const& operator[](int l__) const;
56
57 /// Derivative of Bessel function with respect to q.
58 /** \f[
59 \frac{\partial j_{\ell}(q x)}{\partial q} = \frac{\ell}{q} j_{\ell}(q x) - x j_{\ell+1}(q x)
60 \f]
61 */
62 Spline<double> deriv_q(int l__);
63
64};
65
66} // namespace sf
67
68}; // namespace sirius
69
70#endif
Spherical Bessel functions up to lmax.
Definition: sbessel.hpp:38
Spline< double > deriv_q(int l__)
Derivative of Bessel function with respect to q.
Definition: sbessel.cpp:107
Namespace of the SIRIUS library.
Definition: sirius.f90:5
Contains declaraion and partial implementation of sirius::Radial_grid class.
Contains definition and partial implementation of sirius::Spline class.