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
53216e67
Commit
53216e67
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
uniform local var names
parent
6556bc38
No related branches found
No related tags found
1 merge request
!1862
minor cleanup while hunting bug in fd5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/Model/FromCore/ItemizeSimulation.cpp
+6
-6
6 additions, 6 deletions
GUI/Model/FromCore/ItemizeSimulation.cpp
Tests/Suite/GUI/Check.cpp
+3
-2
3 additions, 2 deletions
Tests/Suite/GUI/Check.cpp
with
9 additions
and
8 deletions
GUI/Model/FromCore/ItemizeSimulation.cpp
+
6
−
6
View file @
53216e67
...
...
@@ -379,12 +379,12 @@ InstrumentModel* GUI::FromCore::itemizeInstruments(const ISimulation& simulation
{
InstrumentItem
*
item
;
if
(
const
auto
*
gisasSimulation
=
dynamic_cast
<
const
ScatteringSimulation
*>
(
&
simulation
))
item
=
createGISASInstrumentItem
(
*
gisasSimulation
);
else
if
(
const
auto
*
offspecSimulation
=
dynamic_cast
<
const
OffspecSimulation
*>
(
&
simulation
))
item
=
createOffspecInstrumentItem
(
*
offspecSimulation
);
else
if
(
const
auto
*
s
pec_simulation
=
dynamic_cast
<
const
SpecularSimulation
*>
(
&
simulation
))
item
=
createSpecularInstrumentItem
(
*
s
pec_simulation
);
if
(
const
auto
*
sim
=
dynamic_cast
<
const
ScatteringSimulation
*>
(
&
simulation
))
item
=
createGISASInstrumentItem
(
*
sim
);
else
if
(
const
auto
*
sim
=
dynamic_cast
<
const
OffspecSimulation
*>
(
&
simulation
))
item
=
createOffspecInstrumentItem
(
*
sim
);
else
if
(
const
auto
*
s
im
=
dynamic_cast
<
const
SpecularSimulation
*>
(
&
simulation
))
item
=
createSpecularInstrumentItem
(
*
s
im
);
else
ASSERT_NEVER
;
...
...
This diff is collapsed.
Click to expand it.
Tests/Suite/GUI/Check.cpp
+
3
−
2
View file @
53216e67
...
...
@@ -50,13 +50,14 @@ std::unique_ptr<ISimulation> indirectSimulation(const ISimulation& sim)
bool
checkSimulation
(
const
std
::
string
&
name
,
ISimulation
&
sim
,
const
double
limit
)
{
std
::
cout
<<
"Tests/Suite/GUI: "
<<
name
<<
std
::
endl
;
std
::
cout
<<
" Direct simulation"
<<
std
::
endl
;
const
Datafield
ref_data
=
sim
.
simulate
();
std
::
cout
<<
" Round trip (simulation -> GUI items -> simulation)"
<<
std
::
endl
;
std
::
unique_ptr
<
ISimulation
>
sim2
(
indirectSimulation
(
sim
));
const
Datafield
data2
=
sim2
->
simulate
();
std
::
cout
<<
" Direct simulation"
<<
std
::
endl
;
const
Datafield
ref_data
=
sim
.
simulate
();
std
::
cout
<<
" Check difference"
<<
std
::
endl
;
bool
ok
=
DiffUtil
::
checkRelativeDifference
(
data2
.
flatVector
(),
ref_data
.
flatVector
(),
limit
);
...
...
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