15 #ifndef BORNAGAIN_SAMPLE_MULTILAYER_MULTILAYER_H
16 #define BORNAGAIN_SAMPLE_MULTILAYER_MULTILAYER_H
72 std::vector<const INode*>
getChildren() const final;
Defines interface class ISampleNode.
Define RoughnessModels enumerator and Python wrapper.
Defines and implements template class SafePointerVector.
Visitor interface to visit ISampleNode objects.
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.
size_t check_layer_index(size_t i_layer) const
Checks index of layer w.r.t. vector length.
SafePointerVector< LayerInterface > m_interfaces
stack of layer interfaces [nlayers-1]
double m_crossCorrLength
cross correlation length (in z direction) between different layers
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.
kvector_t externalField() const
Returns the external field applied to the multilayer (units: A/m)
void addAndRegisterLayer(Layer *child)
Adds the layer with simultaneous registration in parent class.
SafePointerVector< Layer > m_layers
stack of layers [nlayers]
void handleLayerThicknessRegistration()
Handles correct registration of layer thicknesses (not needed for top and bottom layer)
std::vector< const INode * > getChildren() const final
Returns a vector of children.
size_t check_interface_index(size_t i_interface) const
Checks index of interface w.r.t. vector length.
void setExternalField(kvector_t ext_field)
Sets the external field applied to the multilayer (units: A/m)
kvector_t m_ext_field
external magnetic field (in A/m)
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 accept(INodeVisitor *visitor) const final
Calls the INodeVisitor's visit method.
void addLayerWithTopRoughness(const Layer &layer, const LayerRoughness &roughness)
Adds layer with top roughness.
double crossCorrLength() const
Returns cross correlation length of roughnesses between interfaces.
void addAndRegisterInterface(LayerInterface *child)
Adds the interface with simultaneous registration in parent class.
MultiLayer * clone() const final
Returns a clone of this ISampleNode object.
Decorator class that adds particles to ISampleNode objects.
A vector of pointers, owned by *this, with methods to handle them safely.