Generator for grids of particles. More...
Functions | |
| template<class ParticleCell > | |
| void | fillWithParticles (std::vector< ParticleCell > &cells, const std::array< size_t, 3 > &cellsPerDimension, const std::array< size_t, 3 > &particlesPerDim, const typename ParticleCell::ParticleType &defaultParticle=typename ParticleCell::ParticleType(), const std::array< double, 3 > &spacing=std::array< double, 3 >{1, 1, 1}, const std::array< double, 3 > &offset=std::array< double, 3 >{.5,.5,.5}, const std::array< double, 3 > &cellSize={1., 1., 1.}) |
| Fills a cell vector with a cuboid mesh of particles. | |
| template<class Container > | |
| void | fillWithParticles (Container &container, const std::array< size_t, 3 > &particlesPerDim, const typename autopas::utils::ParticleTypeTrait< Container >::value &defaultParticle=typename autopas::utils::ParticleTypeTrait< Container >::value(), const std::array< double, 3 > &spacing=std::array< double, 3 >{1., 1., 1.}, const std::array< double, 3 > &offset=std::array< double, 3 >{.5,.5,.5}) |
| Fills any container (also AutoPas object) with a cuboid mesh of particles. | |
Generator for grids of particles.
| void autopasTools::generators::GridGenerator::fillWithParticles | ( | Container & | container, |
| const std::array< size_t, 3 > & | particlesPerDim, | ||
| const typename autopas::utils::ParticleTypeTrait< Container >::value & | defaultParticle = typename autopas::utils::ParticleTypeTrait<Container>::value(), |
||
| const std::array< double, 3 > & | spacing = std::array<double, 3>{1., 1., 1.}, |
||
| const std::array< double, 3 > & | offset = std::array<double, 3>{.5, .5, .5} |
||
| ) |
Fills any container (also AutoPas object) with a cuboid mesh of particles.
Particle properties will be used from the default particle. Particle IDs start from the default particle.
| Container | Arbitrary container class that needs to support addParticle(). |
| container | |
| particlesPerDim | Number of particles per dimension. |
| defaultParticle | |
| spacing | Factor for distance between two particles along one dimension (default is 1). |
| offset | Offset to move all particles. |
| void autopasTools::generators::GridGenerator::fillWithParticles | ( | std::vector< ParticleCell > & | cells, |
| const std::array< size_t, 3 > & | cellsPerDimension, | ||
| const std::array< size_t, 3 > & | particlesPerDim, | ||
| const typename ParticleCell::ParticleType & | defaultParticle = typename ParticleCell::ParticleType(), |
||
| const std::array< double, 3 > & | spacing = std::array<double, 3>{1, 1, 1}, |
||
| const std::array< double, 3 > & | offset = std::array<double, 3>{.5, .5, .5}, |
||
| const std::array< double, 3 > & | cellSize = {1., 1., 1.} |
||
| ) |
Fills a cell vector with a cuboid mesh of particles.
| ParticleCell | Type of ParticleCells in cell vector. |
| cells | Cell vector. |
| cellsPerDimension | Number of cells per dimension. |
| particlesPerDim | Number of particles per dimension. |
| defaultParticle | |
| spacing | Factor for distance between two particles along one dimension (default is 1). |
| offset | Offset to move all particles. |
| cellSize | The size of a cell. |