mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-01-03 01:56:18 +01:00
Improved Jastrow
This commit is contained in:
parent
be2a7199c2
commit
2f0ca9f674
@ -6177,19 +6177,22 @@ qmckl_exit_code qmckl_compute_een_rescaled_e_hpc (
|
|||||||
const size_t e2 = elec_num*elec_num;
|
const size_t e2 = elec_num*elec_num;
|
||||||
|
|
||||||
#ifdef HAVE_OPENMP
|
#ifdef HAVE_OPENMP
|
||||||
#pragma omp parallel for
|
#pragma omp parallel
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
double* restrict een_rescaled_e_ij = calloc(len_een_ij,sizeof(double));
|
||||||
|
|
||||||
|
for (size_t kk = 0; kk < elec_pairs ; ++kk) {
|
||||||
|
een_rescaled_e_ij[kk]= 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_OPENMP
|
||||||
|
#pragma omp for
|
||||||
#endif
|
#endif
|
||||||
for (size_t nw = 0; nw < (size_t) walk_num; ++nw) {
|
for (size_t nw = 0; nw < (size_t) walk_num; ++nw) {
|
||||||
|
|
||||||
memset(&een_rescaled_e[nw*(cord_num+1)*elec_num*elec_num],0,(cord_num+1)*elec_num*elec_num*sizeof(double));
|
memset(&een_rescaled_e[nw*(cord_num+1)*elec_num*elec_num],0,(cord_num+1)*elec_num*elec_num*sizeof(double));
|
||||||
|
|
||||||
double* restrict een_rescaled_e_ij = malloc(len_een_ij*sizeof(double));
|
|
||||||
|
|
||||||
memset(&(een_rescaled_e_ij[0]),0,len_een_ij*sizeof(double));
|
|
||||||
for (size_t kk = 0; kk < elec_pairs ; ++kk) {
|
|
||||||
een_rescaled_e_ij[kk]= 1.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t kk = 0;
|
size_t kk = 0;
|
||||||
for (size_t i = 0; i < (size_t) elec_num; ++i) {
|
for (size_t i = 0; i < (size_t) elec_num; ++i) {
|
||||||
double* restrict ee1 = &een_rescaled_e_ij[kk + elec_pairs];
|
double* restrict ee1 = &een_rescaled_e_ij[kk + elec_pairs];
|
||||||
@ -6257,8 +6260,9 @@ qmckl_exit_code qmckl_compute_een_rescaled_e_hpc (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
free(een_rescaled_e_ij);
|
|
||||||
}
|
}
|
||||||
|
free(een_rescaled_e_ij);
|
||||||
|
} // OpenMP
|
||||||
|
|
||||||
return QMCKL_SUCCESS;
|
return QMCKL_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user