mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-08-16 18:38:28 +02:00
Added dim to factor_een and factor_een_deriv_e.
This commit is contained in:
parent
e2a678cc5c
commit
8ed7a8b672
@ -5330,11 +5330,11 @@ assert(fabs(dtmp_c[0][1][0][0][0][0] - 0.237440520852232) < 1e-12);
|
||||
|
||||
*** Get
|
||||
#+begin_src c :comments org :tangle (eval h_func) :noweb yes
|
||||
qmckl_exit_code qmckl_get_jastrow_factor_een(qmckl_context context, double* const factor_een);
|
||||
qmckl_exit_code qmckl_get_jastrow_factor_een(qmckl_context context, double* const factor_een, int64_t* size_max);
|
||||
#+end_src
|
||||
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes :exports none
|
||||
qmckl_exit_code qmckl_get_jastrow_factor_een(qmckl_context context, double* const factor_een)
|
||||
qmckl_exit_code qmckl_get_jastrow_factor_een(qmckl_context context, double* const factor_een, int64_t* size_max)
|
||||
{
|
||||
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
||||
return QMCKL_NULL_CONTEXT;
|
||||
@ -5350,6 +5350,7 @@ qmckl_exit_code qmckl_get_jastrow_factor_een(qmckl_context context, double* cons
|
||||
|
||||
int64_t sze = ctx->electron.walk_num * ctx->electron.num;
|
||||
memcpy(factor_een, ctx->jastrow.factor_een, sze*sizeof(double));
|
||||
(*size_max)=sze;
|
||||
|
||||
return QMCKL_SUCCESS;
|
||||
}
|
||||
@ -5803,7 +5804,8 @@ print("factor_een:",factor_een)
|
||||
assert(qmckl_jastrow_provided(context));
|
||||
|
||||
double factor_een[walk_num];
|
||||
rc = qmckl_get_jastrow_factor_een(context, &(factor_een[0]));
|
||||
size_max=0;
|
||||
rc = qmckl_get_jastrow_factor_een(context, &(factor_een[0]),&size_max);
|
||||
|
||||
assert(fabs(factor_een[0] + 0.37407972141304213) < 1e-12);
|
||||
#+end_src
|
||||
@ -5817,11 +5819,11 @@ assert(fabs(factor_een[0] + 0.37407972141304213) < 1e-12);
|
||||
|
||||
*** Get
|
||||
#+begin_src c :comments org :tangle (eval h_func) :noweb yes
|
||||
qmckl_exit_code qmckl_get_jastrow_factor_een_deriv_e(qmckl_context context, double* const factor_een_deriv_e);
|
||||
qmckl_exit_code qmckl_get_jastrow_factor_een_deriv_e(qmckl_context context, double* const factor_een_deriv_e, int64_t* size_max);
|
||||
#+end_src
|
||||
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes :exports none
|
||||
qmckl_exit_code qmckl_get_jastrow_factor_een_deriv_e(qmckl_context context, double* const factor_een_deriv_e)
|
||||
qmckl_exit_code qmckl_get_jastrow_factor_een_deriv_e(qmckl_context context, double* const factor_een_deriv_e, int64_t* size_max)
|
||||
{
|
||||
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
||||
return QMCKL_NULL_CONTEXT;
|
||||
@ -5837,6 +5839,7 @@ qmckl_exit_code qmckl_get_jastrow_factor_een_deriv_e(qmckl_context context, doub
|
||||
|
||||
int64_t sze = ctx->electron.walk_num * ctx->electron.num;
|
||||
memcpy(factor_een_deriv_e, ctx->jastrow.factor_een_deriv_e, sze*sizeof(double));
|
||||
(*size_max)=sze;
|
||||
|
||||
return QMCKL_SUCCESS;
|
||||
}
|
||||
@ -6382,7 +6385,8 @@ print("factor_een:",factor_een)
|
||||
assert(qmckl_jastrow_provided(context));
|
||||
|
||||
double factor_een_deriv_e[walk_num][elec_num];
|
||||
rc = qmckl_get_jastrow_factor_een_deriv_e(context, &(factor_een_deriv_e[0][0]));
|
||||
size_max=0;
|
||||
rc = qmckl_get_jastrow_factor_een_deriv_e(context, &(factor_een_deriv_e[0][0]),&size_max);
|
||||
|
||||
assert(fabs(factor_een_deriv_e[0][0] + 0.0005481671107226865) < 1e-12);
|
||||
#+end_src
|
||||
|
Loading…
Reference in New Issue
Block a user