From d77dc26e523df58cebfaf9c2be44569ee95f3083 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 13 Sep 2023 16:22:23 +0200 Subject: [PATCH] Fix bugs for Python and Jastrow --- org/qmckl_jastrow_champ.org | 14 +++++++------- python/src/qmckl.i | 5 +++++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/org/qmckl_jastrow_champ.org b/org/qmckl_jastrow_champ.org index 204945b..9cdcefd 100644 --- a/org/qmckl_jastrow_champ.org +++ b/org/qmckl_jastrow_champ.org @@ -422,7 +422,7 @@ qmckl_exit_code qmckl_set_jastrow_champ_aord_num (qmckl_context contex qmckl_exit_code qmckl_set_jastrow_champ_bord_num (qmckl_context context, const int64_t bord_num); qmckl_exit_code qmckl_set_jastrow_champ_cord_num (qmckl_context context, const int64_t cord_num); qmckl_exit_code qmckl_set_jastrow_champ_type_nucl_num (qmckl_context context, const int64_t type_nucl_num); -qmckl_exit_code qmckl_set_jastrow_champ_type_nucl_vector (qmckl_context context, const int64_t* type_nucl_vector, const int64_t nucl_num); +qmckl_exit_code qmckl_set_jastrow_champ_type_nucl_vector (qmckl_context context, const int64_t* type_nucl_vector, const int64_t size_max); qmckl_exit_code qmckl_set_jastrow_champ_a_vector (qmckl_context context, const double * a_vector, const int64_t size_max); qmckl_exit_code qmckl_set_jastrow_champ_b_vector (qmckl_context context, const double * b_vector, const int64_t size_max); qmckl_exit_code qmckl_set_jastrow_champ_c_vector (qmckl_context context, const double * c_vector, const int64_t size_max); @@ -1759,8 +1759,8 @@ qmckl_exit_code qmckl_provide_jastrow_champ_asymp_jasb(qmckl_context context) NULL); } - /* Compute if necessary */ - if (ctx->date > ctx->jastrow_champ.asymp_jasb_date) { +// /* Compute if necessary */ +// if (ctx->date > ctx->jastrow_champ.asymp_jasb_date) { rc = qmckl_compute_jastrow_champ_asymp_jasb(context, ctx->jastrow_champ.bord_num, @@ -1772,7 +1772,7 @@ qmckl_exit_code qmckl_provide_jastrow_champ_asymp_jasb(qmckl_context context) } ctx->jastrow_champ.asymp_jasb_date = ctx->date; - } +// } return QMCKL_SUCCESS; } @@ -3746,8 +3746,8 @@ qmckl_exit_code qmckl_provide_jastrow_champ_asymp_jasa(qmckl_context context) NULL); } - /* Compute if necessary */ - if (ctx->date > ctx->jastrow_champ.asymp_jasa_date) { +// /* Compute if necessary */ +// if (ctx->date > ctx->jastrow_champ.asymp_jasa_date) { /* Allocate array */ if (ctx->jastrow_champ.asymp_jasa == NULL) { @@ -3776,7 +3776,7 @@ qmckl_exit_code qmckl_provide_jastrow_champ_asymp_jasa(qmckl_context context) } ctx->jastrow_champ.asymp_jasa_date = ctx->date; - } +// } return QMCKL_SUCCESS; } diff --git a/python/src/qmckl.i b/python/src/qmckl.i index 5573bdb..91e6271 100644 --- a/python/src/qmckl.i +++ b/python/src/qmckl.i @@ -58,6 +58,11 @@ import_array(); %apply ( double* ARGOUT_ARRAY1 , int64_t DIM1 ) { ( double* const C, const int64_t size_max_C) }; %apply ( double* ARGOUT_ARRAY1 , int64_t DIM1 ) { ( double* const B, const int64_t size_max_B) }; +%apply ( int64_t* IN_ARRAY1 , int64_t DIM1 ) { ( const int64_t* A, const int64_t size_max_A) }; +%apply ( int64_t* IN_ARRAY1 , int64_t DIM1 ) { ( const int64_t* B, const int64_t size_max_B) }; +%apply ( int64_t* ARGOUT_ARRAY1 , int64_t DIM1 ) { ( int64_t* const C, const int64_t size_max_C) }; +%apply ( int64_t* ARGOUT_ARRAY1 , int64_t DIM1 ) { ( int64_t* const B, const int64_t size_max_B) }; + /* Handle properly get_point */