From a4ba5deac4a74fe48c8d928408d8d611f285826b Mon Sep 17 00:00:00 2001 From: Gianfranco Abrusci Date: Wed, 9 Mar 2022 11:15:15 +0100 Subject: [PATCH] compute_dim_cord_vect done --- org/qmckl_jastrow.org | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/org/qmckl_jastrow.org b/org/qmckl_jastrow.org index 518ddfb..74fe58e 100644 --- a/org/qmckl_jastrow.org +++ b/org/qmckl_jastrow.org @@ -4979,29 +4979,22 @@ qmckl_exit_code qmckl_compute_dim_cord_vect ( return QMCKL_INVALID_ARG_2; } - printf("hello %d\n", *dim_cord_vect); *dim_cord_vect = 0; - - for (int p=2; p < cord_num; ++p){ - printf("in da loop\n"); - for (int k=p-1; k <= 0; --k) { + + for (int p=2; p <= cord_num; ++p){ + for (int k=p-1; k >= 0; --k) { if (k != 0) { lmax = p - k; } else { lmax = p - k - 2; } - printf("lmax %d\n", lmax); - for (int l = lmax; l <= 0; --l) { -// if ( iand(p - k - l, 1_8) == 1) continue; -// Does it make sense? it should + for (int l = lmax; l >= 0; --l) { if ( ((p - k - l) & 1)==1) continue; - printf("in da loop\n"); - *dim_cord_vect = *dim_cord_vect + 1; + *dim_cord_vect=*dim_cord_vect+1; } } } - printf("hello 2 %d\n", *dim_cord_vect); - + return QMCKL_SUCCESS; } #+end_src