![]() |
QMCPACK
|
AA type of DistanceTable containing storage. More...
Public Member Functions | |
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 | evaluate (ParticleSet &P)=0 |
evaluate the full Distance Table 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 | move (const ParticleSet &P, const PosType &rnew, const IndexType iat, bool prepare_old=true)=0 |
evaluate the temporary pair relations when a move is proposed 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 | update (IndexType jat)=0 |
update the distance table by the pair relations from the temporal position. 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... | |
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... | |
Protected Attributes | |
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... | |
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 |
AA type of DistanceTable containing storage.
Definition at line 223 of file DistanceTable.h.
|
inline |
constructor using source and target ParticleSet
Definition at line 256 of file DistanceTable.h.
|
inlinevirtual |
Reimplemented in SoaDistanceTableAAOMPTarget< T, D, SC >.
Definition at line 290 of file DistanceTable.h.
|
inline |
return full table displacements
Definition at line 264 of file DistanceTable.h.
References DistanceTableAA::displacements_.
|
inline |
return a row of displacements for a given target particle
Definition at line 272 of file DistanceTable.h.
References DistanceTableAA::displacements_.
Referenced by CoulombPotential< T >::evaluateAAForces().
|
inline |
return full table distances
Definition at line 260 of file DistanceTable.h.
References DistanceTableAA::distances_.
Referenced by ExampleHeComponent::evalGrad(), ExampleHeComponent::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), JeeIOrbitalSoA< FT >::evaluateDerivRatios(), ExampleHeComponent::evaluateLog(), InitMolecularSystem::initMolecule(), ExampleHeComponent::ratio(), ExampleHeComponent::ratioGrad(), and qmcplusplus::TEST_CASE().
|
inline |
return a row of distances for a given target particle
Definition at line 268 of file DistanceTable.h.
References DistanceTableAA::distances_.
Referenced by Backflow_ee< FT >::evaluate(), CoulombPotential< T >::evaluate_spAA(), CoulombPotential< T >::evaluateAA(), CoulombPotential< T >::evaluateAAForces(), TwoBodyJastrow< FT >::evaluateDerivRatios(), and Backflow_ee< FT >::evaluateWithDerivatives().
|
inlinevirtual |
return multi walker temporary pair distance table data pointer
Reimplemented in SoaDistanceTableAAOMPTarget< T, D, SC >.
Definition at line 293 of file DistanceTable.h.
References DistanceTable::name_.
|
inline |
return old displacements set up by move() for optimized distance table consumers
Definition at line 288 of file DistanceTable.h.
References DistanceTableAA::old_dr_.
|
inline |
return old distances set up by move() for optimized distance table consumers
Definition at line 284 of file DistanceTable.h.
References DistanceTableAA::old_r_.
|
inline |
return the temporary displacements when a move is proposed
Definition at line 280 of file DistanceTable.h.
References DistanceTableAA::temp_dr_.
Referenced by TwoBodyJastrow< FT >::ratioGrad().
|
inline |
return the temporary distances when a move is proposed
Definition at line 276 of file DistanceTable.h.
References DistanceTableAA::temp_r_.
Referenced by TwoBodyJastrow< FT >::acceptMove(), TwoBodyJastrow< FT >::evaluateRatiosAlltoOne(), TwoBodyJastrow< FT >::ratio(), and TwoBodyJastrow< FT >::ratioGrad().
|
inlinevirtual |
Reimplemented in SoaDistanceTableAAOMPTarget< T, D, SC >.
Definition at line 298 of file DistanceTable.h.
|
protected |
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.
See the note of distances_.
Definition at line 240 of file DistanceTable.h.
Referenced by SoaDistanceTableAA< T, D, SC >::evaluate(), SoaDistanceTableAAOMPTarget< T, D, SC >::evaluate(), SoaDistanceTableAA< T, D, SC >::get_first_neighbor(), SoaDistanceTableAAOMPTarget< T, D, SC >::get_first_neighbor(), DistanceTableAA::getDisplacements(), DistanceTableAA::getDisplRow(), SoaDistanceTableAA< T, D, SC >::resize(), SoaDistanceTableAAOMPTarget< T, D, SC >::resize(), SoaDistanceTableAA< T, D, SC >::update(), SoaDistanceTableAAOMPTarget< T, D, SC >::update(), SoaDistanceTableAA< T, D, SC >::updatePartial(), and SoaDistanceTableAAOMPTarget< T, D, SC >::updatePartial().
|
protected |
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.
There is no bound check to protect j>=i terms as the nature of operator[]. When the storage of the table is allocated as a single memory segment, out-of-bound access is still within the segment and thus doesn't trigger an alarm by the address sanitizer.
Definition at line 234 of file DistanceTable.h.
Referenced by SoaDistanceTableAA< T, D, SC >::evaluate(), SoaDistanceTableAAOMPTarget< T, D, SC >::evaluate(), SoaDistanceTableAA< T, D, SC >::get_first_neighbor(), SoaDistanceTableAAOMPTarget< T, D, SC >::get_first_neighbor(), DistanceTableAA::getDistances(), DistanceTableAA::getDistRow(), SoaDistanceTableAA< T, D, SC >::resize(), SoaDistanceTableAAOMPTarget< T, D, SC >::resize(), SoaDistanceTableAA< T, D, SC >::update(), SoaDistanceTableAAOMPTarget< T, D, SC >::update(), SoaDistanceTableAA< T, D, SC >::updatePartial(), and SoaDistanceTableAAOMPTarget< T, D, SC >::updatePartial().
|
protected |
old displacements
Definition at line 252 of file DistanceTable.h.
Referenced by DistanceTableAA::getOldDispls(), SoaDistanceTableAA< T, D, SC >::move(), SoaDistanceTableAAOMPTarget< T, D, SC >::move(), SoaDistanceTableAA< T, D, SC >::resize(), SoaDistanceTableAA< T, D, SC >::updatePartial(), and SoaDistanceTableAAOMPTarget< T, D, SC >::updatePartial().
|
protected |
old distances
Definition at line 249 of file DistanceTable.h.
Referenced by DistanceTableAA::getOldDists(), SoaDistanceTableAA< T, D, SC >::move(), SoaDistanceTableAAOMPTarget< T, D, SC >::move(), SoaDistanceTableAA< T, D, SC >::resize(), SoaDistanceTableAA< T, D, SC >::updatePartial(), and SoaDistanceTableAAOMPTarget< T, D, SC >::updatePartial().
|
protected |
temp_dr
Definition at line 246 of file DistanceTable.h.
Referenced by SoaDistanceTableAA< T, D, SC >::get_first_neighbor(), SoaDistanceTableAAOMPTarget< T, D, SC >::get_first_neighbor(), DistanceTableAA::getTempDispls(), SoaDistanceTableAA< T, D, SC >::move(), SoaDistanceTableAAOMPTarget< T, D, SC >::move(), SoaDistanceTableAA< T, D, SC >::resize(), SoaDistanceTableAA< T, D, SC >::update(), SoaDistanceTableAAOMPTarget< T, D, SC >::update(), SoaDistanceTableAA< T, D, SC >::updatePartial(), and SoaDistanceTableAAOMPTarget< T, D, SC >::updatePartial().
|
protected |
temp_r
Definition at line 243 of file DistanceTable.h.
Referenced by SoaDistanceTableAAOMPTarget< T, D, SC >::acquireResource(), SoaDistanceTableAA< T, D, SC >::get_first_neighbor(), SoaDistanceTableAAOMPTarget< T, D, SC >::get_first_neighbor(), DistanceTableAA::getTempDists(), SoaDistanceTableAA< T, D, SC >::move(), SoaDistanceTableAAOMPTarget< T, D, SC >::move(), SoaDistanceTableAAOMPTarget< T, D, SC >::releaseResource(), SoaDistanceTableAA< T, D, SC >::resize(), SoaDistanceTableAA< T, D, SC >::update(), SoaDistanceTableAAOMPTarget< T, D, SC >::update(), SoaDistanceTableAA< T, D, SC >::updatePartial(), and SoaDistanceTableAAOMPTarget< T, D, SC >::updatePartial().