mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-12-22 12:23:56 +01:00
Minor changes
This commit is contained in:
parent
d3ac2a01e5
commit
a269d11264
@ -11305,6 +11305,7 @@ qmckl_compute_jastrow_champ_factor_een_gl_hpc(const qmckl_context context,
|
|||||||
const double* restrict een_rescaled_n_gl_2amlnw = een_rescaled_n_gl_0amlnw + elec_num2;
|
const double* restrict een_rescaled_n_gl_2amlnw = een_rescaled_n_gl_0amlnw + elec_num2;
|
||||||
const double* restrict een_rescaled_n_gl_3amnw = een_rescaled_n_gl_0amnw + elec_num3;
|
const double* restrict een_rescaled_n_gl_3amnw = een_rescaled_n_gl_0amnw + elec_num3;
|
||||||
const double* restrict een_rescaled_n_gl_3amlnw = een_rescaled_n_gl_0amlnw + elec_num3;
|
const double* restrict een_rescaled_n_gl_3amlnw = een_rescaled_n_gl_0amlnw + elec_num3;
|
||||||
|
|
||||||
double* const restrict factor_een_gl_1nw = factor_een_gl_0nw + elec_num;
|
double* const restrict factor_een_gl_1nw = factor_een_gl_0nw + elec_num;
|
||||||
double* const restrict factor_een_gl_2nw = factor_een_gl_0nw + elec_num2;
|
double* const restrict factor_een_gl_2nw = factor_een_gl_0nw + elec_num2;
|
||||||
double* const restrict factor_een_gl_3nw = factor_een_gl_0nw + elec_num3;
|
double* const restrict factor_een_gl_3nw = factor_een_gl_0nw + elec_num3;
|
||||||
@ -11571,7 +11572,7 @@ assert(qmckl_jastrow_champ_provided(context));
|
|||||||
| ~dtmp_c~ | ~double[walk_num][0:cord_num-1][0:cord_num][nucl_num][4][elec_num]~ | in | vector of non-zero coefficients |
|
| ~dtmp_c~ | ~double[walk_num][0:cord_num-1][0:cord_num][nucl_num][4][elec_num]~ | in | vector of non-zero coefficients |
|
||||||
| ~een_rescaled_n~ | ~double[walk_num][0:cord_num][nucl_num][elec_num]~ | in | Electron-nucleus rescaled factor |
|
| ~een_rescaled_n~ | ~double[walk_num][0:cord_num][nucl_num][elec_num]~ | in | Electron-nucleus rescaled factor |
|
||||||
| ~een_rescaled_n_gl~ | ~double[walk_num][0:cord_num][nucl_num][4][elec_num]~ | in | Derivative of Electron-nucleus rescaled factor |
|
| ~een_rescaled_n_gl~ | ~double[walk_num][0:cord_num][nucl_num][4][elec_num]~ | in | Derivative of Electron-nucleus rescaled factor |
|
||||||
| ~factor_een_grad~ | ~double[walk_num][4][elec_num]~ | out | Derivative of Electron-nucleus jastrow |
|
| ~factor_een_grad~ | ~double[walk_num][3][elec_num]~ | out | Derivative of Electron-nucleus jastrow |
|
||||||
|
|
||||||
|
|
||||||
#+begin_src f90 :comments org :tangle (eval f) :noweb yes
|
#+begin_src f90 :comments org :tangle (eval f) :noweb yes
|
||||||
@ -11631,9 +11632,9 @@ function qmckl_compute_jastrow_champ_factor_een_grad_doc( &
|
|||||||
do ii = 1, 3
|
do ii = 1, 3
|
||||||
do j = 1, elec_num
|
do j = 1, elec_num
|
||||||
factor_een_grad(j,ii,nw) = factor_een_grad(j,ii,nw) + ( &
|
factor_een_grad(j,ii,nw) = factor_een_grad(j,ii,nw) + ( &
|
||||||
|
dtmp_c(j,ii,a,m ,k,nw) * een_rescaled_n (j, a,m+l,nw) + &
|
||||||
|
dtmp_c(j,ii,a,m+l,k,nw) * een_rescaled_n (j, a,m ,nw) + &
|
||||||
tmp_c(j,a,m ,k,nw) * een_rescaled_n_gl(j,ii,a,m+l,nw) + &
|
tmp_c(j,a,m ,k,nw) * een_rescaled_n_gl(j,ii,a,m+l,nw) + &
|
||||||
(dtmp_c(j,ii,a,m,k,nw)) * een_rescaled_n(j,a,m+l,nw) + &
|
|
||||||
(dtmp_c(j,ii,a,m+l,k,nw)) * een_rescaled_n(j,a,m ,nw) + &
|
|
||||||
tmp_c(j,a,m+l,k,nw) * een_rescaled_n_gl(j,ii,a,m ,nw) &
|
tmp_c(j,a,m+l,k,nw) * een_rescaled_n_gl(j,ii,a,m ,nw) &
|
||||||
) * cn
|
) * cn
|
||||||
end do
|
end do
|
||||||
@ -11798,9 +11799,9 @@ qmckl_compute_jastrow_champ_factor_een_grad_hpc(const qmckl_context context,
|
|||||||
const double* restrict tmp_c_mlkn = tmp_c_mkn + len;
|
const double* restrict tmp_c_mlkn = tmp_c_mkn + len;
|
||||||
const double* restrict een_rescaled_n_mnw = &(een_rescaled_n[addr1]);
|
const double* restrict een_rescaled_n_mnw = &(een_rescaled_n[addr1]);
|
||||||
const double* restrict een_rescaled_n_mlnw = een_rescaled_n_mnw + len;
|
const double* restrict een_rescaled_n_mlnw = een_rescaled_n_mnw + len;
|
||||||
const double* restrict dtmp_c_mknw = &(dtmp_c[addr0 << 2]);
|
const double* restrict dtmp_c_mknw = &(dtmp_c[addr0*4]);
|
||||||
const double* restrict dtmp_c_mlknw = dtmp_c_mknw + len4;
|
const double* restrict dtmp_c_mlknw = dtmp_c_mknw + len4;
|
||||||
const double* restrict een_rescaled_n_gl_mnw = &(een_rescaled_n_gl[addr1 << 2]);
|
const double* restrict een_rescaled_n_gl_mnw = &(een_rescaled_n_gl[addr1*4]);
|
||||||
const double* restrict een_rescaled_n_gl_mlnw = een_rescaled_n_gl_mnw + len4;
|
const double* restrict een_rescaled_n_gl_mlnw = een_rescaled_n_gl_mnw + len4;
|
||||||
|
|
||||||
for (size_t a = 0; a < (size_t) nucl_num; a++) {
|
for (size_t a = 0; a < (size_t) nucl_num; a++) {
|
||||||
@ -11823,10 +11824,12 @@ qmckl_compute_jastrow_champ_factor_een_grad_hpc(const qmckl_context context,
|
|||||||
const double* restrict dtmp_c_1amlknw = dtmp_c_0amlknw + elec_num;
|
const double* restrict dtmp_c_1amlknw = dtmp_c_0amlknw + elec_num;
|
||||||
const double* restrict dtmp_c_2amknw = dtmp_c_0amknw + elec_num2;
|
const double* restrict dtmp_c_2amknw = dtmp_c_0amknw + elec_num2;
|
||||||
const double* restrict dtmp_c_2amlknw = dtmp_c_0amlknw + elec_num2;
|
const double* restrict dtmp_c_2amlknw = dtmp_c_0amlknw + elec_num2;
|
||||||
|
|
||||||
const double* restrict een_rescaled_n_gl_1amnw = een_rescaled_n_gl_0amnw + elec_num;
|
const double* restrict een_rescaled_n_gl_1amnw = een_rescaled_n_gl_0amnw + elec_num;
|
||||||
const double* restrict een_rescaled_n_gl_1amlnw = een_rescaled_n_gl_0amlnw + elec_num;
|
const double* restrict een_rescaled_n_gl_1amlnw = een_rescaled_n_gl_0amlnw + elec_num;
|
||||||
const double* restrict een_rescaled_n_gl_2amnw = een_rescaled_n_gl_0amnw + elec_num2;
|
const double* restrict een_rescaled_n_gl_2amnw = een_rescaled_n_gl_0amnw + elec_num2;
|
||||||
const double* restrict een_rescaled_n_gl_2amlnw = een_rescaled_n_gl_0amlnw + elec_num2;
|
const double* restrict een_rescaled_n_gl_2amlnw = een_rescaled_n_gl_0amlnw + elec_num2;
|
||||||
|
|
||||||
double* const restrict factor_een_grad_1nw = factor_een_grad_0nw + elec_num;
|
double* const restrict factor_een_grad_1nw = factor_een_grad_0nw + elec_num;
|
||||||
double* const restrict factor_een_grad_2nw = factor_een_grad_0nw + elec_num2;
|
double* const restrict factor_een_grad_2nw = factor_een_grad_0nw + elec_num2;
|
||||||
|
|
||||||
@ -11834,21 +11837,22 @@ qmckl_compute_jastrow_champ_factor_een_grad_hpc(const qmckl_context context,
|
|||||||
#pragma omp simd
|
#pragma omp simd
|
||||||
#endif
|
#endif
|
||||||
for (size_t j = 0; j < (size_t) elec_num; ++j) {
|
for (size_t j = 0; j < (size_t) elec_num; ++j) {
|
||||||
factor_een_grad_0nw[j] = factor_een_grad_0nw[j] + cn *
|
factor_een_grad_0nw[j] = factor_een_grad_0nw[j] + cn * (
|
||||||
(tmp_c_amkn[j] * een_rescaled_n_gl_0amlnw[j] +
|
|
||||||
dtmp_c_0amknw [j] * een_rescaled_n_amlnw[j] +
|
dtmp_c_0amknw [j] * een_rescaled_n_amlnw[j] +
|
||||||
dtmp_c_0amlknw[j] * een_rescaled_n_amnw [j] +
|
dtmp_c_0amlknw[j] * een_rescaled_n_amnw [j] +
|
||||||
|
tmp_c_amkn [j] * een_rescaled_n_gl_0amlnw[j] +
|
||||||
tmp_c_amlkn[j] * een_rescaled_n_gl_0amnw [j] );
|
tmp_c_amlkn[j] * een_rescaled_n_gl_0amnw [j] );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_OPENMP
|
#ifdef HAVE_OPENMP
|
||||||
#pragma omp simd
|
#pragma omp simd
|
||||||
#endif
|
#endif
|
||||||
for (size_t j = 0; j < (size_t) elec_num; ++j) {
|
for (size_t j = 0; j < (size_t) elec_num; ++j) {
|
||||||
factor_een_grad_1nw[j] = factor_een_grad_1nw[j] + cn *
|
factor_een_grad_1nw[j] = factor_een_grad_1nw[j] + cn * (
|
||||||
(tmp_c_amkn[j] * een_rescaled_n_gl_1amlnw[j] +
|
|
||||||
dtmp_c_1amknw [j] * een_rescaled_n_amlnw[j] +
|
dtmp_c_1amknw [j] * een_rescaled_n_amlnw[j] +
|
||||||
dtmp_c_1amlknw[j] * een_rescaled_n_amnw [j] +
|
dtmp_c_1amlknw[j] * een_rescaled_n_amnw [j] +
|
||||||
|
tmp_c_amkn [j] * een_rescaled_n_gl_1amlnw[j] +
|
||||||
tmp_c_amlkn[j] * een_rescaled_n_gl_1amnw [j]);
|
tmp_c_amlkn[j] * een_rescaled_n_gl_1amnw [j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11856,10 +11860,10 @@ qmckl_compute_jastrow_champ_factor_een_grad_hpc(const qmckl_context context,
|
|||||||
#pragma omp simd
|
#pragma omp simd
|
||||||
#endif
|
#endif
|
||||||
for (size_t j = 0; j < (size_t) elec_num; ++j) {
|
for (size_t j = 0; j < (size_t) elec_num; ++j) {
|
||||||
factor_een_grad_2nw[j] = factor_een_grad_2nw[j] + cn *
|
factor_een_grad_2nw[j] = factor_een_grad_2nw[j] + cn * (
|
||||||
(tmp_c_amkn[j] * een_rescaled_n_gl_2amlnw[j] +
|
|
||||||
dtmp_c_2amknw [j] * een_rescaled_n_amlnw[j] +
|
dtmp_c_2amknw [j] * een_rescaled_n_amlnw[j] +
|
||||||
dtmp_c_2amlknw[j] * een_rescaled_n_amnw [j] +
|
dtmp_c_2amlknw[j] * een_rescaled_n_amnw [j] +
|
||||||
|
tmp_c_amkn [j] * een_rescaled_n_gl_2amlnw[j] +
|
||||||
tmp_c_amlkn[j] * een_rescaled_n_gl_2amnw [j]);
|
tmp_c_amlkn[j] * een_rescaled_n_gl_2amnw [j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12973,6 +12977,7 @@ assert(qmckl_jastrow_champ_provided(context));
|
|||||||
for (int64_t e=0 ; e<elec_num; ++e) {
|
for (int64_t e=0 ; e<elec_num; ++e) {
|
||||||
if (fabs(total_j_grad[k][m][e] - total_j_deriv[k][m][e]) > 1e-12) {
|
if (fabs(total_j_grad[k][m][e] - total_j_deriv[k][m][e]) > 1e-12) {
|
||||||
printf("%ld %ld %ld\n", k, m, e);
|
printf("%ld %ld %ld\n", k, m, e);
|
||||||
|
printf("total_j_deriv = %20.15e\n", total_j_deriv[k][m][e]);
|
||||||
printf("total_j_grad = %20.15e\n", total_j_grad[k][m][e]);
|
printf("total_j_grad = %20.15e\n", total_j_grad[k][m][e]);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user