![]() |
QMCPACK
|
A derived classe from DistacneTableData, specialized for AB using a transposed form. More...
Inheritance diagram for SoaDistanceTableAB< T, D, SC >:
Collaboration diagram for SoaDistanceTableAB< T, D, SC >:Public Member Functions | |
| SoaDistanceTableAB (const ParticleSet &source, ParticleSet &target) | |
| void | resize () |
| SoaDistanceTableAB ()=delete | |
| SoaDistanceTableAB (const SoaDistanceTableAB &)=delete | |
| void | evaluate (ParticleSet &P) override |
| evaluate the full table More... | |
| void | move (const ParticleSet &P, const PosType &rnew, const IndexType iat, bool prepare_old) override |
| evaluate the temporary pair relations More... | |
| void | update (IndexType iat) override |
| update the stripe for jat-th particle More... | |
| int | get_first_neighbor (IndexType iat, RealType &r, PosType &dr, bool newpos) const override |
| find the first nearest neighbor More... | |
Public Member Functions inherited from DTD_BConds< T, D, SC > | |
| DTD_BConds (const CrystalLattice< T, D > &lat) | |
| constructor: doing nothing More... | |
| T | apply_bc (TinyVector< T, D > &displ) const |
| apply BC on displ and return |displ|^2 More... | |
| void | apply_bc (std::vector< TinyVector< T, D >> &dr, std::vector< T > &r, std::vector< T > &rinv) const |
| apply BC on dr and evaluate r and rinv More... | |
| void | apply_bc (std::vector< TinyVector< T, D >> &dr, std::vector< T > &r) const |
| void | evaluate_rsquared (TinyVector< T, D > *restrict dr, T *restrict rr, int n) |
Public Member Functions inherited from DistanceTableAB | |
| DistanceTableAB (const ParticleSet &source, const ParticleSet &target, DTModes modes) | |
| constructor using source and target ParticleSet More... | |
| const std::vector< DistRow > & | getDistances () const |
| return full table distances More... | |
| const std::vector< DisplRow > & | getDisplacements () const |
| return full table displacements More... | |
| const DistRow & | getDistRow (int iel) const |
| return a row of distances for a given target particle More... | |
| const DisplRow & | getDisplRow (int iel) const |
| return a row of displacements for a given target particle More... | |
| const DistRow & | getTempDists () const |
| return the temporary distances when a move is proposed More... | |
| const DisplRow & | getTempDispls () const |
| return the temporary displacements when a move is proposed More... | |
| virtual const RealType * | getMultiWalkerDataPtr () const |
| return multi-walker full (all pairs) distance table data pointer More... | |
| virtual size_t | getPerTargetPctlStrideSize () const |
| return stride of per target pctl data. full table data = stride * num of target particles More... | |
Public Member Functions inherited from DistanceTable | |
| DistanceTable (const ParticleSet &source, const ParticleSet &target, DTModes modes) | |
| constructor using source and target ParticleSet More... | |
| DistanceTable (const DistanceTable &)=delete | |
| copy constructor. deleted More... | |
| virtual | ~DistanceTable ()=default |
| virutal destructor More... | |
| DTModes | getModes () const |
| get modes More... | |
| void | setModes (DTModes modes) |
| set modes More... | |
| const std::string & | getName () const |
| return the name of table More... | |
| const ParticleSet & | get_origin () const |
| returns the reference the origin particleset More... | |
| size_t | centers () const |
| returns the number of centers More... | |
| size_t | targets () const |
| returns the number of centers More... | |
| size_t | sources () const |
| returns the number of source particles More... | |
| virtual void | mw_evaluate (const RefVectorWithLeader< DistanceTable > &dt_list, const RefVectorWithLeader< ParticleSet > &p_list) const |
| virtual void | mw_recompute (const RefVectorWithLeader< DistanceTable > &dt_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< bool > &recompute) const |
| recompute multi walker internal data, recompute More... | |
| virtual void | mw_move (const RefVectorWithLeader< DistanceTable > &dt_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< PosType > &rnew_list, const IndexType iat, bool prepare_old=true) const |
| walker batched version of move. More... | |
| virtual void | updatePartial (IndexType jat, bool from_temp) |
| fill partially the distance table by the pair relations from the temporary or old particle position. More... | |
| virtual void | mw_updatePartial (const RefVectorWithLeader< DistanceTable > &dt_list, IndexType jat, const std::vector< bool > &from_temp) |
| walker batched version of updatePartial. More... | |
| virtual void | finalizePbyP (const ParticleSet &P) |
| finalize distance table calculation after particle-by-particle moves if update() doesn't make the table up-to-date during p-by-p moves finalizePbyP takes action to bring the table up-to-date More... | |
| virtual void | mw_finalizePbyP (const RefVectorWithLeader< DistanceTable > &dt_list, const RefVectorWithLeader< ParticleSet > &p_list) const |
| walker batched version of finalizePbyP If not DTModes::NEED_TEMP_DATA_ON_HOST, host distance table data is not updated at all during p-by-p Thus, a recompute is necessary to update the whole host distance table for consumers like the Coulomb potential. More... | |
| void | print (std::ostream &os) |
| virtual void | createResource (ResourceCollection &collection) const |
| initialize a shared resource and hand it to a collection More... | |
| virtual void | acquireResource (ResourceCollection &collection, const RefVectorWithLeader< DistanceTable > &dt_list) const |
| acquire a shared resource from a collection More... | |
| virtual void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< DistanceTable > &dt_list) const |
| return a shared resource to a collection More... | |
Private Attributes | |
| NewTimer & | evaluate_timer_ |
| timer for evaluate() More... | |
| NewTimer & | move_timer_ |
| timer for move() More... | |
| NewTimer & | update_timer_ |
| timer for update() More... | |
Additional Inherited Members | |
Public Types inherited from DistanceTable | |
| using | IndexType = QMCTraits::IndexType |
| using | RealType = QMCTraits::RealType |
| using | PosType = QMCTraits::PosType |
| using | DistRow = Vector< RealType, aligned_allocator< RealType > > |
| using | DisplRow = VectorSoaContainer< RealType, DIM > |
Static Public Attributes inherited from DistanceTable | |
| static constexpr unsigned | DIM = OHMMS_DIM |
Protected Attributes inherited from DistanceTableAB | |
| std::vector< DistRow > | distances_ |
| distances_[num_targets_][num_sources_], [i][3][j] = |r_A2[j] - r_A1[i]| Note: Derived classes decide if it is a memory view or the actual storage More... | |
| std::vector< DisplRow > | displacements_ |
| displacements_[num_targets_][3][num_sources_], [i][3][j] = r_A2[j] - r_A1[i] Note: Derived classes decide if it is a memory view or the actual storage More... | |
| DistRow | temp_r_ |
| temp_r More... | |
| DisplRow | temp_dr_ |
| temp_dr More... | |
Protected Attributes inherited from DistanceTable | |
| const ParticleSet & | origin_ |
| const size_t | num_sources_ |
| const size_t | num_targets_ |
| const std::string | name_ |
| name of the table More... | |
| DTModes | modes_ |
| operation modes defined by DTModes More... | |
A derived classe from DistacneTableData, specialized for AB using a transposed form.
Definition at line 26 of file SoaDistanceTableAB.h.
|
inline |
Definition at line 28 of file SoaDistanceTableAB.h.
References SoaDistanceTableAB< T, D, SC >::resize().
|
delete |
|
delete |
|
inlineoverridevirtual |
evaluate the full table
Implements DistanceTable.
Definition at line 66 of file SoaDistanceTableAB.h.
References DistanceTableAB::displacements_, DistanceTableAB::distances_, SoaDistanceTableAB< T, D, SC >::evaluate_timer_, FairDivideAligned(), DynamicCoordinates::getAllParticlePos(), ParticleSet::getCoordinates(), DistanceTable::num_sources_, DistanceTable::num_targets_, omp_get_num_threads(), omp_get_thread_num(), DistanceTable::origin_, and ParticleSet::R.
|
inlineoverridevirtual |
find the first nearest neighbor
| iat | source particle id |
| r | distance |
| dr | displacement |
| newpos | if true, use the data in temp_r_ and temp_dr_ for the proposed move. if false, use the data in distance_[iat] and displacements_[iat] |
Implements DistanceTable.
Definition at line 103 of file SoaDistanceTableAB.h.
References DistanceTableAB::displacements_, DistanceTableAB::distances_, DistanceTable::num_sources_, DistanceTableAB::temp_dr_, and DistanceTableAB::temp_r_.
|
inlineoverridevirtual |
evaluate the temporary pair relations
Implements DistanceTable.
Definition at line 82 of file SoaDistanceTableAB.h.
References Vector< T, Alloc >::data(), DistanceTableAB::displacements_, DistanceTableAB::distances_, DynamicCoordinates::getAllParticlePos(), ParticleSet::getCoordinates(), DistanceTable::modes_, SoaDistanceTableAB< T, D, SC >::move_timer_, qmcplusplus::NEED_FULL_TABLE_ANYTIME, DistanceTable::num_sources_, DistanceTable::origin_, ParticleSet::R, DistanceTableAB::temp_dr_, and DistanceTableAB::temp_r_.
|
inline |
Definition at line 41 of file SoaDistanceTableAB.h.
References DistanceTableAB::displacements_, DistanceTableAB::distances_, DistanceTable::num_sources_, DistanceTable::num_targets_, VectorSoaContainer< T, D, Alloc >::resize(), Vector< T, Alloc >::resize(), DistanceTableAB::temp_dr_, and DistanceTableAB::temp_r_.
Referenced by SoaDistanceTableAB< T, D, SC >::SoaDistanceTableAB().
|
inlineoverridevirtual |
update the stripe for jat-th particle
Implements DistanceTable.
Definition at line 95 of file SoaDistanceTableAB.h.
References qmcplusplus::syclBLAS::copy_n(), Vector< T, Alloc >::data(), VectorSoaContainer< T, D, Alloc >::data(), DistanceTableAB::displacements_, DistanceTableAB::distances_, DistanceTable::num_sources_, DistanceTableAB::temp_dr_, DistanceTableAB::temp_r_, and SoaDistanceTableAB< T, D, SC >::update_timer_.
|
private |
timer for evaluate()
Definition at line 141 of file SoaDistanceTableAB.h.
Referenced by SoaDistanceTableAB< T, D, SC >::evaluate().
|
private |
timer for move()
Definition at line 143 of file SoaDistanceTableAB.h.
Referenced by SoaDistanceTableAB< T, D, SC >::move().
|
private |
timer for update()
Definition at line 145 of file SoaDistanceTableAB.h.
Referenced by SoaDistanceTableAB< T, D, SC >::update().