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
1e2caab6
Commit
1e2caab6
authored
15 years ago
by
Oliver Sander
Committed by
sander@PCPOOL.MI.FU-BERLIN.DE
15 years ago
Browse files
Options
Downloads
Patches
Plain Diff
the exponential map from a given point is moved from the solver into the manifold classes
[[Imported from SVN: r4049]]
parent
2072bfb1
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/riemanniantrsolver.cc
+2
-11
2 additions, 11 deletions
src/riemanniantrsolver.cc
src/rigidbodymotion.hh
+19
-1
19 additions, 1 deletion
src/rigidbodymotion.hh
src/rotation.hh
+7
-1
7 additions, 1 deletion
src/rotation.hh
with
28 additions
and
13 deletions
src/riemanniantrsolver.cc
+
2
−
11
View file @
1e2caab6
...
...
@@ -304,17 +304,8 @@ void RiemannianTrustRegionSolver<GridType,TargetSpace>::solve()
// ////////////////////////////////////////////////////
SolutionType
newIterate
=
x_
;
for
(
int
j
=
0
;
j
<
newIterate
.
size
();
j
++
)
{
// Add translational correction
for
(
int
k
=
0
;
k
<
3
;
k
++
)
newIterate
[
j
].
r
[
k
]
+=
corr
[
j
][
k
];
// Add rotational correction
Rotation
<
3
,
double
>
qCorr
=
Rotation
<
3
,
double
>::
exp
(
corr
[
j
][
3
],
corr
[
j
][
4
],
corr
[
j
][
5
]);
newIterate
[
j
].
q
=
newIterate
[
j
].
q
.
mult
(
qCorr
);
}
for
(
int
j
=
0
;
j
<
newIterate
.
size
();
j
++
)
newIterate
[
j
]
=
TargetSpace
::
exp
(
newIterate
[
j
],
corr
[
j
]);
/** \todo Don't always recompute oldEnergy */
double
oldEnergy
=
assembler_
->
computeEnergy
(
x_
);
...
...
This diff is collapsed.
Click to expand it.
src/rigidbodymotion.hh
+
19
−
1
View file @
1e2caab6
...
...
@@ -9,7 +9,25 @@ template <int dim, class ctype=double>
struct
RigidBodyMotion
{
/** \brief Type of an infinitesimal rigid body motion */
typedef
Dune
::
FieldVector
<
ctype
,
(
dim
==
3
)
?
6
:
3
>
TangentVector
;
typedef
Dune
::
FieldVector
<
ctype
,
dim
+
Rotation
<
dim
,
ctype
>::
TangentVector
::
size
>
TangentVector
;
/** \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
)
{
RigidBodyMotion
<
dim
,
ctype
>
result
;
// Add translational correction
for
(
int
i
=
0
;
i
<
dim
;
i
++
)
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
++
)
qCorr
[
i
]
=
v
[
dim
+
i
];
result
.
q
=
Rotation
<
dim
,
ctype
>::
exp
(
p
.
q
,
qCorr
);
return
result
;
}
/** \brief Compute difference vector from a to b on the tangent space of a */
static
TangentVector
difference
(
const
RigidBodyMotion
<
dim
,
ctype
>&
a
,
...
...
This diff is collapsed.
Click to expand it.
src/rotation.hh
+
7
−
1
View file @
1e2caab6
...
...
@@ -89,7 +89,7 @@ public:
/** \brief The exponential map from \f$ \mathfrak{so}(3) \f$ to \f$ SO(3) \f$
*/
static
Quatern
ion
<
T
>
exp
(
const
Dune
::
FieldVector
<
T
,
3
>&
v
)
{
static
Rotat
ion
<
3
,
T
>
exp
(
const
Dune
::
FieldVector
<
T
,
3
>&
v
)
{
return
exp
(
v
[
0
],
v
[
1
],
v
[
2
]);
}
...
...
@@ -114,6 +114,12 @@ public:
return
q
;
}
/** \brief The exponential map from a given point $p \in SO(3)$. */
static
Rotation
<
3
,
T
>
exp
(
const
Rotation
<
3
,
T
>&
p
,
const
TangentVector
&
v
)
{
Rotation
<
3
,
T
>
corr
=
exp
(
v
);
return
p
.
mult
(
corr
);
}
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