Psi4
bessel.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Psi4: an open-source quantum chemistry software package
5  *
6  * Copyright (c) 2016-2017 Robert A. Shaw.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This file is part of Psi4.
12  *
13  * Psi4 is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License as published by
15  * the Free Software Foundation, version 3.
16  *
17  * Psi4 is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License along
23  * with Psi4; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  *
26  * @END LICENSE
27  */
28 
29 /* class BesselFunction defines the weights and abscissae required for
30  calculating the modified spherical Bessel function of the first kind,
31  needed for ECP integrals.
32 
33  By Robert A. Shaw 2016
34 
35  REFERENCES:
36  R. Flores-Moreno et al., J. Comput. Chem. 27 (2005), 1009
37  L.E. McMurchie, E. Davidson, J. Comp. Phys. 44 (1981), 289
38 */
39 
40 #ifndef BESSEL_FUNCTION_HEAD
41 #define BESSEL_FUNCTION_HEAD
42 
43 #include <vector>
44 
45 namespace psi {
46 
47 const double SMALL = 1.0E-7;
48 const int TAYLOR_CUT = 5;
49 
58 {
59 private:
61  int lMax;
63  int N;
65  int order;
66 
68  double **K;
70  double *C;
71 
77  int tabulate(const double accuracy);
78 
79 public:
83  BesselFunction(int lMax, int N, int order, const double accuracy);
85 
93  void init(int lMax, int N, int order, const double accuracy);
94 
101  void calculate(const double z, int maxL, std::vector<double> &values);
102 };
103 
104 }
105 #endif
~BesselFunction()
Definition: bessel.cc:63
BesselFunction()
Default constructor. Creates a blank object.
Definition: bessel.cc:42
void calculate(const double z, int maxL, std::vector< double > &values)
Definition: bessel.cc:125
Computes a modified spherical Bessel function of the first kind.
Definition: bessel.h:57
int tabulate(const double accuracy)
Definition: bessel.cc:69
int N
Number of abscissae.
Definition: bessel.h:63
int lMax
Maximum angular momentum.
Definition: bessel.h:61
double ** K
Bessel function values.
Definition: bessel.h:68
double * C
Coefficients for derivatives of Bessel function.
Definition: bessel.h:70
void init(int lMax, int N, int order, const double accuracy)
Definition: bessel.cc:48
int order
Order to which the Bessel series is expanded.
Definition: bessel.h:65
const double SMALL
Definition: bessel.h:47
const int TAYLOR_CUT
Definition: bessel.h:48