Generator for an hexagonally closest packed particle grid. More...
Functions | |
| size_t | getNumberOfParticles (const std::array< double, 3 > &boxMin, const std::array< double, 3 > &boxMax, const double spacing=1.0, const bool centeredAlignment=false) |
| Calculates the number of particles generated in an HCP lattice within [boxMin, boxMax) in O(1) time. | |
| 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., const bool centeredAlignment=false) |
| Fills any container (also AutoPas object) with hexagonally closest packed particles. | |
Generator for an hexagonally closest packed particle grid.
| void autopas::generators::HCPGenerator::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., |
||
| const bool | centeredAlignment = false |
||
| ) |
Fills any container (also AutoPas object) with hexagonally closest packed 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 | |
| boxMin | |
| boxMax | |
| defaultParticle | |
| spacing | Distance between all neighboring particles |
| centeredAlignment | If true, the cell offset moved inward by 1/4 * lattice constant. |
|
inline |
Calculates the number of particles generated in an HCP lattice within [boxMin, boxMax) in O(1) time.
| boxMin | |
| boxMax | |
| spacing | Nearest-neighbor distance d. |
| centeredAlignment | If true, the cell offset moved inward by 1/4 * lattice constant. |