15 #ifndef BORNAGAIN_SAMPLE_MULTILAYER_MULTILAYER_H
16 #define BORNAGAIN_SAMPLE_MULTILAYER_MULTILAYER_H
22 #include <heinz/Vectors3D.h>
49 std::string
className() const final {
return "MultiLayer"; }
Defines interface class ISampleNode.
Defines and implements templated class OwningVector.
Define RoughnessModels enumerator and Python wrapper.
Abstract base class for sample components and properties related to scattering.
Interface between two layers, possibly with roughness.
A roughness of interface between two layers.
A layer in a MultiLayer sample.
Our sample model: a stack of layers one below the other.
MultiLayer(std::string name="Unnamed")
double m_crossCorrLength
cross correlation length (in z direction) between different layers
R3 m_ext_field
external magnetic field (in A/m)
void setRoughnessModel(RoughnessModel roughnessModel)
const LayerInterface * layerInterface(size_t i_interface) const
Returns interface with given index.
const Layer * layer(size_t i_layer) const
Returns layer with given index.
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
OwningVector< LayerInterface > m_interfaces
stack of layer interfaces [nlayers-1]
MultiLayer * clone() const override
Returns a clone of this ISampleNode object.
R3 externalField() const
Returns the external field applied to the sample (units: A/m)
std::string m_sample_name
RoughnessModel roughnessModel() const
void setCrossCorrLength(double crossCorrLength)
Sets cross correlation length of roughnesses between interfaces.
RoughnessModel m_roughness_model
size_t numberOfLayers() const
void addLayer(const Layer &layer)
Adds layer with default (zero) roughness.
void setExternalField(R3 ext_field)
Sets the external field applied to the sample (units: A/m)
void setSampleName(const std::string &name)
void addInterface(LayerInterface *child)
Adds the interface with simultaneous registration in parent class.
void addLayerWithTopRoughness(const Layer &layer, const LayerRoughness &roughness)
Adds layer with top roughness.
const std::string & sampleName() const
double crossCorrLength() const
Returns cross correlation length of roughnesses between interfaces.
OwningVector< Layer > m_layers
stack of layers [nlayers]
std::vector< const INode * > nodeChildren() const override
Returns all children.
Decorator class that adds particles to ISampleNode objects.