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
46fe369d
Commit
46fe369d
authored
11 years ago
by
Oliver Sander
Committed by
sander
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Implement projectOntoNormalSpace and the Weingarten map
[[Imported from SVN: r9449]]
parent
69828eec
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
+56
-1
56 additions, 1 deletion
dune/gfe/rigidbodymotion.hh
dune/gfe/unitvector.hh
+30
-0
30 additions, 0 deletions
dune/gfe/unitvector.hh
with
86 additions
and
1 deletion
dune/gfe/rigidbodymotion.hh
+
56
−
1
View file @
46fe369d
...
@@ -245,9 +245,64 @@ public:
...
@@ -245,9 +245,64 @@ public:
/** \brief Project tangent vector of R^n onto the tangent space */
/** \brief Project tangent vector of R^n onto the tangent space */
EmbeddedTangentVector
projectOntoTangentSpace
(
const
EmbeddedTangentVector
&
v
)
const
{
EmbeddedTangentVector
projectOntoTangentSpace
(
const
EmbeddedTangentVector
&
v
)
const
{
DUNE_THROW
(
Dune
::
NotImplemented
,
"!"
);
EmbeddedTangentVector
result
;
// translation part
for
(
int
i
=
0
;
i
<
N
;
i
++
)
result
[
i
]
=
v
[
i
];
// rotation part
typename
Rotation
<
T
,
N
>::
EmbeddedTangentVector
rotV
;
for
(
int
i
=
0
;
i
<
Rotation
<
T
,
N
>::
embeddedDim
;
i
++
)
rotV
[
i
]
=
v
[
i
+
N
];
rotV
=
q
.
projectOntoTangentSpace
(
rotV
);
for
(
int
i
=
0
;
i
<
Rotation
<
T
,
N
>::
embeddedDim
;
i
++
)
result
[
i
+
N
]
=
rotV
[
i
];
return
result
;
}
}
/** \brief Project tangent vector of R^n onto the normal space space */
EmbeddedTangentVector
projectOntoNormalSpace
(
const
EmbeddedTangentVector
&
v
)
const
{
EmbeddedTangentVector
result
;
// translation part
for
(
int
i
=
0
;
i
<
N
;
i
++
)
result
[
i
]
=
v
[
i
];
// rotation part
T
sp
=
0
;
for
(
int
i
=
0
;
i
<
Rotation
<
T
,
N
>::
embeddedDim
;
i
++
)
sp
+=
v
[
i
+
N
]
*
q
[
i
];
for
(
int
i
=
0
;
i
<
Rotation
<
T
,
N
>::
embeddedDim
;
i
++
)
result
[
i
+
N
]
=
sp
*
q
[
i
];
return
result
;
}
/** \brief The Weingarten map */
EmbeddedTangentVector
weingarten
(
const
EmbeddedTangentVector
&
z
,
const
EmbeddedTangentVector
&
v
)
const
{
EmbeddedTangentVector
result
;
// translation part: nothing, the space is flat
for
(
int
i
=
0
;
i
<
N
;
i
++
)
result
[
i
]
=
0
;
// rotation part
T
sp
=
0
;
for
(
int
i
=
0
;
i
<
Rotation
<
T
,
N
>::
embeddedDim
;
i
++
)
sp
+=
v
[
i
+
N
]
*
q
[
i
];
for
(
int
i
=
0
;
i
<
Rotation
<
T
,
N
>::
embeddedDim
;
i
++
)
result
[
i
+
N
]
=
-
sp
*
z
[
i
+
N
];
return
result
;
}
/** \brief Compute an orthonormal basis of the tangent space of SE(3).
/** \brief Compute an orthonormal basis of the tangent space of SE(3).
...
...
This diff is collapsed.
Click to expand it.
dune/gfe/unitvector.hh
+
30
−
0
View file @
46fe369d
...
@@ -335,6 +335,36 @@ public:
...
@@ -335,6 +335,36 @@ public:
return
result
;
return
result
;
}
}
/** \brief Project tangent vector of R^n onto the normal space space */
EmbeddedTangentVector
projectOntoNormalSpace
(
const
EmbeddedTangentVector
&
v
)
const
{
EmbeddedTangentVector
result
;
T
sp
=
0
;
for
(
int
i
=
0
;
i
<
N
;
i
++
)
sp
+=
v
[
i
]
*
data_
[
i
];
for
(
int
i
=
0
;
i
<
N
;
i
++
)
result
[
i
]
=
sp
*
data_
[
i
];
return
result
;
}
/** \brief The Weingarten map */
EmbeddedTangentVector
weingarten
(
const
EmbeddedTangentVector
&
z
,
const
EmbeddedTangentVector
&
v
)
const
{
EmbeddedTangentVector
result
;
T
sp
=
0
;
for
(
int
i
=
0
;
i
<
N
;
i
++
)
sp
+=
v
[
i
]
*
data_
[
i
];
for
(
int
i
=
0
;
i
<
N
;
i
++
)
result
[
i
]
=
-
sp
*
z
[
i
];
return
result
;
}
/** \brief The global coordinates, if you really want them */
/** \brief The global coordinates, if you really want them */
const
CoordinateType
&
globalCoordinates
()
const
{
const
CoordinateType
&
globalCoordinates
()
const
{
return
data_
;
return
data_
;
...
...
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