ergo
boysfunction.h
Go to the documentation of this file.
1 /* Ergo, version 3.3, a program for linear scaling electronic structure
2  * calculations.
3  * Copyright (C) 2013 Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek.
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * Primary academic reference:
19  * Kohn−Sham Density Functional Theory Electronic Structure Calculations
20  * with Linearly Scaling Computational Time and Memory Usage,
21  * Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek,
22  * J. Chem. Theory Comput. 7, 340 (2011),
23  * <http://dx.doi.org/10.1021/ct100611z>
24  *
25  * For further information about Ergo, see <http://www.ergoscf.org>.
26  */
27 
28 #ifndef BOYSFUNCTION_HEADER
29 #define BOYSFUNCTION_HEADER
30 
31 #include "realtype.h"
32 #include "polydegree.h"
33 
34 /* We need Boys functions up to a degree 4 times the highest degree of basis functions. */
35 #define BOYS_N_MAX (BASIS_FUNC_POLY_MAX_DEGREE*4+1)
36 
37 #define BOYS_TAB_DEGREE 12
38 #define BOYS_X_MAX 160.0
39 #define BOYS_NO_OF_INTERVALS 200
40 
41 typedef struct
42 {
46 
48  private:
52  public:
53  BoysFunctionManager() : Boys_init_flag(0) { }
54  void init();
55  ergo_real BoysFunction(int n, ergo_real x) const;
56  // Stuff needed for Chunks&Tasks usage
57  void write_to_buffer ( char * dataBuffer, size_t const bufferSize ) const;
58  size_t get_size() const;
59  void assign_from_buffer ( char const * dataBuffer, size_t const bufferSize);
60 };
61 
62 #endif
#define A
double ergo_real
Definition: realtype.h:53
size_t get_size() const
Function needed for Chunks&Tasks usage.
Definition: boysfunction.cc:243
int Boys_init_flag
Definition: boysfunction.h:50
#define BOYS_N_MAX
Definition: boysfunction.h:35
void write_to_buffer(char *dataBuffer, size_t const bufferSize) const
Function needed for Chunks&Tasks usage.
Definition: boysfunction.cc:229
#define BOYS_NO_OF_INTERVALS
Definition: boysfunction.h:39
BoysFuncIntervalStruct Boys_list[BOYS_N_MAX][BOYS_NO_OF_INTERVALS]
Definition: boysfunction.h:49
ergo_real midx
Definition: boysfunction.h:43
Definition: boysfunction.h:41
#define BOYS_TAB_DEGREE
Definition: boysfunction.h:37
ergo_real BoysFunction_pretabulated(int n, ergo_real x) const
Definition: boysfunction.cc:189
BoysFunctionManager()
Definition: boysfunction.h:53
ergo_real BoysFunction(int n, ergo_real x) const
Definition: boysfunction.cc:224
Definition: boysfunction.h:47
void init()
Definition: boysfunction.cc:159
void assign_from_buffer(char const *dataBuffer, size_t const bufferSize)
Function needed for Chunks&Tasks usage.
Definition: boysfunction.cc:248