QMCPACK
WalkerElementsRef.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2020 QMCPACK developers.
6 //
7 // File developed by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Laboratory
8 //
9 // File created by: Peter Doak
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 #ifndef QMCPLUSPLUS_WALKERELEMENTSREF_H
13 #define QMCPLUSPLUS_WALKERELEMENTSREF_H
14 
15 #include "Configuration.h"
16 #include "Particle/Walker.h"
17 
18 namespace qmcplusplus
19 {
20 
21 class TrialWaveFunction;
22 
23 /** type for returning the walker and its elements from MCPopulation
24  *
25  * have no expectations for the validity of the references in this structure past
26  * the context it was returned in. It should not be returned by a call in a
27  * crowd or threaded context.
28  *
29  * @ye-luo's "fat" walker
30  *
31  * We need this if we want to "copyFrom" the whole fat walker when it comes off the line
32  * i.e. mpi. Insuring the "fat" walker is valid at the earliest possible point seems
33  * less likely to end in tears then just calling copyFrom random other places (hopefully)
34  * in time, in order to not access an invalid walker element.
35  */
37 {
38  /** to allow use of emplace back
39  */
40  WalkerElementsRef(Walker<QMCTraits, PtclOnLatticeTraits>& walker_in, ParticleSet& pset_in, TrialWaveFunction& twf_in) : walker(walker_in), pset(pset_in), twf(twf_in) {}
41 ;
45 };
46 
47 }
48 
49 #endif
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
type for returning the walker and its elements from MCPopulation
WalkerElementsRef(Walker< QMCTraits, PtclOnLatticeTraits > &walker_in, ParticleSet &pset_in, TrialWaveFunction &twf_in)
to allow use of emplace back
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
Class to represent a many-body trial wave function.
Walker< QMCTraits, PtclOnLatticeTraits > & walker
A container class to represent a walker.
Definition: Walker.h:49