15 #ifndef BORNAGAIN_SAMPLE_AGGREGATE_PARTICLELAYOUT_H
16 #define BORNAGAIN_SAMPLE_AGGREGATE_PARTICLELAYOUT_H
35 std::string
className() const final {
return "ParticleLayout"; }
36 std::vector<ParaMeta>
parDefs() const final
38 return {{
"Abundance",
"",
"e.g. surface fraction covered by this layout", 0, +
INF, -1}};
44 std::vector<const IParticle*>
particles()
const;
Defines interface class ISampleNode.
Defines and implements templated class OwningVector.
Abstract base class of interference functions.
Abstract base class for Particle, ParticleComposition, ParticleCoreShell, MesoCrystal....
Abstract base class for sample components and properties related to scattering.
Decorator class that adds particles to ISampleNode objects.
double weight() const
Returns the relative weight of this layout.
OwningVector< IParticle > m_particles
Vector of particle types.
void addAndRegisterAbstractParticle(IParticle *child)
Adds particle information with simultaneous registration in parent class.
void setTotalParticleSurfaceDensity(double particle_density)
Sets total particle surface density.
void setAndRegisterInterference(IInterference *child)
Sets interference function with simultaneous registration in parent class.
ParticleLayout * clone() const override
Returns a clone of this ISampleNode object.
void addParticle(const IParticle &particle, double abundance=-1.0)
Adds particle to the layout with abundance, position and the rotation defined.
double totalAbundance() const
const IInterference * interferenceFunction() const
std::unique_ptr< IInterference > m_interparticle
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
~ParticleLayout() override
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
void setInterference(const IInterference &interparticle)
Adds interference functions.
std::vector< const IParticle * > particles() const
double weightedParticleSurfaceDensity() const
double m_total_particle_density
void setWeight(double weight)
Sets the relative weight of this layout.
std::vector< const INode * > nodeChildren() const override
Returns all children.
double totalParticleSurfaceDensity() const