BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
A layer in a MultiLayer sample.
Public Member Functions | |
Layer (Material material, double thickness=0) | |
Constructor of a layer with thickness and material. More... | |
~Layer () override | |
void | addLayout (const ParticleLayout &layout) |
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... | |
Layer * | 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... | |
std::vector< const ParticleLayout * > | layouts () const |
const Material * | material () const override |
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... | |
size_t | numberOfLayouts () const |
unsigned int | numberOfSlices () const |
std::vector< ParaMeta > | parDefs () const final |
Returns the parameter definitions, to be hard-coded in each leaf class. More... | |
void | setNumberOfSlices (unsigned int n_slices) |
double | thickness () const |
virtual void | transferToCPP () |
Used for Python overriding of clone (see swig/tweaks.py) More... | |
Protected Attributes | |
std::vector< double > | m_P |
Private Attributes | |
R3 | m_B_field |
cached value of magnetic induction More... | |
std::vector< std::unique_ptr< ParticleLayout > > | m_layouts |
independent layouts in this layer More... | |
Material | m_material |
material More... | |
unsigned int | m_n_slices = 1 |
number of slices to create for graded layer approach More... | |
double | m_thickness |
layer thickness in nanometers More... | |
Layer::Layer | ( | Material | material, |
double | thickness = 0 |
||
) |
Constructor of a layer with thickness and material.
material | material the layer is made of |
thickness | thickness of a layer in nanometers |
Definition at line 21 of file Layer.cpp.
References thickness().
Referenced by clone().
|
overridedefault |
void Layer::addLayout | ( | const ParticleLayout & | layout | ) |
Definition at line 49 of file Layer.cpp.
References ParticleLayout::clone(), and m_layouts.
Referenced by ExemplarySamples::createBasic2DLattice(), ExemplarySamples::createBasic2DParaCrystalWithFTDis(), ExemplarySamples::createBoxesSquareLattice2D(), ExemplarySamples::createCenteredSquareLattice2D(), ExemplarySamples::createCoreShellBoxRotateZandY(), ExemplarySamples::createCoreShellParticle(), ExemplarySamples::createCosineRipple(), ExemplarySamples::createCustomMorphology(), ExemplarySamples::createCylindersAndPrisms(), ExemplarySamples::createCylindersInBA(), ExemplarySamples::createCylindersInDWBA(), ExemplarySamples::createFiniteSquareLattice2D(), ExemplarySamples::createHardDisk(), ExemplarySamples::createHexParaCrystal(), ExemplarySamples::createLargeCylindersInDWBA(), ExemplarySamples::createLattice1D(), ExemplarySamples::createLayersWithAbsorptionBySLD(), ExemplarySamples::createLayersWithAbsorptionWithFF(), ExemplarySamples::createMagneticCylinders(), ExemplarySamples::createMagneticLayer(), ExemplarySamples::createMagneticParticleZeroField(), ExemplarySamples::createMagneticRotation(), ExemplarySamples::createMagneticSpheres(), ExemplarySamples::createMagneticSubstrateZeroField(), ExemplarySamples::createMesoCrystal(), ExemplarySamples::createMultipleLayout(), ExemplarySamples::createParticleComposition(), ExemplarySamples::createParticleInVacuumWithFF(), ExemplarySamples::createRadialParaCrystal(), ExemplarySamples::createRectParaCrystal(), ExemplarySamples::createRotatedPyramids(), ExemplarySamples::createRotatedSquareLattice2D(), ExemplarySamples::createSizeDistributionDAModel(), ExemplarySamples::createSizeDistributionLMAModel(), ExemplarySamples::createSizeDistributionSSCAModel(), ExemplarySamples::createSLDSlicedCylinders(), ExemplarySamples::createSlicedComposition(), ExemplarySamples::createSlicedCylinders(), ExemplarySamples::createSquareLattice2D(), ExemplarySamples::createSuperLattice(), ExemplarySamples::createTransformBox(), and ExemplarySamples::createTriangularRipple().
|
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 31 of file Layer.cpp.
References Layer(), layouts(), m_B_field, m_material, m_n_slices, and m_thickness.
Referenced by MultiLayer::addLayerWithTopRoughness().
|
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().
std::vector< const ParticleLayout * > Layer::layouts | ( | ) | const |
|
inlineoverridevirtual |
Returns nullptr, unless overwritten to return a specific material.
Reimplemented from ISampleNode.
Definition at line 39 of file Layer.h.
References m_material.
|
overridevirtual |
|
inherited |
Returns all descendants.
Definition at line 61 of file INode.cpp.
References INode::nodeChildren().
|
inline |
|
inline |
|
inlinefinalvirtual |
|
inline |
Definition at line 47 of file Layer.h.
References m_n_slices.
Referenced by ExemplarySamples::createSLDSlicedCylinders(), and ExemplarySamples::createSlicedCylinders().
|
inline |
Definition at line 41 of file Layer.h.
References m_thickness.
Referenced by Layer(), and MultiLayer::addLayerWithTopRoughness().
|
inlinevirtualinherited |
Used for Python overriding of clone (see swig/tweaks.py)
Definition at line 32 of file ICloneable.h.
|
private |
|
private |
independent layouts in this layer
Definition at line 54 of file Layer.h.
Referenced by addLayout(), layouts(), nodeChildren(), and numberOfLayouts().
|
private |
|
private |
number of slices to create for graded layer approach
Definition at line 55 of file Layer.h.
Referenced by clone(), numberOfSlices(), and setNumberOfSlices().
|
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 |
layer thickness in nanometers
Definition at line 53 of file Layer.h.
Referenced by clone(), and thickness().