mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-01-05 11:00:36 +01:00
seg fault at qmckl_compute_asymp_jasb
This commit is contained in:
parent
158c2afb41
commit
f6f346d511
@ -1340,8 +1340,36 @@ qmckl_exit_code qmckl_compute_asymp_jasb (
|
|||||||
const double rescale_factor_kappa_ee,
|
const double rescale_factor_kappa_ee,
|
||||||
double* const asymp_jasb ) {
|
double* const asymp_jasb ) {
|
||||||
// Put some code here
|
// Put some code here
|
||||||
|
int64_t i, p, info;
|
||||||
|
double kappa_inv, x, asym_one;
|
||||||
|
|
||||||
return QMCKL_SUCCESS;
|
kappa_inv = 1.0/ rescale_factor_kappa_ee;
|
||||||
|
|
||||||
|
info = QMCKL_SUCCESS;
|
||||||
|
|
||||||
|
if (context == QMCKL_NULL_CONTEXT){
|
||||||
|
info = QMCKL_INVALID_CONTEXT;
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bord_num <= 0) {
|
||||||
|
info = QMCKL_INVALID_ARG_2;
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
asym_one = bord_vector[0] * kappa_inv / (1.0 + bord_vector[1] * kappa_inv);
|
||||||
|
asymp_jasb[0] = asym_one;
|
||||||
|
asymp_jasb[1] = 0.5 * asym_one;
|
||||||
|
|
||||||
|
for (int i=0; i<=1; ++i) {
|
||||||
|
x = kappa_inv;
|
||||||
|
|
||||||
|
for (int p = 1; p < bord_num-1; ++i){
|
||||||
|
x = x * kappa_inv;
|
||||||
|
asymp_jasb[i] = asymp_jasb[i] + bord_vector[p + 1] * x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return info;
|
||||||
} // end function qmckl_exit_code
|
} // end function qmckl_exit_code
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user