00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
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