BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ParticleLayout Class Reference

Decorator class that adds particles to ISampleNode objects. More...

+ Inheritance diagram for ParticleLayout:

Public Member Functions

 ParticleLayout (const IAbstractParticle &particle, double abundance=-1.0)
 
void accept (INodeVisitor *visitor) const override
 
void addParticle (const IAbstractParticle &particle, double abundance=-1.0, const kvector_t position={}, const IRotation &rotation=IdentityRotation())
 Adds particle to the layout with abundance, position and the rotation defined. More...
 
ParticleLayoutclone () const override
 
std::vector< const INode * > getChildren () const override
 
double getTotalAbundance () const
 
const IInterferenceFunction * interferenceFunction () const
 
SafePointerVector< IParticle > particles () const
 Returns information on all particles (type and abundance) and generates new particles if an IAbstractParticle denotes a collection.
 
void setInterferenceFunction (const IInterferenceFunction &interference_function)
 Adds interference functions.
 
void setTotalParticleSurfaceDensity (double particle_density)
 Sets total particle surface density. More...
 
void setWeight (double weight)
 Sets the relative weight of this layout.
 
double totalParticleSurfaceDensity () const
 
double weight () const
 Returns the relative weight of this layout.
 

Detailed Description

Decorator class that adds particles to ISampleNode objects.

Member Function Documentation

◆ addParticle()

void ParticleLayout::addParticle ( const IAbstractParticle &  particle,
double  abundance = -1.0,
const kvector_t  position = {},
const IRotation &  rotation = IdentityRotation() 
)

Adds particle to the layout with abundance, position and the rotation defined.

Parameters
particleto be added
abundanceParticle abundance
positionParticle position
rotationParticle rotation

◆ setTotalParticleSurfaceDensity()

void ParticleLayout::setTotalParticleSurfaceDensity ( double  particle_density)

Sets total particle surface density.

Parameters
particle_densitynumber of particles per square nanometer