AutoPas  3.0.0
Loading...
Searching...
No Matches
Functions | Variables
autopas::generators::FCCGenerator Namespace Reference

Generator for an face-centered cubic (FCC) 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 FCC 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.0, const bool centeredAlignment=false)
 Fills any container with particles arranged in a conventional Face-Centered Cubic (FCC) lattice.
 

Variables

constexpr std::array< std::array< double, 3 >, 4 > fccBasis
 Basis coordinates for conventional cubic FCC unit cell normalized by lattice constant a.
 

Detailed Description

Generator for an face-centered cubic (FCC) particle grid.

Function Documentation

◆ fillWithParticles()

template<class Container >
void autopas::generators::FCCGenerator::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.0,
const bool  centeredAlignment = false 
)

Fills any container with particles arranged in a conventional Face-Centered Cubic (FCC) lattice.

Particle IDs start from the default particle.

Template Parameters
ContainerArbitrary container class that supports addParticle().
Parameters
container
boxMin
boxMax
defaultParticleBlueprint particle.
spacingNearest-neighbor distance d.
centeredAlignmentIf true, the cell offset moved inward by 1/4 * lattice constant.

◆ getNumberOfParticles()

size_t autopas::generators::FCCGenerator::getNumberOfParticles ( const std::array< double, 3 > &  boxMin,
const std::array< double, 3 > &  boxMax,
const double  spacing = 1.0,
const bool  centeredAlignment = false 
)
inline

Calculates the number of particles generated in an FCC lattice within [boxMin, boxMax) in O(1) time.

Parameters
boxMin
boxMax
spacingNearest-neighbor distance d.
centeredAlignmentIf true, the cell offset moved inward by 1/4 * lattice constant.
Returns
Number of particles.

Variable Documentation

◆ fccBasis

constexpr std::array<std::array<double, 3>, 4> autopas::generators::FCCGenerator::fccBasis
inlineconstexpr
Initial value:
= {{
{0.0, 0.0, 0.0},
{0.5, 0.5, 0.0},
{0.5, 0.0, 0.5},
{0.0, 0.5, 0.5},
}}

Basis coordinates for conventional cubic FCC unit cell normalized by lattice constant a.