mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-08-16 18:38:28 +02:00
compute_cord_vect_full done
This commit is contained in:
parent
511eba5843
commit
586eb92801
@ -5055,7 +5055,7 @@ qmckl_exit_code qmckl_compute_dim_cord_vect (
|
|||||||
| ~cord_vect_full~ | ~double[dim_cord_vect][nucl_num]~ | out | Full list of coefficients |
|
| ~cord_vect_full~ | ~double[dim_cord_vect][nucl_num]~ | out | Full list of coefficients |
|
||||||
|
|
||||||
#+begin_src f90 :comments org :tangle (eval f) :noweb yes
|
#+begin_src f90 :comments org :tangle (eval f) :noweb yes
|
||||||
integer function qmckl_compute_cord_vect_full_f( &
|
integer function qmckl_compute_cord_vect_full_doc_f( &
|
||||||
context, nucl_num, dim_cord_vect, type_nucl_num, &
|
context, nucl_num, dim_cord_vect, type_nucl_num, &
|
||||||
type_nucl_vector, cord_vector, cord_vect_full) &
|
type_nucl_vector, cord_vector, cord_vect_full) &
|
||||||
result(info)
|
result(info)
|
||||||
@ -5098,29 +5098,14 @@ integer function qmckl_compute_cord_vect_full_f( &
|
|||||||
cord_vect_full(a,1:dim_cord_vect) = cord_vector(type_nucl_vector(a),1:dim_cord_vect)
|
cord_vect_full(a,1:dim_cord_vect) = cord_vector(type_nucl_vector(a),1:dim_cord_vect)
|
||||||
end do
|
end do
|
||||||
|
|
||||||
end function qmckl_compute_cord_vect_full_f
|
end function qmckl_compute_cord_vect_full_doc_f
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+CALL: generate_c_header(table=qmckl_factor_cord_vect_full_args,rettyp=get_value("CRetType"),fname=get_value("Name"))
|
#+CALL: generate_c_interface(table=qmckl_factor_cord_vect_full_args,rettyp=get_value("CRetType"),fname="qmckl_compute_cord_vect_full_doc")
|
||||||
|
|
||||||
#+RESULTS:
|
|
||||||
#+begin_src c :tangle (eval h_func) :comments org
|
|
||||||
qmckl_exit_code qmckl_compute_cord_vect_full (
|
|
||||||
const qmckl_context context,
|
|
||||||
const int64_t nucl_num,
|
|
||||||
const int64_t dim_cord_vect,
|
|
||||||
const int64_t type_nucl_num,
|
|
||||||
const int64_t* type_nucl_vector,
|
|
||||||
const double* cord_vector,
|
|
||||||
double* const cord_vect_full );
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
|
|
||||||
#+CALL: generate_c_interface(table=qmckl_factor_cord_vect_full_args,rettyp=get_value("CRetType"),fname=get_value("Name"))
|
|
||||||
|
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
#+begin_src f90 :tangle (eval f) :comments org :exports none
|
#+begin_src f90 :tangle (eval f) :comments org :exports none
|
||||||
integer(c_int32_t) function qmckl_compute_cord_vect_full &
|
integer(c_int32_t) function qmckl_compute_cord_vect_full_doc &
|
||||||
(context, nucl_num, dim_cord_vect, type_nucl_num, type_nucl_vector, cord_vector, cord_vect_full) &
|
(context, nucl_num, dim_cord_vect, type_nucl_num, type_nucl_vector, cord_vector, cord_vect_full) &
|
||||||
bind(C) result(info)
|
bind(C) result(info)
|
||||||
|
|
||||||
@ -5135,13 +5120,106 @@ end function qmckl_compute_cord_vect_full_f
|
|||||||
real (c_double ) , intent(in) :: cord_vector(type_nucl_num,dim_cord_vect)
|
real (c_double ) , intent(in) :: cord_vector(type_nucl_num,dim_cord_vect)
|
||||||
real (c_double ) , intent(out) :: cord_vect_full(nucl_num,dim_cord_vect)
|
real (c_double ) , intent(out) :: cord_vect_full(nucl_num,dim_cord_vect)
|
||||||
|
|
||||||
integer(c_int32_t), external :: qmckl_compute_cord_vect_full_f
|
integer(c_int32_t), external :: qmckl_compute_cord_vect_full_doc_f
|
||||||
info = qmckl_compute_cord_vect_full_f &
|
info = qmckl_compute_cord_vect_full_doc_f &
|
||||||
(context, nucl_num, dim_cord_vect, type_nucl_num, type_nucl_vector, cord_vector, cord_vect_full)
|
(context, nucl_num, dim_cord_vect, type_nucl_num, type_nucl_vector, cord_vector, cord_vect_full)
|
||||||
|
|
||||||
end function qmckl_compute_cord_vect_full
|
end function qmckl_compute_cord_vect_full_doc
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src c :comments org :tangle (eval c) :noweb yes
|
||||||
|
qmckl_exit_code qmckl_compute_cord_vect_full_hpc (
|
||||||
|
const qmckl_context context,
|
||||||
|
const int64_t nucl_num,
|
||||||
|
const int64_t dim_cord_vect,
|
||||||
|
const int64_t type_nucl_num,
|
||||||
|
const int64_t* type_nucl_vector,
|
||||||
|
const double* cord_vector,
|
||||||
|
double* const cord_vect_full ) {
|
||||||
|
|
||||||
|
if (context == QMCKL_NULL_CONTEXT) {
|
||||||
|
return QMCKL_INVALID_CONTEXT;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nucl_num <= 0) {
|
||||||
|
return QMCKL_INVALID_ARG_2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type_nucl_num <= 0) {
|
||||||
|
return QMCKL_INVALID_ARG_4;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dim_cord_vect <= 0) {
|
||||||
|
return QMCKL_INVALID_ARG_5;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i=0; i < dim_cord_vect; ++i) {
|
||||||
|
for (int a=0; a < nucl_num; ++a){
|
||||||
|
cord_vect_full[a + i*nucl_num] = cord_vector[(type_nucl_vector[a]-1)+i*type_nucl_num];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return QMCKL_SUCCESS;
|
||||||
|
}
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
#+CALL: generate_c_header(table=qmckl_factor_cord_vect_full_args,rettyp=get_value("CRetType"),fname="qmckl_compute_cord_vect_full_doc")
|
||||||
|
|
||||||
|
#+RESULTS:
|
||||||
|
#+begin_src c :tangle (eval h_func) :comments org
|
||||||
|
qmckl_exit_code qmckl_compute_cord_vect_full (
|
||||||
|
const qmckl_context context,
|
||||||
|
const int64_t nucl_num,
|
||||||
|
const int64_t dim_cord_vect,
|
||||||
|
const int64_t type_nucl_num,
|
||||||
|
const int64_t* type_nucl_vector,
|
||||||
|
const double* cord_vector,
|
||||||
|
double* const cord_vect_full );
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src c :tangle (eval h_private_func) :comments org
|
||||||
|
qmckl_exit_code qmckl_compute_cord_vect_full_doc (
|
||||||
|
const qmckl_context context,
|
||||||
|
const int64_t nucl_num,
|
||||||
|
const int64_t dim_cord_vect,
|
||||||
|
const int64_t type_nucl_num,
|
||||||
|
const int64_t* type_nucl_vector,
|
||||||
|
const double* cord_vector,
|
||||||
|
double* const cord_vect_full );
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src c :tangle (eval h_private_func) :comments org
|
||||||
|
qmckl_exit_code qmckl_compute_cord_vect_full_hpc (
|
||||||
|
const qmckl_context context,
|
||||||
|
const int64_t nucl_num,
|
||||||
|
const int64_t dim_cord_vect,
|
||||||
|
const int64_t type_nucl_num,
|
||||||
|
const int64_t* type_nucl_vector,
|
||||||
|
const double* cord_vector,
|
||||||
|
double* const cord_vect_full );
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src c :comments org :tangle (eval c) :noweb yes
|
||||||
|
qmckl_exit_code qmckl_compute_cord_vect_full (
|
||||||
|
const qmckl_context context,
|
||||||
|
const int64_t nucl_num,
|
||||||
|
const int64_t dim_cord_vect,
|
||||||
|
const int64_t type_nucl_num,
|
||||||
|
const int64_t* type_nucl_vector,
|
||||||
|
const double* cord_vector,
|
||||||
|
double* const cord_vect_full ) {
|
||||||
|
|
||||||
|
#ifdef HAVE_HPC
|
||||||
|
return qmckl_compute_cord_vect_full_hpc(context, nucl_num, dim_cord_vect, type_nucl_num, type_nucl_vector, cord_vector, cord_vect_full);
|
||||||
|
#else
|
||||||
|
return qmckl_compute_cord_vect_full_doc(context, nucl_num, dim_cord_vect, type_nucl_num, type_nucl_vector, cord_vector, cord_vect_full);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Compute lkpm_combined_index
|
*** Compute lkpm_combined_index
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:Name: qmckl_compute_lkpm_combined_index
|
:Name: qmckl_compute_lkpm_combined_index
|
||||||
@ -6339,6 +6417,7 @@ double factor_een[walk_num];
|
|||||||
rc = qmckl_get_jastrow_factor_een(context, &(factor_een[0]),walk_num);
|
rc = qmckl_get_jastrow_factor_een(context, &(factor_een[0]),walk_num);
|
||||||
|
|
||||||
assert(fabs(factor_een[0] + 0.37407972141304213) < 1e-12);
|
assert(fabs(factor_een[0] + 0.37407972141304213) < 1e-12);
|
||||||
|
return QMCKL_SUCCESS;
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Electron-electron-nucleus Jastrow \(f_{een}\) derivative
|
** Electron-electron-nucleus Jastrow \(f_{een}\) derivative
|
||||||
|
Loading…
Reference in New Issue
Block a user