Skip to content

Commit c02797c

Browse files
committed
LIBINT_HARD_MAX_AM appears in config.h
1 parent e9c577d commit c02797c

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ esac
341341
)
342342

343343
LIBINT_HARD_MAX_AM=12
344+
AC_DEFINE_UNQUOTED(LIBINT_HARD_MAX_AM,$LIBINT_HARD_MAX_AM)
344345
LIBINT_MAX_AM=4
345346
AC_ARG_WITH(max-am,
346347
AS_HELP_STRING([--with-max-am=N],[Support Gaussians of angular momentum up to N. Can specify values for each derivative levels as a list N0,N1,N2...]),

include/libint2/config.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
/* Prefix for all names in API */
4848
#undef LIBINT_API_PREFIX
4949

50+
/* Max AM supported by Libint *in principle* */
51+
#undef LIBINT_HARD_MAX_AM
52+
5053
/* Max AM (same for all derivatives; if not defined see LIBINT_MAX_AM_LIST) */
5154
#undef LIBINT_MAX_AM
5255

include/libint2/solidharmonics.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ class SolidHarmonicsCoefficients {
8383
static const SolidHarmonicsCoefficients& instance(unsigned int l) {
8484
static std::vector<SolidHarmonicsCoefficients> shg_coefs(
8585
SolidHarmonicsCoefficients::CtorHelperIter(0),
86-
SolidHarmonicsCoefficients::CtorHelperIter(13));
86+
SolidHarmonicsCoefficients::CtorHelperIter(LIBINT_HARD_MAX_AM + 1));
87+
assert(l < shg_coefs.size());
8788
return shg_coefs[l];
8889
}
8990

0 commit comments

Comments
 (0)