![]() |
QMCPACK
|
A derived classe from DistacneTableData, specialized for dense case. More...
Public Member Functions | |
SoaDistanceTableAA (ParticleSet &target) | |
SoaDistanceTableAA ()=delete | |
SoaDistanceTableAA (const SoaDistanceTableAA &)=delete | |
~SoaDistanceTableAA () override | |
size_t | compute_size (int N) const |
void | resize () |
void | evaluate (ParticleSet &P) override |
evaluate the full Distance Table More... | |
void | move (const ParticleSet &P, const PosType &rnew, const IndexType iat, bool prepare_old) override |
evaluate the temporary pair relations More... | |
int | get_first_neighbor (IndexType iat, RealType &r, PosType &dr, bool newpos) const override |
void | update (IndexType iat) override |
After accepting the iat-th particle, update the iat-th row of distances_ and displacements_. More... | |
void | updatePartial (IndexType jat, bool from_temp) override |
fill partially the distance table by the pair relations from the temporary or old particle position. More... | |
![]() | |
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) |
![]() | |
DistanceTableAA (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... | |
const DistRow & | getOldDists () const |
return old distances set up by move() for optimized distance table consumers More... | |
const DisplRow & | getOldDispls () const |
return old displacements set up by move() for optimized distance table consumers More... | |
virtual size_t | get_num_particls_stored () const |
virtual const RealType * | getMultiWalkerTempDataPtr () const |
return multi walker temporary pair distance table data pointer More... | |
virtual const RealType * | mw_evalDistsInRange (const RefVectorWithLeader< DistanceTable > &dt_list, const RefVectorWithLeader< ParticleSet > &p_list, size_t range_begin, size_t range_end) const |
![]() | |
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 | 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... | |
virtual int | get_first_neighbor (IndexType iat, RealType &r, PosType &dr, bool newpos) const =0 |
find the first nearest neighbor 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... | |
Public Attributes | |
aligned_vector< RealType > | memory_pool_ |
actual memory for dist and displacements_ More... | |
Private Attributes | |
const size_t | num_targets_padded_ |
number of targets with padding More... | |
int | old_prepared_elec_id_ |
set to particle id after move() with prepare_old = true. More... | |
NewTimer & | evaluate_timer_ |
timer for evaluate() More... | |
NewTimer & | move_timer_ |
timer for move() More... | |
NewTimer & | update_timer_ |
timer for update() More... | |
Additional Inherited Members | |
![]() | |
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 constexpr unsigned | DIM = OHMMS_DIM |
![]() | |
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 For only the lower triangle (j<i) data can be accessed safely. 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 only the lower triangle (j<i) is defined. More... | |
DistRow | temp_r_ |
temp_r More... | |
DisplRow | temp_dr_ |
temp_dr More... | |
DistRow | old_r_ |
old distances More... | |
DisplRow | old_dr_ |
old displacements More... | |
![]() | |
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 dense case.
Definition at line 25 of file SoaDistanceTableAA.h.
|
inline |
Definition at line 30 of file SoaDistanceTableAA.h.
References SoaDistanceTableAA< T, D, SC >::resize().
|
delete |
|
delete |
|
inlineoverride |
Definition at line 49 of file SoaDistanceTableAA.h.
|
inline |
Definition at line 51 of file SoaDistanceTableAA.h.
References qmcplusplus::Units::force::N.
Referenced by SoaDistanceTableAA< T, D, SC >::resize(), and qmcplusplus::TEST_CASE().
|
inlineoverridevirtual |
evaluate the full Distance Table
P | the target particle set |
Implements DistanceTable.
Definition at line 77 of file SoaDistanceTableAA.h.
References DistanceTableAA::displacements_, DistanceTableAA::distances_, SoaDistanceTableAA< T, D, SC >::evaluate_timer_, DynamicCoordinates::getAllParticlePos(), ParticleSet::getCoordinates(), DistanceTable::num_targets_, and ParticleSet::R.
|
inlineoverride |
Definition at line 106 of file SoaDistanceTableAA.h.
References DistanceTableAA::displacements_, DistanceTableAA::distances_, DistanceTable::num_targets_, DistanceTableAA::temp_dr_, and DistanceTableAA::temp_r_.
|
inlineoverridevirtual |
evaluate the temporary pair relations
Implements DistanceTable.
Definition at line 87 of file SoaDistanceTableAA.h.
References Vector< T, Alloc >::data(), DynamicCoordinates::getAllParticlePos(), ParticleSet::getCoordinates(), SoaDistanceTableAA< T, D, SC >::move_timer_, DistanceTable::num_targets_, DistanceTableAA::old_dr_, SoaDistanceTableAA< T, D, SC >::old_prepared_elec_id_, DistanceTableAA::old_r_, ParticleSet::R, DistanceTableAA::temp_dr_, and DistanceTableAA::temp_r_.
|
inline |
Definition at line 58 of file SoaDistanceTableAA.h.
References SoaDistanceTableAA< T, D, SC >::compute_size(), DistanceTableAA::displacements_, DistanceTableAA::distances_, SoaDistanceTableAA< T, D, SC >::memory_pool_, DistanceTable::num_targets_, DistanceTableAA::old_dr_, DistanceTableAA::old_r_, VectorSoaContainer< T, D, Alloc >::resize(), Vector< T, Alloc >::resize(), DistanceTableAA::temp_dr_, and DistanceTableAA::temp_r_.
Referenced by SoaDistanceTableAA< T, D, SC >::SoaDistanceTableAA().
|
inlineoverridevirtual |
After accepting the iat-th particle, update the iat-th row of distances_ and displacements_.
Upper triangle is not needed in the later computation and thus not updated
Implements DistanceTable.
Definition at line 150 of file SoaDistanceTableAA.h.
References qmcplusplus::syclBLAS::copy_n(), Vector< T, Alloc >::data(), VectorSoaContainer< T, D, Alloc >::data(), DistanceTableAA::displacements_, DistanceTableAA::distances_, DistanceTable::num_targets_, Vector< T, Alloc >::size(), DistanceTableAA::temp_dr_, DistanceTableAA::temp_r_, and SoaDistanceTableAA< T, D, SC >::update_timer_.
|
inlineoverridevirtual |
fill partially the distance table by the pair relations from the temporary or old particle position.
Used in forward mode when a move is reject
iat | the particle with an accepted move |
from_temp | if true, copy from temp. if false, copy from old |
Reimplemented from DistanceTable.
Definition at line 168 of file SoaDistanceTableAA.h.
References qmcplusplus::syclBLAS::copy_n(), Vector< T, Alloc >::data(), VectorSoaContainer< T, D, Alloc >::data(), DistanceTableAA::displacements_, DistanceTableAA::distances_, DistanceTableAA::old_dr_, SoaDistanceTableAA< T, D, SC >::old_prepared_elec_id_, DistanceTableAA::old_r_, Vector< T, Alloc >::size(), DistanceTableAA::temp_dr_, DistanceTableAA::temp_r_, and SoaDistanceTableAA< T, D, SC >::update_timer_.
|
private |
timer for evaluate()
Definition at line 202 of file SoaDistanceTableAA.h.
Referenced by SoaDistanceTableAA< T, D, SC >::evaluate().
aligned_vector<RealType> memory_pool_ |
actual memory for dist and displacements_
Definition at line 28 of file SoaDistanceTableAA.h.
Referenced by SoaDistanceTableAA< T, D, SC >::resize().
|
private |
timer for move()
Definition at line 204 of file SoaDistanceTableAA.h.
Referenced by SoaDistanceTableAA< T, D, SC >::move().
|
private |
number of targets with padding
Definition at line 194 of file SoaDistanceTableAA.h.
|
private |
set to particle id after move() with prepare_old = true.
-1 means not prepared. It is intended only for safety checks, not for codepath selection.
Definition at line 199 of file SoaDistanceTableAA.h.
Referenced by SoaDistanceTableAA< T, D, SC >::move(), and SoaDistanceTableAA< T, D, SC >::updatePartial().
|
private |
timer for update()
Definition at line 206 of file SoaDistanceTableAA.h.
Referenced by SoaDistanceTableAA< T, D, SC >::update(), and SoaDistanceTableAA< T, D, SC >::updatePartial().