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
6c6f2d6b
Commit
6c6f2d6b
authored
14 years ago
by
Oliver Sander
Committed by
sander@FU-BERLIN.DE
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add method 'exp' that takes an EmbeddedTangentVector
[[Imported from SVN: r6708]]
parent
cd44250b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/gfe/rigidbodymotion.hh
+13
-4
13 additions, 4 deletions
dune/gfe/rigidbodymotion.hh
dune/gfe/rotation.hh
+5
-0
5 additions, 0 deletions
dune/gfe/rotation.hh
with
18 additions
and
4 deletions
dune/gfe/rigidbodymotion.hh
+
13
−
4
View file @
6c6f2d6b
...
...
@@ -20,8 +20,14 @@ struct RigidBodyMotion
/** \brief The type used for coordinates */
typedef
T
ctype
;
/** \brief The exponential map from a given point $p \in SE(d)$. */
static
RigidBodyMotion
<
dim
,
ctype
>
exp
(
const
RigidBodyMotion
<
dim
,
ctype
>&
p
,
const
TangentVector
&
v
)
{
/** \brief The exponential map from a given point $p \in SE(d)$.
Why the template parameter? Well, it should work with both TangentVector and EmbeddedTangentVector.
In general these differ and we could just have two exp methods. However in 2d they do _not_ differ,
and then the compiler complains about having two methods with the same signature.
*/
template
<
class
TVector
>
static
RigidBodyMotion
<
dim
,
ctype
>
exp
(
const
RigidBodyMotion
<
dim
,
ctype
>&
p
,
const
TVector
&
v
)
{
RigidBodyMotion
<
dim
,
ctype
>
result
;
...
...
@@ -30,8 +36,11 @@ struct RigidBodyMotion
result
.
r
[
i
]
=
p
.
r
[
i
]
+
v
[
i
];
// Add rotational correction
typename
Rotation
<
dim
,
ctype
>::
TangentVector
qCorr
;
for
(
int
i
=
0
;
i
<
Rotation
<
dim
,
ctype
>::
TangentVector
::
size
;
i
++
)
typedef
typename
Dune
::
SelectType
<
Dune
::
is_same
<
TVector
,
TangentVector
>::
value
,
typename
Rotation
<
dim
,
ctype
>::
TangentVector
,
typename
Rotation
<
dim
,
ctype
>::
EmbeddedTangentVector
>::
Type
RotationTangentVector
;
RotationTangentVector
qCorr
;
for
(
int
i
=
0
;
i
<
RotationTangentVector
::
size
;
i
++
)
qCorr
[
i
]
=
v
[
dim
+
i
];
result
.
q
=
Rotation
<
dim
,
ctype
>::
exp
(
p
.
q
,
qCorr
);
...
...
This diff is collapsed.
Click to expand it.
dune/gfe/rotation.hh
+
5
−
0
View file @
6c6f2d6b
...
...
@@ -225,6 +225,11 @@ public:
return
p
.
mult
(
corr
);
}
/** \brief The exponential map from a given point $p \in SO(3)$. */
static
Rotation
<
3
,
T
>
exp
(
const
Rotation
<
3
,
T
>&
p
,
const
EmbeddedTangentVector
&
v
)
{
DUNE_THROW
(
Dune
::
NotImplemented
,
"exp... EmbeddedTangentVector"
);
}
static
Dune
::
FieldMatrix
<
T
,
4
,
3
>
Dexp
(
const
Dune
::
FieldVector
<
T
,
3
>&
v
)
{
Dune
::
FieldMatrix
<
T
,
4
,
3
>
result
(
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