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
bfcd5ff4
Commit
bfcd5ff4
authored
7 months ago
by
Mikhail Svechnikov
Browse files
Options
Downloads
Patches
Plain Diff
adapt ItemizeSample
parent
2a1c71ef
No related branches found
No related tags found
1 merge request
!2712
Move out {sigma, hurst, correlationLength} to autocorrelation model class
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/Model/FromCore/ItemizeSample.cpp
+24
-19
24 additions, 19 deletions
GUI/Model/FromCore/ItemizeSample.cpp
Sample/Interface/AutoCorrModels.h
+0
-5
0 additions, 5 deletions
Sample/Interface/AutoCorrModels.h
with
24 additions
and
24 deletions
GUI/Model/FromCore/ItemizeSample.cpp
+
24
−
19
View file @
bfcd5ff4
...
...
@@ -282,29 +282,34 @@ void set_RadialParacrystalItem(InterferenceRadialParacrystalItem* parent,
set_PositionVariance
(
parent
,
sample
);
}
void
set_Roughness
(
Layer
Item
*
parent
,
const
LayerInterface
*
top_interface
)
void
set_
InterlayerModel
(
RoughnessItem
*
parent
,
const
InterlayerModel
*
interlayer
)
{
parent
->
roughnessSelection
().
setCertainItem
(
nullptr
);
if
(
top_interface
)
{
const
LayerRoughness
*
roughness
=
top_interface
->
roughness
();
const
auto
*
autoCorr
=
dynamic_cast
<
const
BasicAutoCorr
*>
(
roughness
->
autoCorrModel
());
ASSERT
(
autoCorr
);
// TODO temporary
if
(
dynamic_cast
<
const
ErfInterlayer
*>
(
interlayer
))
parent
->
interlayerModelSelection
().
setCertainItem
(
new
ErfInterlayerItem
);
else
if
(
dynamic_cast
<
const
TanhInterlayer
*>
(
interlayer
))
parent
->
interlayerModelSelection
().
setCertainItem
(
new
TanhInterlayerItem
);
else
ASSERT_NEVER
;
}
if
(
roughness
&&
!
(
autoCorr
->
allZero
()))
{
auto
*
t
=
new
BasicRoughnessItem
(
roughness
->
sigma
(),
autoCorr
->
hurst
(),
autoCorr
->
lateralCorrLength
());
void
set_Roughness
(
LayerItem
*
parent
,
const
LayerInterface
*
top_interface
)
{
if
(
!
top_interface
)
{
parent
->
roughnessSelection
().
setCertainItem
(
nullptr
);
return
;
}
if
(
dynamic_cast
<
const
ErfInterlayer
*>
(
roughness
->
interlayerModel
()))
t
->
interlayerModelSelection
().
setCertainItem
(
new
ErfInterlayerItem
);
else
if
(
dynamic_cast
<
const
TanhInterlayer
*>
(
roughness
->
interlayerModel
()))
t
->
interlayerModelSelection
().
setCertainItem
(
new
TanhInterlayerItem
);
else
ASSERT_NEVER
;
const
LayerRoughness
*
roughness
=
top_interface
->
roughness
();
const
AutoCorrModel
*
autoCorr
=
roughness
->
autoCorrModel
();
const
InterlayerModel
*
interlayer
=
roughness
->
interlayerModel
();
parent
->
roughnessSelection
().
setCertainItem
(
t
);
}
}
if
(
const
auto
*
autoCorrItem
=
dynamic_cast
<
const
BasicAutoCorr
*>
(
autoCorr
))
{
auto
*
br
=
new
BasicRoughnessItem
(
autoCorrItem
->
sigma
(),
autoCorrItem
->
hurst
(),
autoCorrItem
->
lateralCorrLength
());
set_InterlayerModel
(
br
,
interlayer
);
parent
->
roughnessSelection
().
setCertainItem
(
br
);
}
else
ASSERT_NEVER
;
}
void
set_Rotation
(
ItemWithParticles
*
parent
,
const
IRotation
*
rotation
)
...
...
This diff is collapsed.
Click to expand it.
Sample/Interface/AutoCorrModels.h
+
0
−
5
View file @
bfcd5ff4
...
...
@@ -44,11 +44,6 @@ public:
#ifndef SWIG
//! Creates the Python constructor of this class
std
::
string
pythonArguments
()
const
;
bool
allZero
()
const
{
return
sigma
()
==
0
&&
hurst
()
==
0
&&
lateralCorrLength
()
==
0
;
}
#endif
//! Returns power spectral density of the surface roughness
...
...
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