15 #ifndef BORNAGAIN_SAMPLE_MULTILAYER_LAYER_H
16 #define BORNAGAIN_SAMPLE_MULTILAYER_LAYER_H
32 std::string
className() const final {
return "Layer"; }
33 std::vector<ParaMeta>
parDefs() const final
35 return {{
"Thickness",
"nm",
"thickness", 0, +
INF, 0}};
45 std::vector<const ParticleLayout*>
layouts()
const;
54 std::vector<std::unique_ptr<ParticleLayout>>
m_layouts;
Defines interface class ISampleNode.
Defines and implements class Material.
Abstract base class for sample components and properties related to scattering.
A layer in a MultiLayer sample.
void setNumberOfSlices(unsigned int n_slices)
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
std::vector< const ParticleLayout * > layouts() const
double m_thickness
layer thickness in nanometers
void addLayout(const ParticleLayout &layout)
size_t numberOfLayouts() const
std::vector< std::unique_ptr< ParticleLayout > > m_layouts
independent layouts in this layer
unsigned int numberOfSlices() const
unsigned int m_n_slices
number of slices to create for graded layer approach
Material m_material
material
Layer(Material material, double thickness=0)
Constructor of a layer with thickness and material.
const Material * material() const override
Returns nullptr, unless overwritten to return a specific material.
R3 m_B_field
cached value of magnetic induction
Layer * clone() const override
Returns a clone of this ISampleNode object.
std::vector< const INode * > nodeChildren() const override
Returns all children.
A wrapper for underlying material implementation.
Decorator class that adds particles to ISampleNode objects.