From 993f43ef4a59730cfbdd1c323c066ea890b4f4ce Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Thu, 7 Sep 2023 10:53:06 -0400 Subject: [PATCH] Even odd use case --- Grid/lattice/Lattice_rng.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Grid/lattice/Lattice_rng.h b/Grid/lattice/Lattice_rng.h index b7ef0e82..c9f6aa52 100644 --- a/Grid/lattice/Lattice_rng.h +++ b/Grid/lattice/Lattice_rng.h @@ -361,9 +361,14 @@ public: _bernoulli.resize(_vol,std::discrete_distribution{1,1}); _uid.resize(_vol,std::uniform_int_distribution() ); } - - template inline void fill(Lattice &l,std::vector &dist){ - + template inline void fill(Lattice &l,std::vector &dist) + { + if ( l.Grid()->_isCheckerBoarded ) { + Lattice tmp(_grid); + fill(tmp,dist); + pickCheckerboard(l.Checkerboard(),l,tmp); + return; + } typedef typename vobj::scalar_object scalar_object; typedef typename vobj::scalar_type scalar_type; typedef typename vobj::vector_type vector_type;