AutoPas  3.0.0
Loading...
Searching...
No Matches
Functions
autopasTools::generators::ClosestPackingGenerator Namespace Reference

Generator for grids of particles. More...

Functions

template<class Container >
void fillWithParticles (Container &container, const std::array< double, 3 > &boxMin, const std::array< double, 3 > &boxMax, const typename autopas::utils::ParticleTypeTrait< Container >::value &defaultParticle=typename autopas::utils::ParticleTypeTrait< Container >::value(), const double spacing=1.)
 Fills any container (also AutoPas object) with a hexagonally closest packed particles.
 

Detailed Description

Generator for grids of particles.

Function Documentation

◆ fillWithParticles()

template<class Container >
void autopasTools::generators::ClosestPackingGenerator::fillWithParticles ( Container &  container,
const std::array< double, 3 > &  boxMin,
const std::array< double, 3 > &  boxMax,
const typename autopas::utils::ParticleTypeTrait< Container >::value &  defaultParticle = typename autopas::utils::ParticleTypeTrait<Container>::value(),
const double  spacing = 1. 
)

Fills any container (also AutoPas object) with a hexagonally closest packed particles.

Particle properties will be used from the default particle. Particle IDs start from the default particle.

Template Parameters
ContainerArbitrary container class that needs to support addParticle().
Parameters
container
boxMin
boxMax
defaultParticle
spacingDistance between all neighboring particles