ergo
organize_distrs.h
Go to the documentation of this file.
1/* Ergo, version 3.8, a program for linear scaling electronic structure
2 * calculations.
3 * Copyright (C) 2019 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
50typedef struct
51{
54 int nmax;
55 ergo_real centerCoords[3];
61 ergo_real multipoleEuclNormListForK[MAX_MULTIPOLE_DEGREE_BASIC+1];
63
64typedef struct
65{
70
71typedef struct
72{
73 int nmax;
78 ergo_real multipoleEuclNormListForK[MAX_MULTIPOLE_DEGREE_BASIC+1];
80
81typedef struct
82{
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
102typedef struct
103{
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;
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
148int
149organize_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
Contains coefficients needed for quick integral evaluation.
Definition: integral_info.h:94
Code for computing multipole moments, and multipole interaction and translation matrices.
#define MAX_MULTIPOLE_DEGREE_BASIC
Definition: multipole_prep.h:48
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
Functionality for writing output messages to a text file.
double ergo_real
Definition: realtype.h:69
Simple sparse matrix implementation.
Definition: basisinfo.h:58
Definition: organize_distrs.h:113
ergo_real maxMomentVectorNormList[MAX_MULTIPOLE_DEGREE_BASIC+1]
Definition: organize_distrs.h:116
int maxMultipoleDegree
Definition: organize_distrs.h:117
int basisFuncGroupIndex
Definition: organize_distrs.h:114
ergo_real max_CS_factor
Definition: organize_distrs.h:115
Definition: organize_distrs.h:82
int index_inbox_1
Definition: organize_distrs.h:87
ergo_real dmatElement
Definition: organize_distrs.h:90
int pairIndex
Definition: organize_distrs.h:89
int index_2_mod
Definition: organize_distrs.h:86
int index_inbox_2
Definition: organize_distrs.h:88
int index_2
Definition: organize_distrs.h:84
int index_1
Definition: organize_distrs.h:83
int index_1_mod
Definition: organize_distrs.h:85
Definition: organize_distrs.h:103
int global_debug_id
Definition: organize_distrs.h:110
int clusterStartIndex
Definition: organize_distrs.h:104
int basisFuncPairListIndex
Definition: organize_distrs.h:107
int noOfBasisFuncPairs
Definition: organize_distrs.h:106
int basisFuncForBatchsIndex
Definition: organize_distrs.h:108
int noOfClusters
Definition: organize_distrs.h:105
int basisFuncForBatchCount
Definition: organize_distrs.h:109
Definition: organize_distrs.h:72
int noOfGroups
Definition: organize_distrs.h:76
ergo_real exponent
Definition: organize_distrs.h:74
int nmax
Definition: organize_distrs.h:73
ergo_real maxLimitingFactorForCluster
Definition: organize_distrs.h:77
int groupStartIndex
Definition: organize_distrs.h:75
Definition: organize_distrs.h:51
int nmax
Definition: organize_distrs.h:54
ergo_real maxExtentGroup
Definition: organize_distrs.h:58
ergo_real exponent
Definition: organize_distrs.h:56
int startIndex
Definition: organize_distrs.h:52
ergo_real maxLimitingFactorGroup
Definition: organize_distrs.h:59
int distrCount
Definition: organize_distrs.h:53
ergo_real maxAbsDmatElementGroup
Definition: organize_distrs.h:60
ergo_real maxSizeGroup
Definition: organize_distrs.h:57
Definition: organize_distrs.h:134
ergo_real maxExtent
Definition: organize_distrs.h:135
ergo_real maxDistanceOutsideBox
Definition: organize_distrs.h:136
int maxNoOfMonomials
Definition: organize_distrs.h:137
Data()
Definition: organize_distrs.cc:52
Definition: organize_distrs.h:121
std::vector< int > spMatCountList
Definition: organize_distrs.h:131
std::vector< int > basisFuncList
Definition: organize_distrs.h:129
std::vector< batch_struct > batchList
Definition: organize_distrs.h:125
void writeToBuffer(char *dataBuffer, size_t const bufferSize) const
Definition: organize_distrs.cc:58
std::vector< int > basisFuncListForBatchs
Definition: organize_distrs.h:127
std::vector< cluster_struct > clusterList
Definition: organize_distrs.h:124
std::vector< int > spMatIdxList
Definition: organize_distrs.h:132
std::vector< int > basisFuncListForBatchs_map
Definition: organize_distrs.h:128
std::vector< i_j_val_struct > spMatElementList
Definition: organize_distrs.h:130
size_t getSize() const
Definition: organize_distrs.cc:77
std::vector< basis_func_pair_struct > basisFuncPairList
Definition: organize_distrs.h:126
std::vector< minimal_distr_struct > minimalDistrList
Definition: organize_distrs.h:122
std::vector< distr_group_struct > groupList
Definition: organize_distrs.h:123
Data data
Definition: organize_distrs.h:140
std::vector< basis_func_group_info_for_box > basisFuncGroupInfoListForK
Definition: organize_distrs.h:133
void assignFromBuffer(char const *dataBuffer, size_t const bufferSize)
Definition: organize_distrs.cc:94
Definition: organize_distrs.h:65
int monomialIndex
Definition: organize_distrs.h:67
ergo_real coeff
Definition: organize_distrs.h:68
int basisFuncPairIndex
Definition: organize_distrs.h:66