organize_distrs.h

Go to the documentation of this file.
00001 /* Ergo, version 3.2, a program for linear scaling electronic structure
00002  * calculations.
00003  * Copyright (C) 2012 Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek.
00004  * 
00005  * This program is free software: you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation, either version 3 of the License, or
00008  * (at your option) any later version.
00009  * 
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017  * 
00018  * Primary academic reference:
00019  * Kohn−Sham Density Functional Theory Electronic Structure Calculations 
00020  * with Linearly Scaling Computational Time and Memory Usage,
00021  * Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek,
00022  * J. Chem. Theory Comput. 7, 340 (2011),
00023  * <http://dx.doi.org/10.1021/ct100611z>
00024  * 
00025  * For further information about Ergo, see <http://www.ergoscf.org>.
00026  */
00027 
00028 #ifndef ORGANIZE_DISTRS_HEADER
00029 #define ORGANIZE_DISTRS_HEADER
00030 
00031 #include "output.h"
00032 #include "multipole.h"
00033 
00034 #include <vector>
00035 
00036 
00037 typedef struct
00038 {
00039   int startIndex;
00040   int distrCount;
00041   int nmax;
00042   ergo_real centerCoords[3];
00043   ergo_real exponent;
00044   ergo_real maxSizeGroup;
00045   ergo_real maxExtentGroup;
00046   ergo_real maxLimitingFactorGroup;
00047   ergo_real maxAbsDmatElementGroup;
00048   multipole_struct_small* multipolePtr;
00049   ergo_real multipoleEuclideanNormList[MAX_MULTIPOLE_DEGREE_BASIC+1];
00050 } distr_group_struct;
00051 
00052 typedef struct
00053 {
00054   int basisFuncPairIndex;
00055   int monomialIndex;
00056   ergo_real coeff;
00057 } minimal_distr_struct;
00058 
00059 typedef struct
00060 {
00061   int nmax;
00062   ergo_real exponent;
00063   int groupStartIndex;
00064   int noOfGroups;
00065   ergo_real maxLimitingFactorForCluster;
00066   ergo_real multipoleEuclideanNormList[MAX_MULTIPOLE_DEGREE_BASIC+1];
00067 } cluster_struct;
00068 
00069 typedef struct
00070 {
00071   int index_1;
00072   int index_2;
00073   int index_1_mod;
00074   int index_2_mod;
00075   int index_inbox_1;
00076   int index_inbox_2;
00077   int pairIndex;
00078   ergo_real dmatElement;
00079 } basis_func_pair_struct;
00080 
00081 #ifndef BASIS_FUNC_POLY_MAX_DEGREE
00082 #error The constant BASIS_FUNC_POLY_MAX_DEGREE must be defined.
00083 #endif
00084 #if BASIS_FUNC_POLY_MAX_DEGREE<6
00085 #define MAX_NO_OF_BASIS_FUNC_PAIRS_PER_CHUNK 1000
00086 #else
00087 #define MAX_NO_OF_BASIS_FUNC_PAIRS_PER_CHUNK 10000
00088 #endif
00089 
00090 typedef struct
00091 {
00092   int clusterStartIndex;
00093   int noOfClusters;
00094   int noOfBasisFuncPairs;
00095   int basisFuncPairListIndex;
00096   int basisFuncForChunksIndex;
00097   int basisFuncForChunkCount;
00098   int global_debug_id;
00099 } chunk_struct;
00100 
00101 
00102 struct distr_org_struct {
00103   std::vector<minimal_distr_struct> minimalDistrList;
00104   std::vector<distr_group_struct> groupList;
00105   std::vector<cluster_struct> clusterList;
00106   std::vector<chunk_struct> chunkList;
00107   std::vector<basis_func_pair_struct> basisFuncPairList;
00108   std::vector<int> basisFuncListForChunks;
00109   std::vector<int> basisFuncListForChunks_map;
00110   std::vector<int> basisFuncList;
00111   int minimalDistrCount;
00112   int groupCount;
00113   int clusterCount;
00114   int chunkCount;
00115   int basisFuncPairCount;
00116   int basisFuncForChunksCount;
00117   int basisFuncListCount;
00118   ergo_real maxExtent;
00119   ergo_real maxDistanceOutsideBox;
00120   distr_org_struct():
00121     minimalDistrCount(0), 
00122     groupCount(0), 
00123     clusterCount(0), 
00124     chunkCount(0), 
00125     basisFuncPairCount(0), 
00126     basisFuncForChunksCount(0), 
00127     basisFuncListCount(0), 
00128     maxExtent(0), 
00129     maxDistanceOutsideBox(0)
00130   {}
00131 };
00132 
00133 
00134 
00135 
00136 int
00137 organize_distributions(const IntegralInfo* integralInfo,
00138                        DistributionSpecStructLabeled* distrList_in, 
00139                        int distrCount, 
00140                        distr_org_struct* result,
00141                        const ergo_real* boxCenterCoords,
00142                        ergo_real boxWidth);
00143 
00144 #endif

Generated on Wed Nov 21 09:32:00 2012 for ergo by  doxygen 1.4.7