BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
A crystal structure, defined by a Bravais lattice, a basis, and a position variance.
Computations are delegated to class ReMesocrystal.
Used in MesoCrystal, where it is given an outer shape.
Public Member Functions | |
Crystal (const IParticle &basis, const Lattice3D &lattice, double position_variance=0) | |
~Crystal () override | |
const IParticle * | basis () 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... | |
Crystal * | 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... | |
bool | isMagnetic () const |
Returns true if there is any magnetic material in this ISampleNode. More... | |
const Lattice3D * | lattice () const |
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... | |
std::vector< ParaMeta > | parDefs () const final |
Returns the parameter definitions, to be hard-coded in each leaf class. More... | |
double | position_variance () const |
virtual void | transferToCPP () |
Used for Python overriding of clone (see swig/tweaks.py) More... | |
Crystal * | transformed (const IRotation *rotation, const R3 &translation) const |
Protected Attributes | |
std::vector< double > | m_P |
Private Member Functions | |
Crystal (IParticle *basis, const Lattice3D &lattice, double position_variance=0) | |
Private Attributes | |
std::unique_ptr< IParticle > | m_basis |
std::unique_ptr< Lattice3D > | m_lattice |
const double | m_position_variance |
Crystal::Crystal | ( | const IParticle & | basis, |
const Lattice3D & | lattice, | ||
double | position_variance = 0 |
||
) |
Definition at line 22 of file Crystal.cpp.
Referenced by clone(), and transformed().
|
overridedefault |
|
private |
Definition at line 27 of file Crystal.cpp.
|
inline |
Definition at line 47 of file Crystal.h.
References m_basis.
Referenced by Compute::Slicing::createParticleInSlice().
|
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 |
|
overridevirtual |
Returns a clone of this ISampleNode object.
Implements ISampleNode.
Definition at line 36 of file Crystal.cpp.
References Crystal(), m_basis, m_lattice, and m_position_variance.
|
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().
|
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().
|
inline |
Definition at line 48 of file Crystal.h.
References m_lattice.
Referenced by Compute::Slicing::createParticleInSlice().
|
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 |
|
inherited |
Returns all descendants.
Definition at line 61 of file INode.cpp.
References INode::nodeChildren().
|
inlinefinalvirtual |
|
inline |
|
inlinevirtualinherited |
Used for Python overriding of clone (see swig/tweaks.py)
Definition at line 32 of file ICloneable.h.
Definition at line 46 of file Crystal.cpp.
References Crystal(), m_basis, m_lattice, m_position_variance, and IRotation::rotMatrix().
Referenced by Compute::Slicing::createParticleInSlice().
|
private |
Definition at line 56 of file Crystal.h.
Referenced by basis(), clone(), nodeChildren(), and transformed().
|
private |
Definition at line 57 of file Crystal.h.
Referenced by clone(), lattice(), nodeChildren(), and transformed().
|
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().
|
private |
Definition at line 58 of file Crystal.h.
Referenced by clone(), position_variance(), and transformed().