Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
42161da4
Commit
42161da4
authored
2 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
rm local vars
parent
ba8d0bb6
No related branches found
No related tags found
1 merge request
!1275
streamline computation of scattering contributions
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Sim/Simulation/ScatteringSimulation.cpp
+4
-8
4 additions, 8 deletions
Sim/Simulation/ScatteringSimulation.cpp
with
4 additions
and
8 deletions
Sim/Simulation/ScatteringSimulation.cpp
+
4
−
8
View file @
42161da4
...
...
@@ -187,19 +187,15 @@ SimulationResult ScatteringSimulation::packResult()
std
::
vector
<
DiffuseElement
>
ScatteringSimulation
::
generateElements
(
const
Beam
&
beam
)
const
{
const
double
wavelength
=
beam
.
wavelength
();
const
double
alpha_i
=
beam
.
alpha_i
();
const
double
phi_i
=
beam
.
phi_i
();
const
SpinMatrix
beam_polMatrices
=
beam
.
polMatrix
();
const
SpinMatrix
analyzer_operator
=
m_detector
->
analyzer
().
matrix
();
const
size_t
i_specular
=
m_detector
->
indexOfSpecular
(
beam
);
const
size_t
N
=
m_active_indices
.
size
();
std
::
vector
<
DiffuseElement
>
result
;
result
.
reserve
(
N
);
for
(
size_t
i
=
0
;
i
<
N
;
++
i
)
result
.
emplace_back
(
DiffuseElement
(
wavelength
,
alpha_i
,
phi_i
,
std
::
unique_ptr
<
IPixel
>
(
m_pixels
[
i
]
->
clone
()),
beam_polMatrices
,
analyzer_operator
,
m_active_indices
[
i
]
==
i_specular
));
result
.
emplace_back
(
DiffuseElement
(
beam
.
wavelength
(),
beam
.
alpha_i
(),
beam
.
phi_i
(),
std
::
unique_ptr
<
IPixel
>
(
m_pixels
[
i
]
->
clone
()),
beam
.
polMatrix
(),
m_detector
->
analyzer
().
matrix
(),
m_active_indices
[
i
]
==
i_specular
));
return
result
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment