|
faunus
|
Stores a vector of particle pairs and postpones the energy evaluation until operator double() is called.
More...
#include <energy.h>


Public Member Functions | |
| DelayedEnergyAccumulator (const PairEnergy &pair_energy, const double value=0.0) | |
| void | reserve (size_t number_of_particles) override |
| Reserve memory for (N-1)*N/2 interaction pairs. | |
| void | clear () override |
| DelayedEnergyAccumulator & | operator= (const double new_value) override |
| DelayedEnergyAccumulator & | operator+= (const double new_value) override |
| DelayedEnergyAccumulator & | operator+= (ParticlePair &&pair) override |
| operator double () override | |
Public Member Functions inherited from Faunus::Energy::EnergyAccumulatorBase | |
| EnergyAccumulatorBase (double value) | |
| virtual void | from_json (const json &j) |
| virtual void | to_json (json &j) const |
| template<typename TOtherAccumulator > | |
| EnergyAccumulatorBase & | operator+= (TOtherAccumulator &acc) |
Additional Inherited Members | |
Public Types inherited from Faunus::Energy::EnergyAccumulatorBase | |
| enum | Scheme { SERIAL, OPENMP, PARALLEL, INVALID } |
Public Attributes inherited from Faunus::Energy::EnergyAccumulatorBase | |
| Scheme | scheme = Scheme::SERIAL |
Protected Types inherited from Faunus::Energy::EnergyAccumulatorBase | |
| using | ParticleRef = const std::reference_wrapper< const Particle > |
| Particle reference. | |
| using | ParticlePair = std::pair< ParticleRef, ParticleRef > |
| References to two particles. | |
Protected Attributes inherited from Faunus::Energy::EnergyAccumulatorBase | |
| double | value = 0.0 |
| accumulated energy | |
Stores a vector of particle pairs and postpones the energy evaluation until operator double() is called.
Looping over the vector can be done in serial (as a fallback); using OpenMP; or using C++17 parallel algorithms if available.
1.8.13