31 const double layer_thickness = 100.0;
32 const double length = 50.0;
33 const double width = 20.0;
34 const double height = 10.0;
43 middle_layer.addLayout(layout);
47 sample->addLayer(vacuum_layer);
48 sample->addLayer(middle_layer);
49 sample->addLayer(substrate);
59 Particle box(particleMaterial,
Box(length / 2.0, width, height));
62 composition.
addParticle(box, R3(length / 2.0, 0.0, 0.0));
65 return finalizeMultiLayer(composition);
72 Particle box(particleMaterial,
Box(length / 2.0, width, height));
75 composition.
addParticle(box, R3(length / 2.0, 0.0, 0.0));
78 return finalizeMultiLayer(composition);
85 Particle box(particleMaterial,
Box(length / 2.0, width, height));
88 composition.
addParticle(box, R3(length / 2.0, 0.0, 0.0));
91 return finalizeMultiLayer(composition);
98 Particle box(particleMaterial,
Box(length / 2.0, width, height));
101 composition.
addParticle(box, R3(length / 2.0, 0.0, 0.0));
105 return finalizeMultiLayer(composition);
116 const double box1_length = 20;
117 const double box1_width = 50;
118 const double box1_height = 5;
119 Particle box1(particleMaterial,
Box(box1_length, box1_width, box1_height));
123 const double box2_length = 5.0;
124 const double box2_width = 20.0;
125 const double box2_height = 50.0;
126 Particle box2(particleMaterial,
Box(box2_length, box2_width, box2_height));
131 composition.
addParticle(box2, R3(0.0, 0.0, box1_height));
135 return finalizeMultiLayer(composition);
Defines classes of BoxCompositionBuilder family.
Defines class MultiLayer.
Defines class ParticleComposition.
Defines class ParticleLayout.
Defines materials in namespace refMat.
Defines IRotation classes.
Defines some unit conversion factors and other constants in namespace Units.
A rectangular prism (parallelepiped).
void setParticlePosition(R3 position)
Sets relative position of the particle's reference point in the coordinate system of parent.
IParticle * rotate(const IRotation &rotation)
Rotates the particle, and returns this.
void setRotation(const IRotation &rotation)
Sets transformation.
A layer in a MultiLayer sample.
A wrapper for underlying material implementation.
Our sample model: a stack of layers one below the other.
A composition of particles at fixed positions.
void addParticle(const IParticle &particle)
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 x axis.
A rotation about the y axis.
A rotation about the z axis.
Material RefractiveMaterial(const std::string &name, complex_t refractive_index, R3 magnetization)
MultiLayer * createBoxStackComposition()
MultiLayer * createBoxCompositionRotateX()
MultiLayer * createBoxCompositionRotateZ()
MultiLayer * createBoxCompositionRotateY()
MultiLayer * createBoxCompositionRotateZandY()
static constexpr double deg
static const Material Substrate2
static const Material Vacuum
static const Material Teflon