20template <
class CellType>
22 for (
auto &p : cell) {
23 if (p.getID() == particle.getID()) {
38template <
class CellType>
41 using namespace autopas::utils::ArrayMath::literals;
43 std::lock_guard<AutoPasLock> cellLock(cell.getCellLock());
44 for (
auto &p : cell) {
45 if (p.getID() == particle.getID()) {
46 auto distanceVec = p.getR() - particle.getR();
48 if (distanceSqr < absError * absError) {
This namespace is used for implementation specifics.
Definition: CellFunctor.h:14
static bool checkParticleInCellAndUpdateByID(CellType &cell, const typename CellType::ParticleType &particle)
Updates a found particle within cellI to the values of particleI.
Definition: ParticleCellHelpers.h:21
static bool checkParticleInCellAndUpdateByIDAndPosition(CellType &cell, const typename CellType::ParticleType &particle, double absError)
Same as checkParticleInCellAndUpdateByID(CellType, ParticleType), but additionally checks whether the...
Definition: ParticleCellHelpers.h:39
constexpr T dot(const std::array< T, SIZE > &a, const std::array< T, SIZE > &b)
Generates the dot product of two arrays.
Definition: ArrayMath.h:233
CellType
The ParticleCell Type as an Enum.
Definition: ParticleCell.h:19