integrals_2el_utils.h
Go to the documentation of this file.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 INTEGRALS_2EL_UTILS_HEADER
00029 #define INTEGRALS_2EL_UTILS_HEADER
00030
00031
00032 #include "organize_distrs.h"
00033 #include "box_system.h"
00034
00035
00036 struct distr_list_description_struct {
00037 distr_org_struct org;
00038 ergo_real totCharge;
00039 ergo_real multipolePoint[3];
00040 multipole_struct_large multipole;
00041 ergo_real maxMomentVectorNormForDistrsList[MAX_MULTIPOLE_DEGREE_BASIC+1];
00042 distr_list_description_struct();
00043 };
00044
00045
00046 #define MAX_NO_OF_BRANCHES 10
00047
00048
00049 typedef struct
00050 {
00051 int basisFuncGroupIndex;
00052 ergo_real max_CS_factor;
00053 ergo_real maxMomentVectorNormList[MAX_MULTIPOLE_DEGREE_BASIC+1];
00054 int maxMultipoleDegree;
00055 } basis_func_group_info_for_box;
00056
00057
00058 struct box_struct {
00059 box_struct_basic basicBox;
00060 distr_list_description_struct distrListForK;
00061 distr_list_description_struct branchList[MAX_NO_OF_BRANCHES];
00062 ergo_real multipolePoint[3];
00063 int branchIndexList[MAX_NO_OF_BRANCHES];
00064 int branchCountList[MAX_NO_OF_BRANCHES];
00065 int noOfBasisFuncs;
00066 int noOfRelevantBasisFuncGroups;
00067 basis_func_group_info_for_box* basisFuncGroupInfoList;
00068 ergo_real largestCSfactor;
00069 ergo_real multipoleEuclideanNormList[MAX_MULTIPOLE_DEGREE_BASIC+1];
00070 box_struct();
00071 };
00072
00073
00074 typedef struct
00075 {
00076 ergo_real* summedIntegralList;
00077 ergo_real* primitiveIntegralList;
00078 ergo_real* primitiveIntegralList_work;
00079 ergo_real* partial_dmat_1;
00080 ergo_real* partial_dmat_2;
00081 ergo_real* partial_K_1;
00082 ergo_real* partial_K_2;
00083 } JK_contribs_buffer_struct;
00084
00085
00086
00087
00088 ergo_real get_max_abs_vector_element(int n, const ergo_real* vector);
00089
00090 void
00091 allocate_buffers_needed_by_integral_code(const IntegralInfo* integralInfo,
00092 int maxNoOfMonomials,
00093 int basisFuncListCount_max,
00094 JK_contribs_buffer_struct* bufferStruct);
00095
00096 void
00097 free_buffers_needed_by_integral_code(JK_contribs_buffer_struct* bufferStruct);
00098
00099 int
00100 get_related_integrals_h(const IntegralInfo* b,
00101 const JK::ExchWeights & CAM_params,
00102 int n1max, int noOfMonomials_1,
00103 int n2max, int noOfMonomials_2,
00104 ergo_real dx0,
00105 ergo_real dx1,
00106 ergo_real dx2,
00107 ergo_real alpha1,
00108 ergo_real alpha2,
00109 ergo_real alpha0,
00110 ergo_real* primitiveIntegralList,
00111 ergo_real* primitiveIntegralList_work,
00112 ergo_real resultPreFactor);
00113
00114 void
00115 compute_extent_for_list_of_distributions(int n,
00116 DistributionSpecStructLabeled* distrList,
00117 ergo_real threshold,
00118 ergo_real maxLimitingFactor,
00119 ergo_real maxabsDmatelement);
00120
00121 int
00122 get_list_of_labeled_distrs_maxLimitingFactor(const BasisInfoStruct & basisInfo,
00123 const IntegralInfo* integralInfo,
00124 ergo_real threshold,
00125 ergo_real* resultMaxLimitingFactor,
00126 ergo_real maxDensityMatrixElement);
00127
00128 int
00129 get_list_of_labeled_distrs(const BasisInfoStruct & basisInfo,
00130 const IntegralInfo* integralInfo,
00131 ergo_real threshold,
00132 DistributionSpecStructLabeled* resultList,
00133 int maxCountDistrs,
00134 ergo_real maxLimitingFactor,
00135 const ergo_real* dens,
00136 ergo_real maxDensityMatrixElement);
00137
00138 int
00139 create_box_system_and_reorder_distrs(int distrCount,
00140 DistributionSpecStructLabeled* distrList,
00141 ergo_real toplevelBoxSize,
00142 BoxSystem & boxSystem);
00143
00144
00145
00146 #endif