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
5750a30b
Commit
5750a30b
authored
6 months ago
by
Mikhail Svechnikov
Browse files
Options
Downloads
Patches
Plain Diff
rm SliceInterface
parent
f61c80f1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2723
Implement model of growing roughness (#969)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Sim/Computation/RoughMultiLayerContribution.cpp
+8
-20
8 additions, 20 deletions
Sim/Computation/RoughMultiLayerContribution.cpp
with
8 additions
and
20 deletions
Sim/Computation/RoughMultiLayerContribution.cpp
+
8
−
20
View file @
5750a30b
...
...
@@ -100,18 +100,6 @@ complex_t get_sum8terms(const ReSample& re_sample, size_t i_layer, const Diffuse
return
term1
+
term2
+
term3
+
term4
+
term5
+
term6
+
term7
+
term8
;
}
class
SliceInterface
{
public:
SliceInterface
(
const
Slice
&
slice
)
:
hig
(
slice
.
hig
())
,
topRoughness
(
slice
.
topRoughness
())
{
ASSERT
(
topRoughness
);
}
double
hig
=
0
;
const
LayerRoughness
*
topRoughness
=
nullptr
;
};
}
// namespace
double
Compute
::
roughMultiLayerContribution
(
const
ReSample
&
re_sample
,
const
DiffuseElement
&
ele
)
...
...
@@ -125,7 +113,7 @@ double Compute::roughMultiLayerContribution(const ReSample& re_sample, const Dif
double
autocorr_sum
=
0
;
double
crosscorr_sum
=
0
;
std
::
vector
<
Slice
Interface
>
roughStack
;
// only slices with rough top interfaces
std
::
vector
<
Slice
>
roughStack
;
// only slices with rough top interfaces
std
::
vector
<
complex_t
>
rterm
;
std
::
vector
<
complex_t
>
sterm
;
...
...
@@ -146,12 +134,12 @@ double Compute::roughMultiLayerContribution(const ReSample& re_sample, const Dif
// precompute autocorrelation terms
for
(
int
i
=
n_interfaces
-
1
;
i
>=
0
;
i
--
)
{
auto
*
autocorr_model
=
roughStack
[
i
].
topRoughness
->
autocorrelationModel
();
auto
*
autocorr_model
=
roughStack
[
i
].
topRoughness
()
->
autocorrelationModel
();
if
(
auto
*
k_corr
=
dynamic_cast
<
const
K_CorrelationModel
*>
(
autocorr_model
))
{
spectrum
[
i
]
=
k_corr
->
spectralFunction
(
q
);
}
else
if
(
auto
*
lin_growth
=
dynamic_cast
<
const
LinearGrowthModel
*>
(
autocorr_model
))
{
ASSERT
(
i
<
int
(
n_interfaces
-
1
));
const
double
thickness
=
roughStack
[
i
].
hig
-
roughStack
[
i
+
1
].
hig
;
const
double
thickness
=
roughStack
[
i
].
hig
()
-
roughStack
[
i
+
1
].
hig
()
;
spectrum
[
i
]
=
lin_growth
->
spectralFunction
(
spectrum
[
i
+
1
],
thickness
,
q
);
}
}
...
...
@@ -162,15 +150,15 @@ double Compute::roughMultiLayerContribution(const ReSample& re_sample, const Dif
// precompute crosscorrelation terms
for
(
int
j
=
n_interfaces
-
2
;
j
>=
0
;
j
--
)
{
const
double
thickness
=
roughStack
[
j
].
hig
-
roughStack
[
j
+
1
].
hig
;
const
double
thickness
=
roughStack
[
j
].
hig
()
-
roughStack
[
j
+
1
].
hig
()
;
if
(
auto
*
spat_freq_cc
=
dynamic_cast
<
const
SpatialFrequencyCrosscorrelation
*>
(
roughStack
[
j
].
topRoughness
->
crosscorrelationModel
()))
{
const
double
sigma_up
=
roughStack
[
j
].
topRoughness
->
sigma
();
const
double
sigma_low
=
roughStack
[
j
+
1
].
topRoughness
->
sigma
();
roughStack
[
j
].
topRoughness
()
->
crosscorrelationModel
()))
{
const
double
sigma_up
=
roughStack
[
j
].
topRoughness
()
->
sigma
();
const
double
sigma_low
=
roughStack
[
j
+
1
].
topRoughness
()
->
sigma
();
crosscorr_with_interface_below
[
j
]
=
spat_freq_cc
->
crosscorrSpectrum
(
sigma_up
,
sigma_low
,
spectrum
[
j
],
spectrum
[
j
+
1
],
thickness
,
q
);
}
else
if
(
auto
*
lin_growth_autocorr
=
dynamic_cast
<
const
LinearGrowthModel
*>
(
roughStack
[
j
].
topRoughness
->
autocorrelationModel
()))
{
roughStack
[
j
].
topRoughness
()
->
autocorrelationModel
()))
{
crosscorr_with_interface_below
[
j
]
=
lin_growth_autocorr
->
crosscorrSpectrum
(
spectrum
[
j
+
1
],
thickness
,
q
);
}
...
...
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