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
9e2e6179
Commit
9e2e6179
authored
3 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
rename -> ProcessedSample::m_stack
parent
fbced6c2
No related branches found
No related tags found
1 merge request
!215
Prepare for generalization of kz and TR computation
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Resample/Processed/ProcessedSample.cpp
+14
-14
14 additions, 14 deletions
Resample/Processed/ProcessedSample.cpp
Resample/Processed/ProcessedSample.h
+1
-1
1 addition, 1 deletion
Resample/Processed/ProcessedSample.h
with
15 additions
and
15 deletions
Resample/Processed/ProcessedSample.cpp
+
14
−
14
View file @
9e2e6179
...
...
@@ -230,12 +230,12 @@ ProcessedSample::ProcessedSample(const MultiLayer& sample, bool polarized,
:
m_sample
(
sample
)
,
m_polarized
(
polarized
)
,
m_layouts
(
std
::
move
(
layouts
))
,
m_
refined_
stack
(
refined_stack
)
,
m_stack
(
refined_stack
)
{
}
ProcessedSample
::
ProcessedSample
(
ProcessedSample
&&
)
:
ProcessedSample
(
m_sample
,
m_polarized
,
std
::
move
(
m_layouts
),
m_
refined_
stack
)
:
ProcessedSample
(
m_sample
,
m_polarized
,
std
::
move
(
m_layouts
),
m_stack
)
{
}
...
...
@@ -243,17 +243,17 @@ ProcessedSample::~ProcessedSample() = default;
size_t
ProcessedSample
::
numberOfSlices
()
const
{
return
m_
refined_
stack
.
size
();
return
m_stack
.
size
();
}
const
SliceStack
&
ProcessedSample
::
averageSlices
()
const
{
return
m_
refined_
stack
;
return
m_stack
;
}
const
Slice
&
ProcessedSample
::
avgeSlice
(
size_t
i
)
const
{
return
m_
refined_
stack
.
at
(
i
);
return
m_stack
.
at
(
i
);
}
const
std
::
vector
<
ProcessedLayout
>&
ProcessedSample
::
layouts
()
const
...
...
@@ -263,12 +263,12 @@ const std::vector<ProcessedLayout>& ProcessedSample::layouts() const
double
ProcessedSample
::
sliceTopZ
(
size_t
i
)
const
{
return
m_
refined_
stack
.
at
(
i
).
zTop
();
return
m_stack
.
at
(
i
).
zTop
();
}
double
ProcessedSample
::
sliceBottomZ
(
size_t
i
)
const
{
return
m_
refined_
stack
.
at
(
i
).
zBottom
();
return
m_stack
.
at
(
i
).
zBottom
();
}
bool
ProcessedSample
::
containsMagneticMaterial
()
const
...
...
@@ -283,7 +283,7 @@ bool ProcessedSample::polarizing() const
bool
ProcessedSample
::
hasRoughness
()
const
{
for
(
const
auto
&
slice
:
m_
refined_
stack
)
for
(
const
auto
&
slice
:
m_stack
)
if
(
slice
.
topRoughness
())
return
true
;
return
false
;
...
...
@@ -292,15 +292,15 @@ bool ProcessedSample::hasRoughness() const
Fluxes
ProcessedSample
::
fluxesIn
(
const
kvector_t
&
k
)
const
{
if
(
m_polarized
)
return
Compute
::
SpecularMagnetic
::
fluxes
(
m_
refined_
stack
,
k
,
true
);
return
Compute
::
SpecularScalar
::
fluxes
(
m_
refined_
stack
,
k
);
return
Compute
::
SpecularMagnetic
::
fluxes
(
m_stack
,
k
,
true
);
return
Compute
::
SpecularScalar
::
fluxes
(
m_stack
,
k
);
}
Fluxes
ProcessedSample
::
fluxesOut
(
const
kvector_t
&
k
)
const
{
if
(
m_polarized
)
return
Compute
::
SpecularMagnetic
::
fluxes
(
m_
refined_
stack
,
-
k
,
false
);
return
Compute
::
SpecularScalar
::
fluxes
(
m_
refined_
stack
,
-
k
);
return
Compute
::
SpecularMagnetic
::
fluxes
(
m_stack
,
-
k
,
false
);
return
Compute
::
SpecularScalar
::
fluxes
(
m_stack
,
-
k
);
}
double
ProcessedSample
::
crossCorrSpectralFun
(
const
kvector_t
kvec
,
size_t
j
,
size_t
k
)
const
...
...
@@ -310,8 +310,8 @@ double ProcessedSample::crossCorrSpectralFun(const kvector_t kvec, size_t j, siz
return
0.0
;
const
double
z_j
=
sliceBottomZ
(
j
);
const
double
z_k
=
sliceBottomZ
(
k
);
const
LayerRoughness
*
rough_j
=
m_
refined_
stack
.
at
(
j
+
1
).
topRoughness
();
const
LayerRoughness
*
rough_k
=
m_
refined_
stack
.
at
(
k
+
1
).
topRoughness
();
const
LayerRoughness
*
rough_j
=
m_stack
.
at
(
j
+
1
).
topRoughness
();
const
LayerRoughness
*
rough_k
=
m_stack
.
at
(
k
+
1
).
topRoughness
();
if
(
!
rough_j
||
!
rough_k
)
return
0.0
;
const
double
sigma_j
=
rough_j
->
getSigma
();
...
...
This diff is collapsed.
Click to expand it.
Resample/Processed/ProcessedSample.h
+
1
−
1
View file @
9e2e6179
...
...
@@ -70,7 +70,7 @@ private:
const
MultiLayer
&
m_sample
;
const
bool
m_polarized
;
std
::
vector
<
ProcessedLayout
>
m_layouts
;
// const forbidden by &&-c'tor < needed by tests
const
SliceStack
m_
refined_
stack
;
const
SliceStack
m_stack
;
};
#endif // BORNAGAIN_RESAMPLE_PROCESSED_PROCESSEDSAMPLE_H
...
...
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