25 public std::deque<_ParticleType>
37 template <
typename ...AdditionalConstructorTypes>
43 this->emplace_back(
p,args...);
44 return &*this->rbegin();
62 const typename SpatialCellObserverType::CellMapType&
cells()
const
64 return SpatialCellObserverType::cells();
72 SpatialCellObserverType::setCellSize(cellSize);
76 template <
typename OtherParticleType,
typename FieldType,
typename... OtherSourceTypes>
77 void computeField(OtherParticleType& part,
const OtherSourceTypes&... otherSources)
const
86 typename SpatialCellType::CellMapType neighborCells(part.template neighborCells<_ParticleType>());
89 for (
typename SpatialCellType::CellMapType::const_iterator cIter =neighborCells.begin();
90 cIter!=neighborCells.end();
94 for(
typename SpatialCellType::ParticleContainerType::const_iterator qIter =cIter->second->particleBegin();
95 qIter!=cIter->second->particleEnd();
107 if(FieldType::use_multipole)
109 typename SpatialCellType::CellMapType farCells(part.template farCells<_ParticleType>());
116 if(
sizeof...(OtherSourceTypes))
129 for (
const auto& particle : system)
131 os << particle <<
"\n";
const SpatialCellObserverType::CellMapType & cells() const
_ParticleType ParticleType
void computeField(OtherParticleType &part, const OtherSourceTypes &... otherSources) const
static void setCellSize(const double &cellSize)
const ParticleContainerType & particles() const
SpatialCellObserver< _ParticleType, _ParticleType::dim > SpatialCellObserverType
SpatialCellObserverType::SpatialCellType SpatialCellType
_ParticleType::PositionType PositionType
ParticleType * addParticle(const PositionType &p, const AdditionalConstructorTypes &... args)
friend T & operator<<(T &os, const ParticleSystemBase< ParticleType > &system)
std::deque< _ParticleType > ParticleContainerType