23 : mp_particle_structure(particle_structure.clone()), mp_meso_form_factor(form_factor.clone())
28 MesoCrystal::~MesoCrystal() =
default;
33 new MesoCrystal(mp_particle_structure->clone(), mp_meso_form_factor->clone());
48 if (!mp_particle_structure || !mp_meso_form_factor)
50 std::unique_ptr<IRotation> P_rotation(IRotation::createIdentity());
52 P_rotation.reset(mP_rotation->clone());
53 std::unique_ptr<IFormFactor> P_temp_ff(
54 mp_meso_form_factor->createSlicedFormFactor(limits, *P_rotation, m_position));
55 std::unique_ptr<IFormFactor> P_total_ff(
56 mp_particle_structure->createTotalFormFactor(*P_temp_ff, P_rotation.get(), m_position));
57 double meso_volume = mp_meso_form_factor->volume();
58 auto regions = mp_particle_structure->homogeneousRegions();
59 for (
auto& region : regions)
60 region.m_volume *= meso_volume;
62 result.mP_slicedff = std::move(P_total_ff);
63 result.m_regions = regions;
69 return std::vector<const INode*>()
74 : mp_particle_structure(p_particle_structure), mp_meso_form_factor(p_form_factor)
79 void MesoCrystal::initialize()
81 setName(
"MesoCrystal");
83 registerChild(mp_particle_structure.get());
84 registerChild(mp_meso_form_factor.get());
Defines class IClusteredParticles.
Defines class MesoCrystal.
Defines class SlicedParticle.
void setAbundance(double abundance)
Sets particle abundance.
An ordered assembly of particles.
Visitor interface to visit ISample objects.
std::vector< const INode * > getChildren() const override
Returns a vector of children (const).
void setPosition(kvector_t position)
Sets relative position of the particle's reference point in the coordinate system of parent.
void setRotation(const IRotation &rotation)
Sets transformation.
void registerParticleProperties()
Registers abundance and position.
A particle with an internal structure of smaller particles.
MesoCrystal * clone() const override final
Returns a clone of this ISample object.
SlicedParticle createSlicedParticle(ZLimits limits) const override final
Creates a sliced form factor for this particle.
std::vector< const INode * > getChildren() const override final
Returns a vector of children (const).
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
Class that contains upper and lower limits of the z-coordinate for the slicing of form factors.
Struct that contains information on a sliced particle.