mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-01-03 10:06:09 +01:00
Added size to factor_ee.
This commit is contained in:
parent
51ee6e58c0
commit
fa535bdcd1
@ -1246,11 +1246,11 @@ assert(qmckl_nucleus_provided(context));
|
||||
|
||||
*** Get
|
||||
#+begin_src c :comments org :tangle (eval h_func) :noweb yes
|
||||
qmckl_exit_code qmckl_get_jastrow_asymp_jasb(qmckl_context context, double* const asymp_jasb);
|
||||
qmckl_exit_code qmckl_get_jastrow_asymp_jasb(qmckl_context context, double* const asymp_jasb, int64_t* size_max);
|
||||
#+end_src
|
||||
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes :exports none
|
||||
qmckl_exit_code qmckl_get_jastrow_asymp_jasb(qmckl_context context, double* const asymp_jasb)
|
||||
qmckl_exit_code qmckl_get_jastrow_asymp_jasb(qmckl_context context, double* const asymp_jasb, int64_t* size_max)
|
||||
{
|
||||
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
||||
return QMCKL_NULL_CONTEXT;
|
||||
@ -1266,6 +1266,7 @@ qmckl_exit_code qmckl_get_jastrow_asymp_jasb(qmckl_context context, double* cons
|
||||
|
||||
size_t sze = 2;
|
||||
memcpy(asymp_jasb, ctx->jastrow.asymp_jasb, sze * sizeof(double));
|
||||
(*size_max) = sze;
|
||||
|
||||
return QMCKL_SUCCESS;
|
||||
}
|
||||
@ -1499,7 +1500,8 @@ assert(rc == QMCKL_SUCCESS);
|
||||
assert(qmckl_jastrow_provided(context));
|
||||
|
||||
double asymp_jasb[2];
|
||||
rc = qmckl_get_jastrow_asymp_jasb(context, asymp_jasb);
|
||||
int64_t size_max=0;
|
||||
rc = qmckl_get_jastrow_asymp_jasb(context, asymp_jasb,&size_max);
|
||||
|
||||
// calculate asymp_jasb
|
||||
assert(fabs(asymp_jasb[0]-0.5323750557252571) < 1.e-12);
|
||||
@ -1519,11 +1521,11 @@ f_{ee} = \sum_{i,j<i} \left\{ \frac{ \eta B_0 C_{ij}}{1 - B_1 C_{ij}} - J_{asym
|
||||
|
||||
*** Get
|
||||
#+begin_src c :comments org :tangle (eval h_func) :noweb yes
|
||||
qmckl_exit_code qmckl_get_jastrow_factor_ee(qmckl_context context, double* const factor_ee);
|
||||
qmckl_exit_code qmckl_get_jastrow_factor_ee(qmckl_context context, double* const factor_ee, 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_ee(qmckl_context context, double* const factor_ee)
|
||||
qmckl_exit_code qmckl_get_jastrow_factor_ee(qmckl_context context, double* const factor_ee, int64_t* size_max)
|
||||
{
|
||||
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
||||
return QMCKL_NULL_CONTEXT;
|
||||
@ -1537,7 +1539,9 @@ qmckl_exit_code qmckl_get_jastrow_factor_ee(qmckl_context context, double* const
|
||||
qmckl_context_struct* const ctx = (qmckl_context_struct* const) context;
|
||||
assert (ctx != NULL);
|
||||
|
||||
memcpy(factor_ee, ctx->jastrow.factor_ee, ctx->electron.walk_num*sizeof(double));
|
||||
int64_t sze=ctx->electron.walk_num;
|
||||
memcpy(factor_ee, ctx->jastrow.factor_ee, sze*sizeof(double));
|
||||
(*size_max) = sze;
|
||||
|
||||
return QMCKL_SUCCESS;
|
||||
}
|
||||
@ -1800,7 +1804,8 @@ print("factor_ee :",factor_ee)
|
||||
assert(qmckl_jastrow_provided(context));
|
||||
|
||||
double factor_ee[walk_num];
|
||||
rc = qmckl_get_jastrow_factor_ee(context, factor_ee);
|
||||
size_max=0;
|
||||
rc = qmckl_get_jastrow_factor_ee(context, factor_ee, &size_max);
|
||||
|
||||
// calculate factor_ee
|
||||
assert(fabs(factor_ee[0]+4.282760865958113) < 1.e-12);
|
||||
|
Loading…
Reference in New Issue
Block a user