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
6238257d
Commit
6238257d
authored
7 months ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Plain Diff
[j.1] follow-up to
!2700
(roughness visualization) ()
Merging branch 'j.1' into 'main'. See merge request
!2702
parents
5bdfe13a
e5ea4181
No related branches found
No related tags found
1 merge request
!2702
follow-up to !2700 (roughness visualization)
Pipeline
#153871
passed
7 months ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/View/Realspace/RealspaceBuilder.cpp
+3
-3
3 additions, 3 deletions
GUI/View/Realspace/RealspaceBuilder.cpp
Sample/Interface/RoughnessMap.cpp
+2
-4
2 additions, 4 deletions
Sample/Interface/RoughnessMap.cpp
with
5 additions
and
7 deletions
GUI/View/Realspace/RealspaceBuilder.cpp
+
3
−
3
View file @
6238257d
...
...
@@ -127,18 +127,18 @@ std::unique_ptr<Img3D::Layer> createLayer(const LayerItem& layerItem, const doub
// visual mesh will later be scaled, so we divide roughness by thickness factor in advance
std
::
unique_ptr
<
double2d_t
>
top
;
if
(
topRoughMap
)
top
.
reset
(
::
scaledArray
(
*
topRoughMap
,
1.
/
thickness
)
.
release
())
;
top
=
::
scaledArray
(
*
topRoughMap
,
1.
/
thickness
);
else
{
// TODO rework
// try to generate it roughness map if is not provided (individual layer visualization)
int
seed
=
1
;
// TODO accept seed from SampleItem/LayerItem
auto
new_top
=
::
layerRoughnessMap
(
layerItem
,
sceneGeometry
,
seed
);
if
(
new_top
.
get
())
top
.
reset
(
::
scaledArray
(
*
new_top
,
1.
/
thickness
)
.
release
())
;
top
=
::
scaledArray
(
*
new_top
,
1.
/
thickness
);
}
std
::
unique_ptr
<
double2d_t
>
bottom
;
if
(
bottomRoughMap
)
bottom
.
reset
(
::
scaledArray
(
*
bottomRoughMap
,
1.
/
thickness
)
.
release
())
;
bottom
=
::
scaledArray
(
*
bottomRoughMap
,
1.
/
thickness
);
std
::
unique_ptr
<
Img3D
::
Layer
>
result
=
std
::
make_unique
<
Img3D
::
Layer
>
(
Img3D
::
F3Range
(
Img3D
::
F3fromR3
({
-
s2
,
-
s2
,
ztop
}),
Img3D
::
F3fromR3
({
s2
,
s2
,
zbottom
})),
...
...
This diff is collapsed.
Click to expand it.
Sample/Interface/RoughnessMap.cpp
+
2
−
4
View file @
6238257d
...
...
@@ -204,10 +204,9 @@ void RoughnessMap::createMap()
double2d_t
h_map
=
mapFromHeights
();
double2d_t
s_map
=
mapFromSpectrum
();
int
iter
=
0
;
while
(
true
)
{
for
(
int
i
=
0
;;
++
i
)
{
// number of iterations is limited even if no convergence
ASSERT
(
i
ter
<
100
);
ASSERT
(
i
<
100
);
double2d_t
h_map_old
=
h_map
;
s_map
=
applySpectrumToHeights
(
h_map
,
s_map
);
h_map
=
applyHeightsToSpectrum
(
h_map
,
s_map
);
...
...
@@ -215,7 +214,6 @@ void RoughnessMap::createMap()
// adjust tolerance for proper speed/accuracy
if
(
::
converged
(
h_map_old
,
h_map
,
1e-4
))
break
;
iter
++
;
}
// 's_map' has "perfect" original spectrum and tolerable height statistics.
...
...
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