BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
A particle with a crystalline inner structure, made of smaller particles, and an outer shape described by a particle form factor.
Definition at line 27 of file MesoCrystal.h.
Public Member Functions | |
MesoCrystal (const Crystal &crystal, const IFormFactor &formfactor) | |
~MesoCrystal () override | |
double | abundance () const |
void | checkNodeArgs () const |
Raises exception if a parameter value is invalid. More... | |
std::string | className () const final |
Returns the class name, to be hard-coded in each leaf class that inherits from INode. More... | |
MesoCrystal * | clone () const override |
Returns a clone of this ISampleNode object. More... | |
std::vector< const Material * > | containedMaterials () const |
Returns set of unique materials contained in this ISampleNode. More... | |
virtual std::vector< std::unique_ptr< IParticle > > | decompose () const |
Decompose in constituent IParticle objects. More... | |
bool | isMagnetic () const |
Returns true if there is any magnetic material in this ISampleNode. More... | |
virtual const Material * | material () const |
Returns nullptr, unless overwritten to return a specific material. More... | |
std::vector< const INode * > | nodeChildren () const override |
Returns all children. More... | |
std::vector< const INode * > | nodeOffspring () const |
Returns all descendants. More... | |
const IFormFactor * | outerShape () const |
virtual std::vector< ParaMeta > | parDefs () const |
Returns the parameter definitions, to be hard-coded in each leaf class. More... | |
R3 | particlePosition () const |
Returns particle position. More... | |
const Crystal & | particleStructure () const |
IParticle * | rotate (const IRotation &rotation) |
Rotates the particle, and returns this. More... | |
const IRotation * | rotation () const |
Returns rotation object. More... | |
void | setAbundance (double abundance) |
Sets particle abundance. More... | |
void | setParticlePosition (double x, double y, double z) |
Sets relative position of the particle's reference point in the coordinate system of parent. More... | |
void | setParticlePosition (R3 position) |
Sets relative position of the particle's reference point in the coordinate system of parent. More... | |
void | setRotation (const IRotation &rotation) |
Sets transformation. More... | |
virtual void | transferToCPP () |
Used for Python overriding of clone (see swig/tweaks.py) More... | |
IParticle * | translate (R3 translation) |
Translates the particle, and returns this. More... | |
Protected Attributes | |
double | m_abundance {1.0} |
std::vector< double > | m_P |
R3 | m_position |
std::unique_ptr< IRotation > | m_rotation |
Private Member Functions | |
MesoCrystal (Crystal *crystal, IFormFactor *formfactor) | |
Private Attributes | |
const std::unique_ptr< Crystal > | m_crystal |
Crystalline inner structure. More... | |
const std::unique_ptr< IFormFactor > | m_meso_formfactor |
Outer shape of the mesocrystal. More... | |
MesoCrystal::MesoCrystal | ( | const Crystal & | crystal, |
const IFormFactor & | formfactor | ||
) |
Definition at line 27 of file MesoCrystal.cpp.
Referenced by clone().
|
overridedefault |
|
private |
Definition at line 21 of file MesoCrystal.cpp.
|
inlineinherited |
Definition at line 38 of file IParticle.h.
References IParticle::m_abundance.
Referenced by SampleToPython::defineParticleLayouts(), and IParticle::setAbundance().
|
inherited |
Raises exception if a parameter value is invalid.
Definition at line 27 of file INode.cpp.
References ASSERT, RealLimits::check(), INode::className(), INF, RealLimits::limited(), RealLimits::limitless(), INode::m_P, ParaMeta::name, RealLimits::nonnegative(), INode::parDefs(), ParaMeta::vMax, and ParaMeta::vMin.
Referenced by BarGauss::BarGauss(), BarLorentz::BarLorentz(), Bipyramid4::Bipyramid4(), Box::Box(), CantellatedCube::CantellatedCube(), Cone::Cone(), ConstantBackground::ConstantBackground(), CosineRippleBox::CosineRippleBox(), CosineRippleGauss::CosineRippleGauss(), CosineRippleLorentz::CosineRippleLorentz(), Cylinder::Cylinder(), DistributionCosine::DistributionCosine(), DistributionGate::DistributionGate(), DistributionGaussian::DistributionGaussian(), DistributionLogNormal::DistributionLogNormal(), DistributionLorentz::DistributionLorentz(), DistributionTrapezoid::DistributionTrapezoid(), Dodecahedron::Dodecahedron(), EllipsoidalCylinder::EllipsoidalCylinder(), FootprintGauss::FootprintGauss(), FootprintSquare::FootprintSquare(), FuzzySphere::FuzzySphere(), GaussSphere::GaussSphere(), HemiEllipsoid::HemiEllipsoid(), HollowSphere::HollowSphere(), HorizontalCylinder::HorizontalCylinder(), Icosahedron::Icosahedron(), LongBoxGauss::LongBoxGauss(), LongBoxLorentz::LongBoxLorentz(), PlatonicOctahedron::PlatonicOctahedron(), PlatonicTetrahedron::PlatonicTetrahedron(), Prism3::Prism3(), Prism6::Prism6(), Profile1DCauchy::Profile1DCauchy(), Profile1DCosine::Profile1DCosine(), Profile1DGate::Profile1DGate(), Profile1DGauss::Profile1DGauss(), Profile1DTriangle::Profile1DTriangle(), Profile1DVoigt::Profile1DVoigt(), Profile2DCauchy::Profile2DCauchy(), Profile2DCone::Profile2DCone(), Profile2DGate::Profile2DGate(), Profile2DGauss::Profile2DGauss(), Profile2DVoigt::Profile2DVoigt(), Pyramid2::Pyramid2(), Pyramid3::Pyramid3(), Pyramid4::Pyramid4(), Pyramid6::Pyramid6(), RotationEuler::RotationEuler(), RotationX::RotationX(), RotationY::RotationY(), RotationZ::RotationZ(), SawtoothRippleBox::SawtoothRippleBox(), SawtoothRippleGauss::SawtoothRippleGauss(), SawtoothRippleLorentz::SawtoothRippleLorentz(), Sphere::Sphere(), Spheroid::Spheroid(), TruncatedCube::TruncatedCube(), TruncatedSphere::TruncatedSphere(), and TruncatedSpheroid::TruncatedSpheroid().
|
inlinefinalvirtual |
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
Implements INode.
Definition at line 34 of file MesoCrystal.h.
|
overridevirtual |
Returns a clone of this ISampleNode object.
Implements IParticle.
Definition at line 34 of file MesoCrystal.cpp.
References MesoCrystal(), IParticle::m_abundance, m_crystal, m_meso_formfactor, IParticle::m_position, and IParticle::m_rotation.
|
inherited |
Returns set of unique materials contained in this ISampleNode.
Definition at line 25 of file ISampleNode.cpp.
References ISampleNode::material(), and INode::nodeChildren().
Referenced by SampleUtils::Multilayer::ContainsCompatibleMaterials(), SampleToPython::initLabels(), and ISampleNode::isMagnetic().
|
virtualinherited |
Decompose in constituent IParticle objects.
Reimplemented in ParticleComposition.
Definition at line 52 of file IParticle.cpp.
References IParticle::clone().
Referenced by Compute::Slicing::createParticleInSlice().
|
inherited |
Returns true if there is any magnetic material in this ISampleNode.
Definition at line 39 of file ISampleNode.cpp.
References ISampleNode::containedMaterials().
Referenced by reSample::make().
|
inlinevirtualinherited |
Returns nullptr, unless overwritten to return a specific material.
Reimplemented in Particle, and Layer.
Definition at line 36 of file ISampleNode.h.
Referenced by ISampleNode::containedMaterials().
|
overridevirtual |
Returns all children.
Reimplemented from IParticle.
Definition at line 44 of file MesoCrystal.cpp.
References m_crystal, m_meso_formfactor, and IParticle::nodeChildren().
|
inherited |
Returns all descendants.
Definition at line 61 of file INode.cpp.
References INode::nodeChildren().
|
inline |
|
inlinevirtualinherited |
Returns the parameter definitions, to be hard-coded in each leaf class.
Reimplemented in ConstantBackground, GaussSphere, FuzzySphere, RotationEuler, RotationZ, RotationY, RotationX, Crystal, Layer, HexagonalLattice2D, SquareLattice2D, BasicLattice2D, LayerRoughness, TruncatedSpheroid, TruncatedSphere, TruncatedCube, Spheroid, Sphere, SawtoothRippleLorentz, SawtoothRippleGauss, SawtoothRippleBox, Pyramid6, Pyramid4, Pyramid3, Pyramid2, Prism6, Prism3, PlatonicTetrahedron, PlatonicOctahedron, LongBoxLorentz, LongBoxGauss, Icosahedron, HorizontalCylinder, HollowSphere, HemiEllipsoid, EllipsoidalCylinder, Dodecahedron, Cylinder, CosineRippleLorentz, CosineRippleGauss, CosineRippleBox, Cone, CantellatedCube, Box, Bipyramid4, BarLorentz, BarGauss, Profile2DVoigt, Profile2DCone, Profile2DGate, Profile2DGauss, Profile2DCauchy, Profile1DVoigt, Profile1DCosine, Profile1DTriangle, Profile1DGate, Profile1DGauss, Profile1DCauchy, MisesGaussPeakShape, MisesFisherGaussPeakShape, LorentzFisherPeakShape, GaussFisherPeakShape, IsotropicLorentzPeakShape, IsotropicGaussPeakShape, ParticleLayout, InterferenceTwin, InterferenceRadialParaCrystal, InterferenceHardDisk, Interference2DSuperLattice, Interference2DParaCrystal, Interference1DLattice, DistributionTrapezoid, DistributionCosine, DistributionLogNormal, DistributionGaussian, DistributionLorentz, DistributionGate, ResolutionFunction2DGaussian, PolFilter, FootprintSquare, and FootprintGauss.
Definition at line 51 of file INode.h.
Referenced by INode::checkNodeArgs(), and IFormFactor::pythonConstructor().
|
inlineinherited |
Returns particle position.
Definition at line 46 of file IParticle.h.
References IParticle::m_position.
Referenced by ParticleComposition::decompose().
const Crystal & MesoCrystal::particleStructure | ( | ) | const |
Rotates the particle, and returns this.
Definition at line 41 of file IParticle.cpp.
References IRotation::clone(), createProduct(), IParticle::m_position, IParticle::m_rotation, IParticle::rotation(), and IRotation::transformed().
Referenced by ExemplarySamples::createBoxCompositionRotateZandY(), ExemplarySamples::createCoreShellBoxRotateZandY(), ExemplarySamples::createLayersWithAbsorptionBySLD(), ExemplarySamples::createLayersWithAbsorptionWithFF(), ExemplarySamples::createMagneticRotation(), ExemplarySamples::createRotatedPyramids(), ExemplarySamples::createTransformBox(), and ParticleComposition::decompose().
|
inherited |
Returns rotation object.
Definition at line 31 of file IParticle.cpp.
References IParticle::m_rotation.
Referenced by Particle::Particle(), ParticleComposition::decompose(), IParticle::rotate(), and IParticle::setRotation().
|
inlineinherited |
Sets particle abundance.
abundance | proportion of this type of particles normalized to the total number of particles in the layout. |
Definition at line 43 of file IParticle.h.
References IParticle::abundance(), and IParticle::m_abundance.
Referenced by ParticleLayout::addParticle().
|
inlineinherited |
Sets relative position of the particle's reference point in the coordinate system of parent.
x | x-coordinate in nanometers |
y | y-coordinate in nanometers |
z | z-coordinate in nanometers |
Definition at line 58 of file IParticle.h.
References IParticle::m_position.
|
inlineinherited |
Sets relative position of the particle's reference point in the coordinate system of parent.
position | relative position vector (components are in nanometers) |
Definition at line 51 of file IParticle.h.
References IParticle::m_position.
Referenced by ExemplarySamples::createBoxCompositionRotateX(), ExemplarySamples::createBoxCompositionRotateY(), ExemplarySamples::createBoxCompositionRotateZ(), ExemplarySamples::createBoxCompositionRotateZandY(), ExemplarySamples::createBoxStackComposition(), ExemplarySamples::createCoreShellBoxRotateZandY(), ExemplarySamples::createCustomMorphology(), ExemplarySamples::createLayersWithAbsorptionBySLD(), ExemplarySamples::createLayersWithAbsorptionWithFF(), ExemplarySamples::createRotatedSquareLattice2D(), ExemplarySamples::createSlicedComposition(), and ExemplarySamples::createTransformBox().
|
inherited |
Sets transformation.
Definition at line 36 of file IParticle.cpp.
References IRotation::clone(), IParticle::m_rotation, and IParticle::rotation().
Referenced by Particle::Particle(), ExemplarySamples::createBoxCompositionRotateX(), ExemplarySamples::createBoxCompositionRotateY(), ExemplarySamples::createBoxCompositionRotateZ(), ExemplarySamples::createBoxCompositionRotateZandY(), ExemplarySamples::createBoxStackComposition(), ExemplarySamples::createCoreShellBoxRotateZandY(), ExemplarySamples::createLayersWithAbsorptionBySLD(), ExemplarySamples::createLayersWithAbsorptionWithFF(), ExemplarySamples::createSlicedComposition(), and ExemplarySamples::createTransformBox().
|
inlinevirtualinherited |
Used for Python overriding of clone (see swig/tweaks.py)
Definition at line 32 of file ICloneable.h.
|
inherited |
Translates the particle, and returns this.
Definition at line 25 of file IParticle.cpp.
References IParticle::m_position.
Referenced by ParticleComposition::addParticle(), ExemplarySamples::createMagneticRotation(), ExemplarySamples::createMagneticSpheres(), ExemplarySamples::createMagneticSubstrateZeroField(), ExemplarySamples::createSuperLattice(), and ParticleComposition::decompose().
|
protectedinherited |
Definition at line 78 of file IParticle.h.
Referenced by IParticle::abundance(), clone(), Particle::clone(), ParticleComposition::clone(), ParticleCoreShell::clone(), and IParticle::setAbundance().
|
private |
Crystalline inner structure.
Definition at line 43 of file MesoCrystal.h.
Referenced by clone(), nodeChildren(), and particleStructure().
|
private |
Outer shape of the mesocrystal.
Definition at line 44 of file MesoCrystal.h.
Referenced by clone(), nodeChildren(), and outerShape().
|
protectedinherited |
Definition at line 63 of file INode.h.
Referenced by IFootprintFactor::IFootprintFactor(), INode::checkNodeArgs(), IProfile1D::pythonConstructor(), IProfile2D::pythonConstructor(), IFormFactor::pythonConstructor(), Profile1DVoigt::pythonConstructor(), and Profile2DVoigt::pythonConstructor().
|
protectedinherited |
Definition at line 79 of file IParticle.h.
Referenced by clone(), Particle::clone(), ParticleComposition::clone(), ParticleCoreShell::clone(), IParticle::particlePosition(), IParticle::rotate(), IParticle::setParticlePosition(), and IParticle::translate().
|
protectedinherited |
Definition at line 80 of file IParticle.h.
Referenced by clone(), Particle::clone(), ParticleComposition::clone(), ParticleCoreShell::clone(), IParticle::nodeChildren(), IParticle::rotate(), IParticle::rotation(), and IParticle::setRotation().