1 //
2 // BAGEL - Brilliantly Advanced General Electronic Structure Library
3 // Filename: comperirootlist.h
4 // Copyright (C) 2013 Toru Shiozaki
5 //
6 // Author: Ryan D. Reynolds <RyanDReynolds@u.northwestern.edu>
7 // Maintainer: Shiozaki group
8 //
9 // This file is part of the BAGEL package.
10 //
11 // This program is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation, either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
23 //
24 
25 #ifndef __SRC_INTEGRAL_COMPRYS_COMPERIROOTLIST_H
26 #define __SRC_INTEGRAL_COMPRYS_COMPERIROOTLIST_H
27 
28 #include <functional>
29 #include <complex>
30 #include <src/util/constants.h>
31 
32 namespace bagel {
33 
34   struct ComplexERIRootList  {
35     private:
36       std::function<void (const std::complex<double>*, std::complex<double>*, std::complex<double>*, const int)> rfunc[RYS_MAX + 1];
37 
38       static void complex_eriroot1(const std::complex<double>*, std::complex<double>*, std::complex<double>*, const int);
39       static void complex_eriroot2(const std::complex<double>*, std::complex<double>*, std::complex<double>*, const int);
40       static void complex_eriroot3(const std::complex<double>*, std::complex<double>*, std::complex<double>*, const int);
41       static void complex_eriroot4(const std::complex<double>*, std::complex<double>*, std::complex<double>*, const int);
42       static void complex_eriroot5(const std::complex<double>*, std::complex<double>*, std::complex<double>*, const int);
43       static void complex_eriroot6(const std::complex<double>*, std::complex<double>*, std::complex<double>*, const int);
44       static void complex_eriroot7(const std::complex<double>*, std::complex<double>*, std::complex<double>*, const int);
45       static void complex_eriroot8(const std::complex<double>*, std::complex<double>*, std::complex<double>*, const int);
46       static void complex_eriroot9(const std::complex<double>*, std::complex<double>*, std::complex<double>*, const int);
47       static void complex_eriroot10(const std::complex<double>*, std::complex<double>*, std::complex<double>*, const int);
48       static void complex_eriroot11(const std::complex<double>*, std::complex<double>*, std::complex<double>*, const int);
49       static void complex_eriroot12(const std::complex<double>*, std::complex<double>*, std::complex<double>*, const int);
50       static void complex_eriroot13(const std::complex<double>*, std::complex<double>*, std::complex<double>*, const int);
51 
52 
53     public:
ComplexERIRootListComplexERIRootList54       ComplexERIRootList() {
55         rfunc[1] = &complex_eriroot1;
56         rfunc[2] = &complex_eriroot2;
57         rfunc[3] = &complex_eriroot3;
58         rfunc[4] = &complex_eriroot4;
59         rfunc[5] = &complex_eriroot5;
60         rfunc[6] = &complex_eriroot6;
61         rfunc[7] = &complex_eriroot7;
62         rfunc[8] = &complex_eriroot8;
63         rfunc[9] = &complex_eriroot9;
64         rfunc[10] = &complex_eriroot10;
65         rfunc[11] = &complex_eriroot11;
66         rfunc[12] = &complex_eriroot12;
67         rfunc[13] = &complex_eriroot13;
68       }
69 
rootComplexERIRootList70       void root(const int i, const std::complex<double>* a1, std::complex<double>* a2, std::complex<double>* a3, const int a4) const { rfunc[i](a1, a2, a3, a4); }
71 
72   };
73 
74   const static ComplexERIRootList complexeriroot__;
75 
76 }
77 
78 #endif
79