32 const double sphere_radius = 5;
34 const std::map<std::string, std::pair<double, RoughnessModel>> RoughnessCases = {
35 {
"Flat", {0., RoughnessModel::TANH}},
36 {
"Tanh", {2., RoughnessModel::TANH}},
37 {
"NevotCroce", {2., RoughnessModel::NEVOT_CROCE}},
46 R3 substr_field(0.0, 0.0, 0.0);
47 R3 particle_field(0.1, 0.0, 0.0);
53 R3 position(0.0, 0.0, -10.0);
54 Sphere ff_sphere(sphere_radius);
55 Particle particle(particle_material, ff_sphere);
59 Layer vacuum_layer(vacuum_material);
60 Layer substrate_layer(substrate_material);
61 substrate_layer.
addLayout(particle_layout);
64 sample->addLayer(vacuum_layer);
65 sample->addLayer(substrate_layer);
75 R3 layer_field = R3(0.0, 1e8, 0.0);
80 Layer vacuum_layer(vacuum_material);
81 Layer intermediate_layer(layer_material, 10.0);
82 Layer substrate_layer(substrate_material);
84 sample->addLayer(vacuum_layer);
85 sample->addLayer(intermediate_layer);
86 sample->addLayer(substrate_layer);
96 R3 layer_field = R3(0.0, 0.0, 1e6);
97 R3 particle_field(1e6, 0.0, 0.0);
104 Sphere ff_sphere(sphere_radius);
105 Particle particle(particle_material, ff_sphere);
108 Layer vacuum_layer(vacuum_material);
110 Layer substrate_layer(substrate_material);
112 sample->addLayer(vacuum_layer);
113 sample->addLayer(substrate_layer);
122 const auto& [sigmaRoughness, roughnessModel] = RoughnessCases.at(roughnessKey);
125 R3 substr_field = R3(0.0, 1e6, 0.0);
126 R3 layer_field = R3(1e6, 1e6, 0.0);
134 Layer vacuum_layer(vacuum_material);
135 Layer substrate_layer(substrate_material);
137 sample->addLayer(vacuum_layer);
138 sample->addLayerWithTopRoughness(layer, roughness);
139 sample->addLayerWithTopRoughness(substrate_layer, roughness);
140 sample->setRoughnessModel(roughnessModel);
150 R3 substr_field = R3(0.0, 1e6, 0.0);
151 R3 particle_field(1e6, 0.0, 0.0);
157 R3 position(0.0, 0.0, -10.0);
158 Sphere ff_sphere(sphere_radius);
159 Particle particle(particle_material, ff_sphere);
165 Layer vacuum_layer(vacuum_material);
166 Layer substrate_layer(substrate_material);
167 substrate_layer.
addLayout(particle_layout);
169 sample->addLayer(vacuum_layer);
170 sample->addLayer(substrate_layer);
Defines the macro ASSERT.
Defines class LayerRoughness.
Defines class to build samples with magnetic layers.
Factory functions used to create material instances.
Defines class MultiLayer.
Defines class ParticleLayout.
Defines IRotation classes.
Defines some unit conversion factors and other constants in namespace Units.
IParticle * translate(R3 translation)
Translates the particle, and returns this.
IParticle * rotate(const IRotation &rotation)
Rotates the particle, and returns this.
A roughness of interface between two layers.
A layer in a MultiLayer sample.
void addLayout(const ParticleLayout &layout)
A wrapper for underlying material implementation.
Our sample model: a stack of layers one below the other.
Decorator class that adds particles to ISampleNode objects.
void addParticle(const IParticle &particle, double abundance=-1.0)
Adds particle to the layout with abundance, position and the rotation defined.
A particle with a form factor and refractive index.
A rotation about the z axis.
Material RefractiveMaterial(const std::string &name, complex_t refractive_index, R3 magnetization)
MultiLayer * createMagneticSubstrateZeroField()
MultiLayer * createSimpleMagneticRotationWithRoughness(const std::string &roughnessKey)
MultiLayer * createSimpleMagneticLayer()
MultiLayer * createMagneticLayer()
MultiLayer * createMagneticRotation()
static constexpr double deg
static constexpr double angstrom