Skip to content

Commit

Permalink
LIBINT_HARD_MAX_AM appears in config.h
Browse files Browse the repository at this point in the history
  • Loading branch information
evaleev committed Mar 4, 2024
1 parent e9c577d commit c02797c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ esac
)

LIBINT_HARD_MAX_AM=12
AC_DEFINE_UNQUOTED(LIBINT_HARD_MAX_AM,$LIBINT_HARD_MAX_AM)
LIBINT_MAX_AM=4
AC_ARG_WITH(max-am,
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...]),
Expand Down
3 changes: 3 additions & 0 deletions include/libint2/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
/* Prefix for all names in API */
#undef LIBINT_API_PREFIX

/* Max AM supported by Libint *in principle* */
#undef LIBINT_HARD_MAX_AM

/* Max AM (same for all derivatives; if not defined see LIBINT_MAX_AM_LIST) */
#undef LIBINT_MAX_AM

Expand Down
3 changes: 2 additions & 1 deletion include/libint2/solidharmonics.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ class SolidHarmonicsCoefficients {
static const SolidHarmonicsCoefficients& instance(unsigned int l) {
static std::vector<SolidHarmonicsCoefficients> shg_coefs(
SolidHarmonicsCoefficients::CtorHelperIter(0),
SolidHarmonicsCoefficients::CtorHelperIter(13));
SolidHarmonicsCoefficients::CtorHelperIter(LIBINT_HARD_MAX_AM + 1));
assert(l < shg_coefs.size());
return shg_coefs[l];
}

Expand Down

0 comments on commit c02797c

Please sign in to comment.