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
c6fcfab6
Commit
c6fcfab6
authored
3 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
throw -> ASSERT
parent
7ff4e3a2
No related branches found
No related tags found
1 merge request
!228
decouple CoordSystem2D from Beam, and minor cleanup in related context
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Device/Coord/CoordSystem1D.cpp
+3
-2
3 additions, 2 deletions
Device/Coord/CoordSystem1D.cpp
Device/Instrument/CoordSystem2D.cpp
+6
-6
6 additions, 6 deletions
Device/Instrument/CoordSystem2D.cpp
with
9 additions
and
8 deletions
Device/Coord/CoordSystem1D.cpp
+
3
−
2
View file @
c6fcfab6
...
...
@@ -16,6 +16,7 @@
#include
"Base/Axis/PointwiseAxis.h"
#include
"Base/Const/Units.h"
#include
"Base/Math/Constants.h"
#include
"Base/Utils/Assert.h"
#include
"Device/Coord/AxisNames.h"
#include
"Device/Data/OutputData.h"
...
...
@@ -194,7 +195,7 @@ AngularReflectometryCoordinates::getTraslatorTo(Axes::Coords units) const
case
Axes
::
Coords
::
RQ4
:
return
[
wl
=
m_wavelength
](
double
value
)
{
return
getQ
(
wl
,
value
);
};
default
:
throwUnitsError
(
"AngularReflectometryCoordinates::getTraslatorTo"
,
availableUnits
()
);
ASSERT
(
0
);
}
}
...
...
@@ -244,6 +245,6 @@ WavenumberReflectometryCoordinates::getTraslatorTo(Axes::Coords units) const
case
Axes
::
Coords
::
RQ4
:
return
[](
double
value
)
{
return
value
;
};
default
:
throwUnitsError
(
"WavenumberReflectometryCoordinates::getTraslatorTo"
,
availableUnits
()
);
ASSERT
(
0
);
}
}
This diff is collapsed.
Click to expand it.
Device/Instrument/CoordSystem2D.cpp
+
6
−
6
View file @
c6fcfab6
...
...
@@ -152,23 +152,23 @@ double SphericalCoords::calculateValue(size_t i_axis, Axes::Coords units, double
case
Axes
::
Coords
::
DEGREES
:
return
Units
::
rad2deg
(
value
);
case
Axes
::
Coords
::
QSPACE
:
{
const
auto
k_i
=
vecOfLambdaAlphaPhi
(
m_wavelength
,
m_alpha_i
,
m_phi_i
);
const
kvector_t
k_i
=
vecOfLambdaAlphaPhi
(
m_wavelength
,
m_alpha_i
,
m_phi_i
);
if
(
i_axis
==
0
)
{
const
auto
k_f
=
vecOfLambdaAlphaPhi
(
m_wavelength
,
0.0
,
value
);
const
kvector_t
k_f
=
vecOfLambdaAlphaPhi
(
m_wavelength
,
0.0
,
value
);
return
(
k_i
-
k_f
).
y
();
}
else
if
(
i_axis
==
1
)
{
const
auto
k_f
=
vecOfLambdaAlphaPhi
(
m_wavelength
,
value
,
0.0
);
const
kvector_t
k_f
=
vecOfLambdaAlphaPhi
(
m_wavelength
,
value
,
0.0
);
return
(
k_f
-
k_i
).
z
();
}
ASSERT
(
0
);
}
case
Axes
::
Coords
::
QXQY
:
{
const
auto
k_i
=
vecOfLambdaAlphaPhi
(
m_wavelength
,
m_alpha_i
,
m_phi_i
);
const
kvector_t
k_i
=
vecOfLambdaAlphaPhi
(
m_wavelength
,
m_alpha_i
,
m_phi_i
);
if
(
i_axis
==
0
)
{
const
auto
k_f
=
vecOfLambdaAlphaPhi
(
m_wavelength
,
0.0
,
value
);
const
kvector_t
k_f
=
vecOfLambdaAlphaPhi
(
m_wavelength
,
0.0
,
value
);
return
(
k_i
-
k_f
).
y
();
}
else
if
(
i_axis
==
1
)
{
const
auto
k_f
=
vecOfLambdaAlphaPhi
(
m_wavelength
,
value
,
0.0
);
const
kvector_t
k_f
=
vecOfLambdaAlphaPhi
(
m_wavelength
,
value
,
0.0
);
return
(
k_f
-
k_i
).
x
();
}
ASSERT
(
0
);
...
...
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