diff --git a/configure.ac b/configure.ac index eb31b93..fcc1dc5 100644 --- a/configure.ac +++ b/configure.ac @@ -222,13 +222,13 @@ AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug],[compile for debugging])], if test "$ok" = "yes"; then if test "$GCC" = "yes"; then CFLAGS="$CFLAGS \ --Wall -W -Wbad-function-cast -Wcast-qual -Warray-bounds -Wdisabled-optimization \ +-g -Wall -W -Wbad-function-cast -Wcast-qual -Warray-bounds -Wdisabled-optimization \ -Wpointer-arith -Wcast-align -Wpedantic -Wextra -Walloc-zero -Werror \ " fi if test "$GFC" = "yes"; then FCFLAGS="$FCFLAGS \ --fcheck=all -Waliasing -Wampersand -Wconversion \ +-g -fcheck=all -Waliasing -Wampersand -Wconversion \ -Wsurprising -ffpe-trap=zero,overflow,underflow \ -Wintrinsics-std -Wno-tabs -Wintrinsic-shadow -Wline-truncation \ -Wreal-q-constant -Wuninitialized -fbacktrace -finit-real=nan" diff --git a/org/qmckl_ao.org b/org/qmckl_ao.org index a982379..55057bd 100644 --- a/org/qmckl_ao.org +++ b/org/qmckl_ao.org @@ -3154,7 +3154,7 @@ assert(0 == test_qmckl_ao_gaussian_vgl(context)); const double* coord, const double* nucl_coord, const double* expo, - double* const primitive_vgl ); + double* const primitive_vgl ); #+end_src @@ -3493,7 +3493,7 @@ for (j=0 ; j lmax+3); double pows[3][size_max]; - - for (int32_t i=0 ; i<=2 ; ++i) { + + for (int32_t i=0 ; i<3 ; ++i) { pows[0][i] = 1.0; pows[1][i] = 1.0; pows[2][i] = 1.0; } - + for (int32_t i=3 ; i<=lmax+2 ; ++i) { pows[0][i] = pows[0][i-1] * Y[0]; pows[1][i] = pows[1][i-1] * Y[1]; pows[2][i] = pows[2][i-1] * Y[2]; } - - int32_t* l[24]; + + int32_t* l[size_max]; for (int32_t i=0 ; i=0 ; --a) { double db = dd-da; - + for (int32_t b=d-a ; b>=0 ; --b) { - const int32_t c = d - a - b; + const int32_t c = d - a - b; const double dc = dd - da - db; - + double xy = pows[0][a+2] * pows[1][b+2]; double yz = pows[1][b+2] * pows[2][c+2]; double xz = pows[0][a+2] * pows[2][c+2]; - + l[m][0] = a; l[m][1] = b; l[m][2] = c; - + vgl1[m] = xy * pows[2][c+2]; - + xy *= dc; xz *= db; yz *= da; - + vgl2[m] = pows[0][a+1] * yz; vgl3[m] = pows[1][b+1] * xz; vgl4[m] = pows[2][c+1] * xy; - + vgl5[m] = (da-1.) * pows[0][a] * yz + (db-1.) * pows[1][b] * xz + (dc-1.) * pows[2][c] * xy; - + db -= 1.0; ++m; } @@ -5040,13 +5035,13 @@ assert(0 == test_qmckl_ao_polynomial_vgl(context)); double X[3] = { 1.1, 2.2, 3.3 }; double R[3] = { 0.2, 1.1, 3.0 }; -int32_t ldv[4] = {1, 4, 10, 20}; -for (int32_t ldl=3 ; ldl<5 ; ++ldl) { +int32_t ldv[8] = {1, 4, 10, 20, 35, 56, 84, 120}; +for (int32_t ldl=3 ; ldl<=5 ; ++ldl) { int64_t n; - int32_t L0[24][ldl]; - int32_t L1[24][ldl]; + int32_t L0[200][ldl]; + int32_t L1[200][ldl]; printf("ldl=%d\n", ldl); - for (int32_t lmax=0 ; lmax<=3 ; lmax++) { + for (int32_t lmax=0 ; lmax<=7 ; lmax++) { double VGL0[5][ldv[lmax]]; double VGL1[5][ldv[lmax]]; memset(&L0[0][0], 0, sizeof(L0)); @@ -5064,7 +5059,7 @@ for (int32_t ldl=3 ; ldl<5 ; ++ldl) { assert( L0[l][k] == L1[l][k] ); } } - + for (int32_t k=0 ; k<5 ; ++k) { for (int32_t l=0 ; lao_basis.ao_vgl = ao_vgl; } #ifdef HAVE_HPC - rc = qmckl_compute_ao_vgl_hpc(context, + if (ctx->ao_basis.type == 'G') { + rc = qmckl_compute_ao_vgl_hpc_gaussian(context, ctx->ao_basis.ao_num, ctx->ao_basis.shell_num, ctx->ao_basis.prim_num, @@ -5710,6 +5706,45 @@ qmckl_exit_code qmckl_provide_ao_vgl(qmckl_context context) ctx->ao_basis.exponent, ctx->ao_basis.coefficient_normalized, ctx->ao_basis.ao_vgl); + /* + } else if (ctx->ao_basis.type == 'S') { + rc = qmck_compute_ao_vgl_hpc_slater(context, + ctx->ao_basis.ao_num, + ctx->ao_basis.shell_num, + ctx->ao_basis.prim_num, + ctx->point.num, + ctx->nucleus.num, + ctx->point.coord.data, + ctx->nucleus.coord.data, + ctx->ao_basis.nucleus_index, + ctx->ao_basis.nucleus_shell_num, + ctx->ao_basis.nucleus_range, + ctx->ao_basis.nucleus_max_ang_mom, + ctx->ao_basis.shell_ang_mom, + ctx->ao_basis.shell_prim_index, + ctx->ao_basis.shell_prim_num, + ctx->ao_basis.ao_factor, + ctx->ao_basis.exponent, + ctx->ao_basis.coefficient_normalized, + ctx->ao_basis.ao_vgl); + ,*/ + } else { + rc = qmckl_compute_ao_vgl_doc(context, + ctx->ao_basis.ao_num, + ctx->ao_basis.shell_num, + ctx->point.num, + ctx->nucleus.num, + ctx->point.coord.data, + ctx->nucleus.coord.data, + ctx->ao_basis.nucleus_index, + ctx->ao_basis.nucleus_shell_num, + ctx->ao_basis.nucleus_range, + ctx->ao_basis.nucleus_max_ang_mom, + ctx->ao_basis.shell_ang_mom, + ctx->ao_basis.ao_factor, + ctx->ao_basis.shell_vgl, + ctx->ao_basis.ao_vgl); + } #else rc = qmckl_compute_ao_vgl_doc(context, ctx->ao_basis.ao_num,