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
ae8e949c
Commit
ae8e949c
authored
2 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
+ ICoordSystem::convertedAxes
parent
143302d7
No related branches found
No related tags found
1 merge request
!892
continue simplifaction in axes context
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Device/Coord/ICoordSystem.cpp
+8
-4
8 additions, 4 deletions
Device/Coord/ICoordSystem.cpp
Device/Coord/ICoordSystem.h
+2
-0
2 additions, 0 deletions
Device/Coord/ICoordSystem.h
auto/Wrap/doxygenDevice.i
+3
-0
3 additions, 0 deletions
auto/Wrap/doxygenDevice.i
with
13 additions
and
4 deletions
Device/Coord/ICoordSystem.cpp
+
8
−
4
View file @
ae8e949c
...
...
@@ -18,13 +18,17 @@
ICoordSystem
::~
ICoordSystem
()
=
default
;
std
::
unique_ptr
<
Powerfield
<
double
>
>
ICoordSystem
::
c
reatePowerfield
(
Coords
units
)
const
std
::
vector
<
IAxis
*
>
ICoordSystem
::
c
onvertedAxes
(
Coords
units
)
const
{
std
::
vector
<
IAxis
*>
axes
;
std
::
vector
<
IAxis
*>
ret
;
for
(
size_t
i
=
0
;
i
<
rank
();
++
i
)
axes
.
emplace_back
(
createConvertedAxis
(
i
,
units
));
ret
.
emplace_back
(
createConvertedAxis
(
i
,
units
));
return
ret
;
}
std
::
unique_ptr
<
Powerfield
<
double
>>
result
(
new
Powerfield
<
double
>
(
axes
));
std
::
unique_ptr
<
Powerfield
<
double
>>
ICoordSystem
::
createPowerfield
(
Coords
units
)
const
{
std
::
unique_ptr
<
Powerfield
<
double
>>
result
(
new
Powerfield
<
double
>
(
convertedAxes
(
units
)));
result
->
setAllTo
(
0.0
);
return
result
;
}
...
...
This diff is collapsed.
Click to expand it.
Device/Coord/ICoordSystem.h
+
2
−
0
View file @
ae8e949c
...
...
@@ -60,6 +60,8 @@ public:
virtual
IAxis
*
createConvertedAxis
(
size_t
i_axis
,
Coords
units
)
const
=
0
;
std
::
vector
<
IAxis
*>
convertedAxes
(
Coords
units
)
const
;
//! Creates Powerfield array in converter units.
virtual
Powerfield
<
double
>*
createConvertedData
(
const
Powerfield
<
double
>&
data
,
Coords
units
)
const
;
...
...
This diff is collapsed.
Click to expand it.
auto/Wrap/doxygenDevice.i
+
3
−
0
View file @
ae8e949c
...
...
@@ -905,6 +905,9 @@ Returns zero-valued output data array in specified units.
%
feature
(
"
docstring
"
)
ICoordSystem
::
createConvertedAxis
"
virtual IAxis* ICoordSystem::createConvertedAxis(size_t i_axis, Coords units) const =0
"
;
%
feature
(
"
docstring
"
)
ICoordSystem
::
convertedAxes
"
std::vector< IAxis * > ICoordSystem::convertedAxes(Coords units) const
"
;
%
feature
(
"
docstring
"
)
ICoordSystem
::
createConvertedData
"
Powerfield< double > * ICoordSystem::createConvertedData(const Powerfield< double > &data, Coords units) const
Creates Powerfield array in converter units.
...
...
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