AutoPas  3.0.0
Loading...
Searching...
No Matches
Namespaces | Functions
HCPGenerator.h File Reference
#include <array>
#include <cmath>
#include "autopas/utils/ParticleTypeTrait.h"
Include dependency graph for HCPGenerator.h:

Go to the source code of this file.

Namespaces

namespace  autopas
 This is the main namespace of AutoPas.
 
namespace  autopas::generators
 Generators for filling containers with particles in various distributions (uniform, grid, gaussian, closest packed, ...), used by tests, benchmarks, and md-flexible's particle-object generation.
 
namespace  autopas::generators::HCPGenerator
 Generator for an hexagonally closest packed particle grid.
 

Functions

size_t autopas::generators::HCPGenerator::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 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.
 

Detailed Description

Author
F. Gratl
Date
21.08.20