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
01f7d39e
Commit
01f7d39e
authored
3 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
initialize ff directly
parent
aed35f28
No related branches found
No related tags found
1 merge request
!169
Get rid of a number of fcts that are never reached
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Resample/Processed/ProcessedLayout.cpp
+8
-9
8 additions, 9 deletions
Resample/Processed/ProcessedLayout.cpp
with
8 additions
and
9 deletions
Resample/Processed/ProcessedLayout.cpp
+
8
−
9
View file @
01f7d39e
...
...
@@ -106,25 +106,24 @@ CoherentFFSum ProcessedLayout::processParticle(const IParticle& particle, const
std
::
vector
<
CoherentFFTerm
>
terms
;
for
(
size_t
i
=
0
;
i
<
sliced_ffs
.
size
();
++
i
)
{
// TODO provide slices_ffs.cbegin() etc
const
auto
pair
=
sliced_ffs
.
getPair
(
i
);
const
IFormFactor
&
ff
=
*
pair
.
first
;
const
size_t
iLayer
=
pair
.
second
;
const
Material
&
material
=
slices
[
iLayer
].
material
();
const
std
::
unique_ptr
<
IFormFactor
>
ff
(
pair
.
first
->
clone
());
ff
->
setAmbientMaterial
(
material
);
std
::
unique_ptr
<
IComputeFF
>
computer
;
if
(
slices
.
size
()
>
1
)
{
if
(
m_polarized
)
computer
=
std
::
make_unique
<
ComputeDWBAPol
>
(
ff
,
iLayer
);
computer
=
std
::
make_unique
<
ComputeDWBAPol
>
(
*
ff
,
iLayer
);
else
computer
=
std
::
make_unique
<
ComputeDWBA
>
(
ff
,
iLayer
);
computer
=
std
::
make_unique
<
ComputeDWBA
>
(
*
ff
,
iLayer
);
}
else
{
// no need for DWBA, use BA
if
(
m_polarized
)
computer
=
std
::
make_unique
<
ComputeBAPol
>
(
ff
,
iLayer
);
computer
=
std
::
make_unique
<
ComputeBAPol
>
(
*
ff
,
iLayer
);
else
computer
=
std
::
make_unique
<
ComputeBA
>
(
ff
,
iLayer
);
computer
=
std
::
make_unique
<
ComputeBA
>
(
*
ff
,
iLayer
);
}
const
Material
&
slice_material
=
slices
[
iLayer
].
material
();
computer
->
setAmbientMaterial
(
slice_material
);
terms
.
emplace_back
(
CoherentFFTerm
(
computer
.
release
()));
}
return
CoherentFFSum
(
abundance
/
total_abundance
,
terms
);
...
...
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