Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gfe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sander, Oliver
dune-gfe
Commits
70208025
Commit
70208025
authored
4 years ago
by
Lisa Julia Nebel
Browse files
Options
Downloads
Patches
Plain Diff
Add random access operator and -= operator to RealTuple
parent
a9104ef4
No related branches found
No related tags found
1 merge request
!52
Enhancements
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/gfe/realtuple.hh
+16
-0
16 additions, 0 deletions
dune/gfe/realtuple.hh
with
16 additions
and
0 deletions
dune/gfe/realtuple.hh
+
16
−
0
View file @
70208025
...
@@ -66,6 +66,17 @@ public:
...
@@ -66,6 +66,17 @@ public:
return
*
this
;
return
*
this
;
}
}
RealTuple
&
operator
-=
(
const
Dune
::
FieldVector
<
T
,
N
>&
other
)
{
data_
-=
other
;
return
*
this
;
}
template
<
class
T2
>
RealTuple
&
operator
-=
(
const
RealTuple
<
T2
,
N
>&
other
)
{
data_
-=
other
.
data_
;
return
*
this
;
}
/** \brief Assigment from RealTuple with different type -- used for automatic differentiation with ADOL-C */
/** \brief Assigment from RealTuple with different type -- used for automatic differentiation with ADOL-C */
template
<
class
T2
>
template
<
class
T2
>
RealTuple
&
operator
<<=
(
const
RealTuple
<
T2
,
N
>&
other
)
{
RealTuple
&
operator
<<=
(
const
RealTuple
<
T2
,
N
>&
other
)
{
...
@@ -74,6 +85,11 @@ public:
...
@@ -74,6 +85,11 @@ public:
return
*
this
;
return
*
this
;
}
}
/** \brief Const random-access operator*/
T
operator
[]
(
const
size_t
indexVariable
)
const
{
return
data_
[
indexVariable
];
}
/** \brief Rebind the RealTuple to another coordinate type */
/** \brief Rebind the RealTuple to another coordinate type */
template
<
class
U
>
template
<
class
U
>
struct
rebind
struct
rebind
...
...
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