21 #ifndef QMCPLUSPLUS_WALKER_H 22 #define QMCPLUSPLUS_WALKER_H 48 template<
typename t_traits,
typename p_traits>
118 #if !defined(SOA_MEMORY_OPTIMIZED) 174 inline explicit Walker(
long walker_id,
long parent_id,
int nptcl = 0)
215 typename std::vector<FullPrecRealType>::const_iterator phStart;
217 for (
int i = 0; i < endN; phStart++, i++)
235 inline int size()
const {
return R.size(); }
255 if (
R.size() != a.
R.size())
261 #if !defined(SOA_MEMORY_OPTIMIZED) 379 assert(
R.size() != 0);
381 assert(
spins.size() != 0);
383 #if !defined(SOA_MEMORY_OPTIMIZED) 384 assert(G.size() != 0);
385 DataSet.
add(G.first_address(), G.last_address());
386 assert(
L.size() != 0);
408 assert(
R.size() != 0);
410 assert(
spins.size() != 0);
412 #if !defined(SOA_MEMORY_OPTIMIZED) 413 assert(G.size() != 0);
414 DataSet.
get(G.first_address(), G.last_address());
415 assert(
L.size() != 0);
435 #if !defined(SOA_MEMORY_OPTIMIZED) 436 DataSet.
put(G.first_address(), G.last_address());
475 template<
class RealType,
class PA>
476 std::ostream& operator<<(std::ostream& out, const Walker<RealType, PA>& rhs)
478 copy(rhs.Properties.begin(), rhs.Properties.end(), std::ostream_iterator<double>(out,
" "));
const FullPrecRealType * getPropertyBase() const
std::vector< int > PHindex
Walker(int nptcl=0)
create a walker for n-particles
int size() const
return the number of particles per walker
HamiltonianRef::FullPrecRealType FullPrecRealType
FullPrecRealType * getPropertyBase(int i)
return the address of the i-th properties
PropertyContainer_t Properties
scalar properties of a walker
typename qmcplusplus::PtclOnLatticeTraits ::ParticleGradient ParticleGradient
array of gradients
WFBuffer_t DataSet
buffer for the data for particle-by-particle update
typename qmcplusplus::PtclOnLatticeTraits ::ParticleScalar ParticleScalar
array of scalars
helper functions for EinsplineSetBuilder
std::vector< std::vector< FullPrecRealType > > PropertyHistory
Property history vector.
void copy(const RHS &rhs)
Methods for assignment or copy of identically sized or smaller ConstantSizeMatrix<T, ALLOC>.
typename qmcplusplus::PtclOnLatticeTraits ::ParticlePos ParticlePos
array of particles
void willDie()
marked to die
size_t byteSize()
byte size for a packed message
long parent_id_
in legacy the ancients have said only: id reserved for forward walking
void allocate()
allocate the data
bool SendInProgress
mark true if this walker is being sent.
void resetProperty(FullPrecRealType logpsi, FullPrecRealType sigN, FullPrecRealType ene, FullPrecRealType r2a, FullPrecRealType r2p, FullPrecRealType vq)
reset the property of a walker
int Generation
allegedly DMCgeneration PD: I can find no evidence it is ever updated anywhere in the code...
typename qmcplusplus::QMCTraits ::FullPrecRealType FullPrecRealType
typedef for estimator real data type
int Age
Age of this walker age is incremented when a walker is not moved after a sweep.
void set_has_been_on_wire(bool tf)
bool wasTouched
if true, this walker is either copied or tranferred from another MPI rank.
void copy(const Array< T1, 3 > &src, Array< T2, 3 > &dest)
void makeCopy(const Walker &a)
copy the content of a walker
typename qmcplusplus::QMCTraits ::ValueType ValueType
typedef for value data type.
void resetPropertyHistory()
void resize(int nptcl)
resize for n particles
void resize(size_t m, size_t n)
T * data()
return the address of the first element
Walker(long walker_id, long parent_id, int nptcl=0)
create a valid walker for n-particles (batched version) the goal is for this walker is valid after co...
size_type byteSize() const
return the size of the data
void setParentID(long parent_id)
void deletePropertyHistory()
int addPropertyHistory(int leng)
Walker & operator=(const Walker &a)
assignment operator
typename qmcplusplus::PtclOnLatticeTraits ::ParticleLaplacian ParticleLaplacian
array of laplacians
void reset()
reset the walker weight, multiplicity and age
size_type current() const
QMCTraits::RealType RealType
size_type size() const
return the size of the data
typename qmcplusplus::QMCTraits ::RealType RealType
typedef for real data type
Indexes
an enum denoting index of physical properties
typename qmcplusplus::PtclOnLatticeTraits ::SingleParticleValue SingleParticleValue
typedef for value data type.
FullPrecRealType getPropertyHistorySum(int index, int endN)
FullPrecRealType Weight
Weight of the walker.
LatticeGaussianProduct::ValueType ValueType
void setWalkerID(long walker_id)
set function for walker walker_id_ only necessary because as an optimization we reuse walkers...
const FullPrecRealType * getPropertyBase(int i) const
return the address of the i-th properties
bool get_has_been_on_wire() const
FullPrecRealType * getPropertyBase()
size_type current_scalar() const
FullPrecRealType Multiplicity
Number of copies for branching When Multiplicity = 0, this walker will be destroyed.
ACC::value_type mean(const ACC &ac)
void rewind(size_type cur=0, size_type cur_scalar=0)
set the cursors
void addPropertyHistoryPoint(int index, FullPrecRealType data)
A container class to represent a walker.
void put(std::complex< T1 > &x)
Define a serialized buffer to store anonymous data.
void resetProperty(FullPrecRealType logpsi, FullPrecRealType sigN, FullPrecRealType ene)
reset the property of a walker
Walker(const Walker &a, long walker_id, long parent_id)
ParticleLaplacian L
^2_i d for the i-th particle
void resizeProperty(int n, int m)
ParticlePos R
The configuration vector (3N-dimensional vector to store the positions of all the particles for a sin...
void add(std::complex< T1 > &x)
void get(std::complex< T1 > &x)