QMCPACK
DynamicCoordinates Class Referenceabstract

quantum variables of all the particles More...

+ Inheritance diagram for DynamicCoordinates:
+ Collaboration diagram for DynamicCoordinates:

Public Types

using RealType = QMCTraits::RealType
 
using PosType = QMCTraits::PosType
 
using ParticlePos = PtclOnLatticeTraits::ParticlePos
 
using PosVectorSoa = VectorSoaContainer< RealType, QMCTraits::DIM >
 

Public Member Functions

 DynamicCoordinates (const DynamicCoordinateKind kind_in)
 
 DynamicCoordinates (const DynamicCoordinates &)=default
 
DynamicCoordinatesoperator= (const DynamicCoordinates &)=delete
 
DynamicCoordinateKind getKind () const
 
virtual ~DynamicCoordinates ()=default
 
virtual std::unique_ptr< DynamicCoordinatesmakeClone ()=0
 
virtual void resize (size_t n)=0
 resize internal storages based on the number of particles More...
 
virtual size_t size () const =0
 return the number of particles More...
 
virtual void setAllParticlePos (const ParticlePos &R)=0
 overwrite the positions of all the particles. More...
 
virtual void setOneParticlePos (const PosType &pos, size_t iat)=0
 overwrite the position of one the particle. More...
 
virtual void mw_copyActivePos (const RefVectorWithLeader< DynamicCoordinates > &coords_list, size_t iat, const std::vector< PosType > &new_positions) const
 copy the active positions of particles with a uniform id in all the walkers to a single internal buffer. More...
 
virtual void mw_acceptParticlePos (const RefVectorWithLeader< DynamicCoordinates > &coords_list, size_t iat, const std::vector< PosType > &new_positions, const std::vector< bool > &isAccepted) const =0
 overwrite the positions of particles with a uniform id in all the walkers upon acceptance. More...
 
virtual const PosVectorSoagetAllParticlePos () const =0
 all particle position accessor More...
 
virtual PosType getOneParticlePos (size_t iat) const =0
 one particle position accessor More...
 
virtual void donePbyP ()
 secure internal data consistency after p-by-p moves More...
 
virtual void createResource (ResourceCollection &collection) const
 initialize a shared resource and hand it to a collection More...
 
virtual void acquireResource (ResourceCollection &collection, const RefVectorWithLeader< DynamicCoordinates > &coords_list) const
 acquire a shared resource from a collection More...
 
virtual void releaseResource (ResourceCollection &collection, const RefVectorWithLeader< DynamicCoordinates > &coords_list) const
 return a shared resource to a collection More...
 

Protected Attributes

const DynamicCoordinateKind variable_kind_
 type of dynamic coordinates More...
 

Detailed Description

quantum variables of all the particles

Definition at line 37 of file DynamicCoordinates.h.

Member Typedef Documentation

◆ ParticlePos

◆ PosType

Definition at line 41 of file DynamicCoordinates.h.

◆ PosVectorSoa

◆ RealType

Definition at line 40 of file DynamicCoordinates.h.

Constructor & Destructor Documentation

◆ DynamicCoordinates() [1/2]

DynamicCoordinates ( const DynamicCoordinateKind  kind_in)
inline

Definition at line 45 of file DynamicCoordinates.h.

45 : variable_kind_(kind_in) {}
const DynamicCoordinateKind variable_kind_
type of dynamic coordinates

◆ DynamicCoordinates() [2/2]

DynamicCoordinates ( const DynamicCoordinates )
default

◆ ~DynamicCoordinates()

virtual ~DynamicCoordinates ( )
virtualdefault

Member Function Documentation

◆ acquireResource()

virtual void acquireResource ( ResourceCollection collection,
const RefVectorWithLeader< DynamicCoordinates > &  coords_list 
) const
inlinevirtual

acquire a shared resource from a collection

Reimplemented in RealSpacePositionsOMPTarget.

Definition at line 102 of file DynamicCoordinates.h.

104  {}

◆ createResource()

virtual void createResource ( ResourceCollection collection) const
inlinevirtual

initialize a shared resource and hand it to a collection

Reimplemented in RealSpacePositionsOMPTarget.

Definition at line 99 of file DynamicCoordinates.h.

99 {}

◆ donePbyP()

virtual void donePbyP ( )
inlinevirtual

secure internal data consistency after p-by-p moves

Reimplemented in RealSpacePositionsOMPTarget.

Definition at line 96 of file DynamicCoordinates.h.

96 {}

◆ getAllParticlePos()

◆ getKind()

◆ getOneParticlePos()

virtual PosType getOneParticlePos ( size_t  iat) const
pure virtual

one particle position accessor

Implemented in RealSpacePositionsOMPTarget, and RealSpacePositions.

◆ makeClone()

virtual std::unique_ptr<DynamicCoordinates> makeClone ( )
pure virtual

◆ mw_acceptParticlePos()

virtual void mw_acceptParticlePos ( const RefVectorWithLeader< DynamicCoordinates > &  coords_list,
size_t  iat,
const std::vector< PosType > &  new_positions,
const std::vector< bool > &  isAccepted 
) const
pure virtual

overwrite the positions of particles with a uniform id in all the walkers upon acceptance.

Parameters
coords_lista batch of DynamicCoordinates
iatparicle id, uniform across coords_list
new_positionsproposed positions
isAcceptedaccept/reject info

Implemented in RealSpacePositionsOMPTarget, and RealSpacePositions.

◆ mw_copyActivePos()

virtual void mw_copyActivePos ( const RefVectorWithLeader< DynamicCoordinates > &  coords_list,
size_t  iat,
const std::vector< PosType > &  new_positions 
) const
inlinevirtual

copy the active positions of particles with a uniform id in all the walkers to a single internal buffer.

Parameters
coords_lista batch of DynamicCoordinates
iatparicle id, uniform across coords_list
new_positionsproposed positions

Reimplemented in RealSpacePositionsOMPTarget.

Definition at line 72 of file DynamicCoordinates.h.

References RefVectorWithLeader< T >::getLeader().

75  {
76  assert(this == &coords_list.getLeader());
77  }

◆ operator=()

DynamicCoordinates& operator= ( const DynamicCoordinates )
delete

◆ releaseResource()

virtual void releaseResource ( ResourceCollection collection,
const RefVectorWithLeader< DynamicCoordinates > &  coords_list 
) const
inlinevirtual

return a shared resource to a collection

Reimplemented in RealSpacePositionsOMPTarget.

Definition at line 107 of file DynamicCoordinates.h.

109  {}

◆ resize()

virtual void resize ( size_t  n)
pure virtual

resize internal storages based on the number of particles

Parameters
nthe number of particles

Implemented in RealSpacePositionsOMPTarget, and RealSpacePositions.

◆ setAllParticlePos()

virtual void setAllParticlePos ( const ParticlePos R)
pure virtual

overwrite the positions of all the particles.

Implemented in RealSpacePositionsOMPTarget, and RealSpacePositions.

◆ setOneParticlePos()

virtual void setOneParticlePos ( const PosType pos,
size_t  iat 
)
pure virtual

overwrite the position of one the particle.

Implemented in RealSpacePositionsOMPTarget, and RealSpacePositions.

◆ size()

virtual size_t size ( ) const
pure virtual

return the number of particles

Implemented in RealSpacePositionsOMPTarget, and RealSpacePositions.

Member Data Documentation

◆ variable_kind_

const DynamicCoordinateKind variable_kind_
protected

type of dynamic coordinates

Definition at line 113 of file DynamicCoordinates.h.

Referenced by DynamicCoordinates::getKind().


The documentation for this class was generated from the following file: