22 : m_material(std::move(material))
23 , m_thickness(thickness)
26 throw std::runtime_error(
"Layer thickness cannot be negative");
36 for (
const auto* layout :
layouts())
37 result->addLayout(*layout);
43 std::vector<const INode*> result;
45 result.push_back(layout.get());
56 std::vector<const ParticleLayout*> result;
58 result.push_back(layout.get());
Defines class ParticleLayout.
A layer in a MultiLayer sample.
std::vector< const ParticleLayout * > layouts() const
double m_thickness
layer thickness in nanometers
void addLayout(const ParticleLayout &layout)
std::vector< std::unique_ptr< ParticleLayout > > m_layouts
independent layouts in this layer
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.
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.
ParticleLayout * clone() const override
Returns a clone of this ISampleNode object.