ergo
hermite_conversion_prep.h
Go to the documentation of this file.
1 /* Ergo, version 3.7, a program for linear scaling electronic structure
2  * calculations.
3  * Copyright (C) 2018 Elias Rudberg, Emanuel H. Rubensson, Pawel Salek,
4  * and Anastasia Kruchinina.
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  *
19  * Primary academic reference:
20  * Ergo: An open-source program for linear-scaling electronic structure
21  * calculations,
22  * Elias Rudberg, Emanuel H. Rubensson, Pawel Salek, and Anastasia
23  * Kruchinina,
24  * SoftwareX 7, 107 (2018),
25  * <http://dx.doi.org/10.1016/j.softx.2018.03.005>
26  *
27  * For further information about Ergo, see <http://www.ergoscf.org>.
28  */
29 
39 #ifndef HERMITE_CONVERSION_PREP_HEADER
40 #define HERMITE_CONVERSION_PREP_HEADER
41 
42 #include <cstring>
43 #include "realtype.h"
44 #include "polydegree.h"
45 #include "monomial_info.h"
46 #include "simple_sparse_mat.h"
47 
49 {
50  int destIndex;
52  int a_power;
53  int dummy;
55 };
56 
58 
60  int idx_j;
61  int idx_k;
62  int a_power;
63  int dummy;
65 };
66 
68 
70 
72  private:
77  // Simple lists used to represent conversion matrices
82  void clear_lists();
83  public:
84  void init(const monomial_info_struct & monomial_info);
88  int n1max,
89  int n2max,
90  ergo_real a,
91  ergo_real* A,
92  ergo_real* result) const;
94  int n1max,
95  int n2max,
96  ergo_real a,
97  ergo_real* A,
98  ergo_real* result) const;
100  int nmax,
101  ergo_real a,
102  ergo_real* result) const;
104  int nmax,
105  ergo_real a,
106  ergo_real* result) const;
107 
109  int nmax,
110  ergo_real a,
111  i_j_val_struct* result) const;
112 
113  // Stuff needed for Chunks&Tasks usage
115  void write_to_buffer ( char * dataBuffer, size_t const bufferSize ) const;
116  size_t get_size() const;
117  void assign_from_buffer ( char const * dataBuffer, size_t const bufferSize);
118 };
119 
120 
121 #endif
int counters_right_simple[HERMITE_CONVERSION_MAX_N+1]
Definition: hermite_conversion_prep.h:80
#define A
Definition: monomial_info.h:57
int idx_j
Definition: hermite_conversion_prep.h:60
double ergo_real
Definition: realtype.h:69
int counters_left[HERMITE_CONVERSION_MAX_N+1][HERMITE_CONVERSION_MAX_N+1]
Definition: hermite_conversion_prep.h:76
hermite_conversion_element_struct * hermite_conversion_element_struct_ptr
Definition: hermite_conversion_prep.h:67
size_t get_size() const
Function needed for Chunks&Tasks usage.
Definition: hermite_conversion_prep.cc:408
hermite_conversion_info_struct()
Definition: hermite_conversion_prep.cc:194
int counters_left_simple[HERMITE_CONVERSION_MAX_N+1]
Definition: hermite_conversion_prep.h:81
Constant determining which kinds of Gaussian basis functions are allowed; s, p, d, f, etc.
Definition: hermite_conversion_prep.h:59
const int HERMITE_CONVERSION_MAX_N
Definition: hermite_conversion_prep.h:69
ergo_real coeff
Definition: hermite_conversion_prep.h:64
hermite_conversion_contrib_struct_ptr list_right[HERMITE_CONVERSION_MAX_N+1][HERMITE_CONVERSION_MAX_N+1]
Definition: hermite_conversion_prep.h:73
int multiply_by_hermite_conversion_matrix_from_left(const monomial_info_struct &monomial_info, int n1max, int n2max, ergo_real a, ergo_real *A, ergo_real *result) const
Definition: hermite_conversion_prep.cc:242
Definition: simple_sparse_mat.h:42
#define BASIS_FUNC_POLY_MAX_DEGREE
Definition: polydegree.h:51
int a_power
Definition: hermite_conversion_prep.h:52
int get_hermite_conversion_matrix_right_sparse(const monomial_info_struct &monomial_info, int nmax, ergo_real a, i_j_val_struct *result) const
Definition: hermite_conversion_prep.cc:295
int sourceIndex
Definition: hermite_conversion_prep.h:51
Definition of the main floating-point datatype used; the ergo_real type.
int dummy
Definition: hermite_conversion_prep.h:63
Simple sparse matrix implementation.
int get_hermite_conversion_matrix_left(const monomial_info_struct &monomial_info, int nmax, ergo_real a, ergo_real *result) const
Definition: hermite_conversion_prep.cc:320
Code used to organize monomials; contributions like x, y, z, xy, xz etc.
hermite_conversion_contrib_struct_ptr list_left[HERMITE_CONVERSION_MAX_N+1][HERMITE_CONVERSION_MAX_N+1]
Definition: hermite_conversion_prep.h:74
ergo_real coeff
Definition: hermite_conversion_prep.h:54
void clear_lists()
Definition: hermite_conversion_prep.cc:177
Definition: hermite_conversion_prep.h:71
int multiply_by_hermite_conversion_matrix_from_right(const monomial_info_struct &monomial_info, int n1max, int n2max, ergo_real a, ergo_real *A, ergo_real *result) const
Definition: hermite_conversion_prep.cc:212
Definition: hermite_conversion_prep.h:48
int destIndex
Definition: hermite_conversion_prep.h:50
void init(const monomial_info_struct &monomial_info)
Definition: hermite_conversion_prep.cc:56
int dummy
Definition: hermite_conversion_prep.h:53
void assign_from_buffer(char const *dataBuffer, size_t const bufferSize)
Function needed for Chunks&Tasks usage.
Definition: hermite_conversion_prep.cc:428
hermite_conversion_element_struct_ptr list_left_simple[HERMITE_CONVERSION_MAX_N+1]
Definition: hermite_conversion_prep.h:79
hermite_conversion_element_struct_ptr list_right_simple[HERMITE_CONVERSION_MAX_N+1]
Definition: hermite_conversion_prep.h:78
void write_to_buffer(char *dataBuffer, size_t const bufferSize) const
Function needed for Chunks&Tasks usage.
Definition: hermite_conversion_prep.cc:372
int get_hermite_conversion_matrix_right(const monomial_info_struct &monomial_info, int nmax, ergo_real a, ergo_real *result) const
Definition: hermite_conversion_prep.cc:272
int counters_right[HERMITE_CONVERSION_MAX_N+1][HERMITE_CONVERSION_MAX_N+1]
Definition: hermite_conversion_prep.h:75
int a_power
Definition: hermite_conversion_prep.h:62
hermite_conversion_contrib_struct * hermite_conversion_contrib_struct_ptr
Definition: hermite_conversion_prep.h:57
int idx_k
Definition: hermite_conversion_prep.h:61
~hermite_conversion_info_struct()
Definition: hermite_conversion_prep.cc:198