58 if (p_layer == multilayer.
layer(i))
60 throw std::out_of_range(
"MultiLayerUtils::IndexOfLayer: layer not found");
76 auto p_layer = multilayer.
layer(i);
77 double offset = (i == 0) ? 0 : bottom_coords[i - 1];
78 for (
auto p_layout : p_layer->layouts()) {
79 for (
auto p_particle : p_layout->particles())
80 layer_fill_limits.
update(p_particle->bottomTopZ(), offset);
103 std::vector<double> result(n_layers - 1);
105 for (
size_t i = 1; i < n_layers - 1; ++i) {
Defines and implements interface class ILayout.
Defines interface IParticle.
Defines class LayerFillLimits.
Defines class LayerInterface.
Declares functions in namespace MaterialUtils.
Defines helper functions for MultiLayer objects.
Defines class MultiLayer.
std::vector< const Material * > containedMaterials() const
Returns set of unique materials contained in this ISample.
Helper class for the graded layer approximation.
std::vector< ZLimits > layerZLimits() const
Returns the filled region limits for each layer (in local layer coordinates)
void update(ParticleLimits particle_limits, double offset=0.0)
Particle limits are given in global coordinates.
Interface between two layers, possibly with roughness.
const LayerRoughness * getRoughness() const
Returns roughness of the interface.
A roughness of interface between two layers.
A layer, with thickness (in nanometer) and material.
Our sample model: a stack of layers one below the other.
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.
size_t numberOfLayers() const
MATERIAL_TYPES checkMaterialTypes(const std::vector< const Material * > &materials)
Checks if all non-default materials in materials are of the same type and returns this type.
const LayerRoughness * LayerTopRoughness(const MultiLayer &multilayer, size_t i)
Returns top roughness of layer.
std::vector< ZLimits > ParticleRegions(const MultiLayer &multilayer, bool use_slicing)
Calculate z-regions occupied by particles.
size_t IndexOfLayer(const MultiLayer &multilayer, const Layer *p_layer)
Returns the index of the given layer.
bool ContainsCompatibleMaterials(const MultiLayer &multilayer)
Returns true if the multilayer contains non-default materials of one type only.
double LayerThickness(const MultiLayer &multilayer, size_t i)
Returns thickness of layer.
const LayerInterface * LayerTopInterface(const MultiLayer &multilayer, size_t i)
Returns top interface of layer.
bool hasRoughness(const MultiLayer &sample)
const LayerInterface * LayerBottomInterface(const MultiLayer &multilayer, size_t i)
Returns bottom interface of layer.
std::vector< double > BottomLayerCoordinates(const MultiLayer &multilayer)