ergo
organize_distrs.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 
40 #ifndef ORGANIZE_DISTRS_HEADER
41 #define ORGANIZE_DISTRS_HEADER
42 
43 #include "output.h"
44 #include "multipole.h"
45 #include "simple_sparse_mat.h"
46 
47 #include <vector>
48 
49 
50 typedef struct
51 {
54  int nmax;
55  ergo_real centerCoords[3];
61  ergo_real multipoleEuclNormListForK[MAX_MULTIPOLE_DEGREE_BASIC+1];
63 
64 typedef struct
65 {
70 
71 typedef struct
72 {
73  int nmax;
78  ergo_real multipoleEuclNormListForK[MAX_MULTIPOLE_DEGREE_BASIC+1];
80 
81 typedef struct
82 {
83  int index_1;
84  int index_2;
89  int pairIndex;
92 
93 #ifndef BASIS_FUNC_POLY_MAX_DEGREE
94 #error The constant BASIS_FUNC_POLY_MAX_DEGREE must be defined.
95 #endif
96 #if BASIS_FUNC_POLY_MAX_DEGREE<6
97 #define MAX_NO_OF_BASIS_FUNC_PAIRS_PER_BATCH 1000
98 #else
99 #define MAX_NO_OF_BASIS_FUNC_PAIRS_PER_BATCH 10000
100 #endif
101 
102 typedef struct
103 {
111 } batch_struct;
112 
118 };
119 
120 
122  std::vector<minimal_distr_struct> minimalDistrList;
123  std::vector<distr_group_struct> groupList;
124  std::vector<cluster_struct> clusterList;
125  std::vector<batch_struct> batchList;
126  std::vector<basis_func_pair_struct> basisFuncPairList;
127  std::vector<int> basisFuncListForBatchs;
128  std::vector<int> basisFuncListForBatchs_map;
129  std::vector<int> basisFuncList;
130  std::vector<i_j_val_struct> spMatElementList;
131  std::vector<int> spMatCountList;
132  std::vector<int> spMatIdxList;
133  std::vector<basis_func_group_info_for_box> basisFuncGroupInfoListForK;
134  struct Data {
138  Data();
139  };
141  // Functions needed for CHT usage
142  void writeToBuffer(char* dataBuffer, size_t const bufferSize) const;
143  size_t getSize() const;
144  void assignFromBuffer(char const * dataBuffer, size_t const bufferSize);
145 };
146 
147 
148 int
149 organize_distributions(const IntegralInfo & integralInfo,
150  DistributionSpecStructLabeled* distrList_in,
151  int distrCount,
152  distr_org_struct* result,
153  const ergo_real* boxCenterCoords,
154  ergo_real boxWidth);
155 
156 #endif
std::vector< int > basisFuncListForBatchs_map
Definition: organize_distrs.h:128
ergo_real maxLimitingFactorForCluster
Definition: organize_distrs.h:77
int noOfBasisFuncPairs
Definition: organize_distrs.h:106
std::vector< batch_struct > batchList
Definition: organize_distrs.h:125
double ergo_real
Definition: realtype.h:69
Functionality for writing output messages to a text file.
int index_2
Definition: organize_distrs.h:84
int index_1_mod
Definition: organize_distrs.h:85
int groupStartIndex
Definition: organize_distrs.h:75
int maxNoOfMonomials
Definition: organize_distrs.h:137
Data()
Definition: organize_distrs.cc:52
Definition: organize_distrs.h:50
int nmax
Definition: organize_distrs.h:73
ergo_real dmatElement
Definition: organize_distrs.h:90
int clusterStartIndex
Definition: organize_distrs.h:104
std::vector< int > basisFuncListForBatchs
Definition: organize_distrs.h:127
ergo_real max_CS_factor
Definition: organize_distrs.h:115
std::vector< basis_func_group_info_for_box > basisFuncGroupInfoListForK
Definition: organize_distrs.h:133
ergo_real maxMomentVectorNormList[MAX_MULTIPOLE_DEGREE_BASIC+1]
Definition: organize_distrs.h:116
int nmax
Definition: organize_distrs.h:54
ergo_real maxDistanceOutsideBox
Definition: organize_distrs.h:136
int index_2_mod
Definition: organize_distrs.h:86
int pairIndex
Definition: organize_distrs.h:89
ergo_real maxExtent
Definition: organize_distrs.h:135
std::vector< minimal_distr_struct > minimalDistrList
Definition: organize_distrs.h:122
int noOfClusters
Definition: organize_distrs.h:105
ergo_real maxSizeGroup
Definition: organize_distrs.h:57
int basisFuncForBatchCount
Definition: organize_distrs.h:109
int noOfGroups
Definition: organize_distrs.h:76
void assignFromBuffer(char const *dataBuffer, size_t const bufferSize)
Definition: organize_distrs.cc:94
int basisFuncPairListIndex
Definition: organize_distrs.h:107
int index_inbox_2
Definition: organize_distrs.h:88
int organize_distributions(const IntegralInfo &integralInfo, DistributionSpecStructLabeled *distrList_in, int distrCount, distr_org_struct *result, const ergo_real *boxCenterCoords, ergo_real boxWidth)
Definition: organize_distrs.cc:180
int basisFuncGroupIndex
Definition: organize_distrs.h:114
size_t getSize() const
Definition: organize_distrs.cc:77
std::vector< i_j_val_struct > spMatElementList
Definition: organize_distrs.h:130
ergo_real maxExtentGroup
Definition: organize_distrs.h:58
Contains coefficients needed for quick integral evaluation.
Definition: integral_info.h:93
Simple sparse matrix implementation.
ergo_real maxLimitingFactorGroup
Definition: organize_distrs.h:59
ergo_real coeff
Definition: organize_distrs.h:68
std::vector< distr_group_struct > groupList
Definition: organize_distrs.h:123
Definition: organize_distrs.h:102
int global_debug_id
Definition: organize_distrs.h:110
int index_1
Definition: organize_distrs.h:83
Code for computing multipole moments, and multipole interaction and translation matrices.
#define MAX_MULTIPOLE_DEGREE_BASIC
Definition: multipole_prep.h:48
int startIndex
Definition: organize_distrs.h:52
Data data
Definition: organize_distrs.h:140
ergo_real exponent
Definition: organize_distrs.h:56
int distrCount
Definition: organize_distrs.h:53
std::vector< basis_func_pair_struct > basisFuncPairList
Definition: organize_distrs.h:126
std::vector< int > spMatCountList
Definition: organize_distrs.h:131
Definition: organize_distrs.h:121
int index_inbox_1
Definition: organize_distrs.h:87
Definition: organize_distrs.h:64
std::vector< int > spMatIdxList
Definition: organize_distrs.h:132
Definition: organize_distrs.h:134
int basisFuncForBatchsIndex
Definition: organize_distrs.h:108
int basisFuncPairIndex
Definition: organize_distrs.h:66
Definition: organize_distrs.h:71
int maxMultipoleDegree
Definition: organize_distrs.h:117
Definition: organize_distrs.h:81
int monomialIndex
Definition: organize_distrs.h:67
std::vector< cluster_struct > clusterList
Definition: organize_distrs.h:124
ergo_real exponent
Definition: organize_distrs.h:74
Definition: basisinfo.h:58
ergo_real maxAbsDmatElementGroup
Definition: organize_distrs.h:60
void writeToBuffer(char *dataBuffer, size_t const bufferSize) const
Definition: organize_distrs.cc:58
Definition: organize_distrs.h:113
std::vector< int > basisFuncList
Definition: organize_distrs.h:129