Skip to content

Commit

Permalink
caching GaussianConvolution1D takes into account bloch-k and D
Browse files Browse the repository at this point in the history
  • Loading branch information
evaleev committed Dec 12, 2024
1 parent 4967add commit 2eec9b0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/madness/mra/convolution1d.h
Original file line number Diff line number Diff line change
Expand Up @@ -927,11 +927,15 @@ namespace madness {
typedef typename ConcurrentHashMap<hashT, std::shared_ptr< GaussianConvolution1D<Q> > >::iterator iterator;
typedef typename ConcurrentHashMap<hashT, std::shared_ptr< GaussianConvolution1D<Q> > >::datumT datumT;

static std::shared_ptr< GaussianConvolution1D<Q> > get(int k, double expnt, int m, bool periodic) {
static std::shared_ptr< GaussianConvolution1D<Q> > get(int k, double expnt, int m, bool periodic,
double bloch_k = 0.0,
unsigned int D = Convolution1D<Q>::maxD()) {
hashT key = hash_value(expnt);
hash_combine(key, k);
hash_combine(key, m);
hash_combine(key, int(periodic));
hash_combine(key, bloch_k);
hash_combine(key, D);

MADNESS_PRAGMA_CLANG(diagnostic push)
MADNESS_PRAGMA_CLANG(diagnostic ignored "-Wundefined-var-template")
Expand Down

0 comments on commit 2eec9b0

Please sign in to comment.