Skip to content
Snippets Groups Projects
Commit 57e51b6d authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

asserts and comment

parent b4159cb0
No related branches found
No related tags found
1 merge request!1028simplify slicing procedures
......@@ -128,12 +128,14 @@ SliceStack slicify(const MultiLayer& sample, const SimulationOptions& options)
if (roughness && roughness->sigma() <= 0)
roughness = nullptr;
if (i == nLayers - 1)
if (i == 0) {
ASSERT(tl == 0);
if (i == 0)
result.addTopSlice(tl, *material);
else
} else {
if (i == nLayers - 1)
ASSERT(tl == 0);
result.addSlice(tl, *material, roughness);
}
}
return result;
}
......@@ -335,7 +337,7 @@ ReSample ReSample::make(const MultiLayer& sample, const SimulationOptions& optio
const bool polarized = forcePolarized || sample.isMagnetic() || sample.externalField() != R3();
// stack1: accounting for roughness, but not yet for particles
// if requested, slice layers that contain particles
const SliceStack stack1 = slicify(sample, options).setBField(sample.externalField());
std::vector<ReLayout> layouts = collectLayouts(sample, stack1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment