#include <cstring>#include <cstdio>#include <pthread.h>#include "integrals_2el_coulomb.h"#include "integrals_2el_utils.h"#include "mm_limit_table.h"#include "basis_func_pair_list.h"#include "integrals_2el_repeating.h"#include "integrals_general.h"#include "utilities.h"#include "pi.h"Classes | |
| struct | job_list_standard_entry_J_struct |
| struct | job_list_multipole_entry_J_struct |
| struct | abcd_struct |
| struct | J_std_joblist_thread_struct |
| struct | JFMMWorkerData |
Defines | |
| #define | set_abcd_list_item_macro(i, A, B, C, D, v, i1, i2) list[i].a = A; list[i].b = B; list[i].c = C; list[i].d = D; list[i].densValue = v; list[i].idx1 = i1; list[i].idx2 = i2; |
Functions | |
| static int | get_J_contribs_from_2_interacting_boxes_2 (const BasisInfoStruct &basisInfo, const IntegralInfo *integralInfo, int maxNoOfMonomials, ergo_real *result_J_list, const minimal_distr_struct *minimalDistrList_1, int noOfGroups_1, const distr_group_struct *groupList_1, const minimal_distr_struct *minimalDistrList_2, int noOfGroups_2, const distr_group_struct *groupList_2, const cluster_struct *clusterList_1, int nClusters_1, const cluster_struct *clusterList_2, int nClusters_2, const chunk_struct *chunkList_1, int nChunks_1, const chunk_struct *chunkList_2, int nChunks_2, const basis_func_pair_struct *basisFuncPairList_1, const basis_func_pair_struct *basisFuncPairList_2, int interactionWithSelf, ergo_real threshold, JK_contribs_buffer_struct *bufferStructPtr) |
| static int | do_multipole_interaction_between_2_boxes_branches (const distr_list_description_struct *distrDescription_1, const multipole_struct_large *branchMultipole, const multipole_struct_small *multipoleList_1, ergo_real *result_J_list, ergo_real threshold, int *largest_L_used_so_far, MMInteractor &interactor) |
| static int | add_multipole_jobs_for_2_boxes_branches_recursive (int multipoleBoxIndex, int multipoleBranchIndex, int n, const box_struct *boxList, int boxIndex, int branchIndex, int numberOfLevels, int currLevel, job_list_multipole_entry_J_struct *jobList_multipole, int maxNoOfJobs_multipole) |
| static ergo_real | get_min_distance_from_point_to_box (const ergo_real *boxCenterCoords, ergo_real halfwidth, const ergo_real *point) |
| static int | get_joblists_J_for_two_boxes_recursive (const BasisInfoStruct &basisInfo, const IntegralInfo *integralInfo, int maxNoOfMonomials, ergo_real threshold, const box_struct *boxList, int numberOfLevels, int currLevel, int boxIndex_1, int boxIndex_2, int branchIndex_1, int branchIndex_2, job_list_standard_entry_J_struct *jobList_standard, int maxNoOfJobs_standard, int *noOfNewJobs_standard, job_list_multipole_entry_J_struct *jobList_multipole, int maxNoOfJobs_multipole, int *noOfNewJobs_multipole) |
| static int | get_list_of_labeled_distrs_maxLimitingFactor_linear (const BasisInfoStruct &basisInfo, const IntegralInfo *integralInfo, ergo_real threshold, const basis_func_index_pair_struct *basisFuncIndexPairList, int basisFuncIndexPairCount, ergo_real *resultMaxLimitingFactor) |
| static int | get_list_of_labeled_distrs_linear (const BasisInfoStruct &basisInfo, const IntegralInfo *integralInfo, ergo_real threshold, DistributionSpecStructLabeled *resultList, int maxCountDistrs, ergo_real maxLimitingFactor, const basis_func_index_pair_struct *basisFuncIndexPairList, int basisFuncIndexPairCount, const ergo_real *D_list) |
| static int | compare_multipole_jobs (const void *p1, const void *p2) |
| static void | get_largest_and_smallest_extent_for_list_of_distributions (int n, const DistributionSpecStructLabeled *distrList, ergo_real *result_extent_min, ergo_real *result_extent_max) |
| static int | get_max_no_of_monomials_for_list_of_distributions (int n, const DistributionSpecStructLabeled *distrList, const IntegralInfo *integralInfo) |
| static int | get_branch_splitter_info (ergo_real *branchSplitterList, int maxNoOfBranches, const JK::Params &J_K_params, ergo_real toplevelBoxSize, ergo_real extent_max) |
| static int | create_branches (int noOfBranches, const ergo_real *branchSplitterList, int distrCount, DistributionSpecStructLabeled *distrListOrdered, int noOfBoxesTopLevel, box_struct *boxListTopLevel) |
| static int | execute_joblist_J_std_serial (int noOfJobs_J_standard, const job_list_standard_entry_J_struct *jobList_J_standard, const BasisInfoStruct &basisInfo, const IntegralInfo *integralInfo, int maxNoOfMonomials, ergo_real *result_J_list, const box_struct *boxList, ergo_real threshold) |
| static void * | execute_joblist_J_std_thread_func (void *arg) |
| static int | execute_joblist_J_std_threaded (int noOfThreads, int noOfJobs_J_standard, const job_list_standard_entry_J_struct *jobList_J_standard, const BasisInfoStruct &basisInfo, const IntegralInfo *integralInfo, int maxNoOfMonomials, ergo_real *result_J_list, int noOfBasisFuncIndexPairs, const box_struct *boxList, ergo_real threshold) |
| static int | sort_list_of_multipole_jobs_fixed_boxIndex (job_list_multipole_entry_J_struct *jobList, int n) |
| static int | sort_list_of_multipole_jobs (job_list_multipole_entry_J_struct *jobList, int n) |
| static int | execute_joblist_J_fmm_shared (int jobIndexLo, int jobIndexHi, const IntegralInfo &integralInfo, const BasisInfoStruct &basisInfo, const JK::Params &J_K_params, const job_list_multipole_entry_J_struct *jobList_J_multipole, const box_struct *boxList, int maxnoOfMinimalDistrsPerBoxBranch, ergo_real *result_J_list, int *largest_L_used) |
| executes given jobList using FMM. | |
| static int | execute_joblist_J_fmm_serial (const IntegralInfo &integralInfo, const BasisInfoStruct &basisInfo, const JK::Params &J_K_params, int noOfJobs_J_multipole, const job_list_multipole_entry_J_struct *jobList_J_multipole, const box_struct *boxList, int maxnoOfMinimalDistrsPerBoxBranch, ergo_real *result_J_list) |
| static void * | execute_J_fmm_worker (void *arg) |
| static int | execute_joblist_J_fmm_thread (int noOfThreads, int noOfBasisFuncIndexPairs, const IntegralInfo &integralInfo, const BasisInfoStruct &basisInfo, const JK::Params &J_K_params, int noOfJobs_J_multipole, const job_list_multipole_entry_J_struct *jobList_J_multipole, const box_struct *boxList, int maxnoOfMinimalDistrsPerBoxBranch, ergo_real *result_J_list) |
| Compute the FMM part of the Coulomb matrix using threads. | |
| int | compute_J_by_boxes_linear (const BasisInfoStruct &basisInfo, const IntegralInfo *integralInfo, const JK::Params &J_K_params, const basis_func_index_pair_struct *basisFuncIndexPairList, int basisFuncIndexPairCount, const ergo_real *D_list, ergo_real *result_J_list, int noOfBasisFuncIndexPairs) |
| Computes the Coulomb interaction. | |
| int | compute_J_by_boxes (const BasisInfoStruct &basisInfo, const IntegralInfo *integralInfo, const JK::Params &J_K_params, ergo_real *J, const ergo_real *dens) |
| int | compute_J_by_boxes_nosymm (const BasisInfoStruct &basisInfo, const IntegralInfo *integralInfo, const JK::Params &J_K_params, ergo_real *J, const ergo_real *dens) |
Variables | |
| static const int | HUGE_INTEGER_NUMBER = 2000000000 |
| #define set_abcd_list_item_macro | ( | i, | |||
| A, | |||||
| B, | |||||
| C, | |||||
| D, | |||||
| v, | |||||
| i1, | |||||
| i2 | ) | list[i].a = A; list[i].b = B; list[i].c = C; list[i].d = D; list[i].densValue = v; list[i].idx1 = i1; list[i].idx2 = i2; |
| static int add_multipole_jobs_for_2_boxes_branches_recursive | ( | int | multipoleBoxIndex, | |
| int | multipoleBranchIndex, | |||
| int | n, | |||
| const box_struct * | boxList, | |||
| int | boxIndex, | |||
| int | branchIndex, | |||
| int | numberOfLevels, | |||
| int | currLevel, | |||
| job_list_multipole_entry_J_struct * | jobList_multipole, | |||
| int | maxNoOfJobs_multipole | |||
| ) | [static] |
| static int compare_multipole_jobs | ( | const void * | p1, | |
| const void * | p2 | |||
| ) | [static] |
| int compute_J_by_boxes | ( | const BasisInfoStruct & | basisInfo, | |
| const IntegralInfo * | integralInfo, | |||
| const JK::Params & | J_K_params, | |||
| ergo_real * | J, | |||
| const ergo_real * | dens | |||
| ) |
| int compute_J_by_boxes_linear | ( | const BasisInfoStruct & | basisInfo, | |
| const IntegralInfo * | integralInfo, | |||
| const JK::Params & | J_K_params, | |||
| const basis_func_index_pair_struct * | basisFuncIndexPairList, | |||
| int | basisFuncIndexPairCount, | |||
| const ergo_real * | D_list, | |||
| ergo_real * | result_J_list, | |||
| int | noOfBasisFuncIndexPairs | |||
| ) |
Computes the Coulomb interaction.
| basisInfo | ||
| integralInfo | ||
| J_K_params | the evaluation parameters, thresholds and all. | |
| basisFuncIndexPairList | ||
| basisFuncIndexPairCount | the length of basisFuncIndexPairList. | |
| D_list | basisFuncIndexPairCount elements, with indices matching basisFuncIndexPairList. | |
| result_J_list | preallocated list that will contain the results. | |
| noOfBasisFuncIndexPairs | the length of result_J_list. happens to be always equal to basisFuncIndexPairCount |
| int compute_J_by_boxes_nosymm | ( | const BasisInfoStruct & | basisInfo, | |
| const IntegralInfo * | integralInfo, | |||
| const JK::Params & | J_K_params, | |||
| ergo_real * | J, | |||
| const ergo_real * | dens | |||
| ) |
| static int create_branches | ( | int | noOfBranches, | |
| const ergo_real * | branchSplitterList, | |||
| int | distrCount, | |||
| DistributionSpecStructLabeled * | distrListOrdered, | |||
| int | noOfBoxesTopLevel, | |||
| box_struct * | boxListTopLevel | |||
| ) | [static] |
| static int do_multipole_interaction_between_2_boxes_branches | ( | const distr_list_description_struct * | distrDescription_1, | |
| const multipole_struct_large * | branchMultipole, | |||
| const multipole_struct_small * | multipoleList_1, | |||
| ergo_real * | result_J_list, | |||
| ergo_real | threshold, | |||
| int * | largest_L_used_so_far, | |||
| MMInteractor & | interactor | |||
| ) | [static] |
| static void* execute_J_fmm_worker | ( | void * | arg | ) | [static] |
| static int execute_joblist_J_fmm_serial | ( | const IntegralInfo & | integralInfo, | |
| const BasisInfoStruct & | basisInfo, | |||
| const JK::Params & | J_K_params, | |||
| int | noOfJobs_J_multipole, | |||
| const job_list_multipole_entry_J_struct * | jobList_J_multipole, | |||
| const box_struct * | boxList, | |||
| int | maxnoOfMinimalDistrsPerBoxBranch, | |||
| ergo_real * | result_J_list | |||
| ) | [static] |
| static int execute_joblist_J_fmm_shared | ( | int | jobIndexLo, | |
| int | jobIndexHi, | |||
| const IntegralInfo & | integralInfo, | |||
| const BasisInfoStruct & | basisInfo, | |||
| const JK::Params & | J_K_params, | |||
| const job_list_multipole_entry_J_struct * | jobList_J_multipole, | |||
| const box_struct * | boxList, | |||
| int | maxnoOfMinimalDistrsPerBoxBranch, | |||
| ergo_real * | result_J_list, | |||
| int * | largest_L_used | |||
| ) | [static] |
executes given jobList using FMM.
| jobIndexLo | the first jobindex for which this thread is responsible. | |
| jobIndexHi | the last jobindex for which this thread is responsible is jobIndexHi-1. | |
| integralInfo | info needed for evaluation of integrals of Gaussian functions. | |
| basisInfo | info about the used basis set. | |
| J_K_params | includes various parameters for J and K matrix construction. | |
| jobList_J_multipole | list of multipole-jobs. | |
| boxList | list of boxes. | |
| maxnoOfMinimalDistrsPerBoxBranch | needed to determine size of work buffer. | |
| result_J_list | the list of matrix elements to be updated. | |
| largest_L_used | largest L-value used (output). |
| static int execute_joblist_J_fmm_thread | ( | int | noOfThreads, | |
| int | noOfBasisFuncIndexPairs, | |||
| const IntegralInfo & | integralInfo, | |||
| const BasisInfoStruct & | basisInfo, | |||
| const JK::Params & | J_K_params, | |||
| int | noOfJobs_J_multipole, | |||
| const job_list_multipole_entry_J_struct * | jobList_J_multipole, | |||
| const box_struct * | boxList, | |||
| int | maxnoOfMinimalDistrsPerBoxBranch, | |||
| ergo_real * | result_J_list | |||
| ) | [static] |
Compute the FMM part of the Coulomb matrix using threads.
0th thread reuses result_J_list, all the other threads need to have temporary memory allocated.
| static int execute_joblist_J_std_serial | ( | int | noOfJobs_J_standard, | |
| const job_list_standard_entry_J_struct * | jobList_J_standard, | |||
| const BasisInfoStruct & | basisInfo, | |||
| const IntegralInfo * | integralInfo, | |||
| int | maxNoOfMonomials, | |||
| ergo_real * | result_J_list, | |||
| const box_struct * | boxList, | |||
| ergo_real | threshold | |||
| ) | [static] |
| static void* execute_joblist_J_std_thread_func | ( | void * | arg | ) | [static] |
| static int execute_joblist_J_std_threaded | ( | int | noOfThreads, | |
| int | noOfJobs_J_standard, | |||
| const job_list_standard_entry_J_struct * | jobList_J_standard, | |||
| const BasisInfoStruct & | basisInfo, | |||
| const IntegralInfo * | integralInfo, | |||
| int | maxNoOfMonomials, | |||
| ergo_real * | result_J_list, | |||
| int | noOfBasisFuncIndexPairs, | |||
| const box_struct * | boxList, | |||
| ergo_real | threshold | |||
| ) | [static] |
| static int get_branch_splitter_info | ( | ergo_real * | branchSplitterList, | |
| int | maxNoOfBranches, | |||
| const JK::Params & | J_K_params, | |||
| ergo_real | toplevelBoxSize, | |||
| ergo_real | extent_max | |||
| ) | [static] |
| static int get_J_contribs_from_2_interacting_boxes_2 | ( | const BasisInfoStruct & | basisInfo, | |
| const IntegralInfo * | integralInfo, | |||
| int | maxNoOfMonomials, | |||
| ergo_real * | result_J_list, | |||
| const minimal_distr_struct * | minimalDistrList_1, | |||
| int | noOfGroups_1, | |||
| const distr_group_struct * | groupList_1, | |||
| const minimal_distr_struct * | minimalDistrList_2, | |||
| int | noOfGroups_2, | |||
| const distr_group_struct * | groupList_2, | |||
| const cluster_struct * | clusterList_1, | |||
| int | nClusters_1, | |||
| const cluster_struct * | clusterList_2, | |||
| int | nClusters_2, | |||
| const chunk_struct * | chunkList_1, | |||
| int | nChunks_1, | |||
| const chunk_struct * | chunkList_2, | |||
| int | nChunks_2, | |||
| const basis_func_pair_struct * | basisFuncPairList_1, | |||
| const basis_func_pair_struct * | basisFuncPairList_2, | |||
| int | interactionWithSelf, | |||
| ergo_real | threshold, | |||
| JK_contribs_buffer_struct * | bufferStructPtr | |||
| ) | [static] |
| static int get_joblists_J_for_two_boxes_recursive | ( | const BasisInfoStruct & | basisInfo, | |
| const IntegralInfo * | integralInfo, | |||
| int | maxNoOfMonomials, | |||
| ergo_real | threshold, | |||
| const box_struct * | boxList, | |||
| int | numberOfLevels, | |||
| int | currLevel, | |||
| int | boxIndex_1, | |||
| int | boxIndex_2, | |||
| int | branchIndex_1, | |||
| int | branchIndex_2, | |||
| job_list_standard_entry_J_struct * | jobList_standard, | |||
| int | maxNoOfJobs_standard, | |||
| int * | noOfNewJobs_standard, | |||
| job_list_multipole_entry_J_struct * | jobList_multipole, | |||
| int | maxNoOfJobs_multipole, | |||
| int * | noOfNewJobs_multipole | |||
| ) | [static] |
| static void get_largest_and_smallest_extent_for_list_of_distributions | ( | int | n, | |
| const DistributionSpecStructLabeled * | distrList, | |||
| ergo_real * | result_extent_min, | |||
| ergo_real * | result_extent_max | |||
| ) | [static] |
| static int get_list_of_labeled_distrs_linear | ( | const BasisInfoStruct & | basisInfo, | |
| const IntegralInfo * | integralInfo, | |||
| ergo_real | threshold, | |||
| DistributionSpecStructLabeled * | resultList, | |||
| int | maxCountDistrs, | |||
| ergo_real | maxLimitingFactor, | |||
| const basis_func_index_pair_struct * | basisFuncIndexPairList, | |||
| int | basisFuncIndexPairCount, | |||
| const ergo_real * | D_list | |||
| ) | [static] |
| static int get_list_of_labeled_distrs_maxLimitingFactor_linear | ( | const BasisInfoStruct & | basisInfo, | |
| const IntegralInfo * | integralInfo, | |||
| ergo_real | threshold, | |||
| const basis_func_index_pair_struct * | basisFuncIndexPairList, | |||
| int | basisFuncIndexPairCount, | |||
| ergo_real * | resultMaxLimitingFactor | |||
| ) | [static] |
| static int get_max_no_of_monomials_for_list_of_distributions | ( | int | n, | |
| const DistributionSpecStructLabeled * | distrList, | |||
| const IntegralInfo * | integralInfo | |||
| ) | [static] |
| static ergo_real get_min_distance_from_point_to_box | ( | const ergo_real * | boxCenterCoords, | |
| ergo_real | halfwidth, | |||
| const ergo_real * | point | |||
| ) | [static] |
| static int sort_list_of_multipole_jobs | ( | job_list_multipole_entry_J_struct * | jobList, | |
| int | n | |||
| ) | [static] |
| static int sort_list_of_multipole_jobs_fixed_boxIndex | ( | job_list_multipole_entry_J_struct * | jobList, | |
| int | n | |||
| ) | [static] |
const int HUGE_INTEGER_NUMBER = 2000000000 [static] |
1.4.7