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
bb611a1d
Commit
bb611a1d
authored
13 years ago
by
Oliver Sander
Committed by
sander@FU-BERLIN.DE
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
adapt to the new template parameters of the Rotation/RigidBodyMotion classes
[[Imported from SVN: r8206]]
parent
bb5c4885
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
rod3d.cc
+5
-5
5 additions, 5 deletions
rod3d.cc
rodobstacle.cc
+4
-4
4 additions, 4 deletions
rodobstacle.cc
with
9 additions
and
9 deletions
rod3d.cc
+
5
−
5
View file @
bb611a1d
...
...
@@ -19,7 +19,7 @@
#include
<dune/gfe/rodassembler.hh>
#include
<dune/gfe/riemanniantrsolver.hh>
typedef
RigidBodyMotion
<
3
>
TargetSpace
;
typedef
RigidBodyMotion
<
double
,
3
>
TargetSpace
;
const
int
blocksize
=
TargetSpace
::
TangentVector
::
dimension
;
...
...
@@ -28,7 +28,7 @@ using std::string;
int
main
(
int
argc
,
char
*
argv
[])
try
{
typedef
std
::
vector
<
RigidBodyMotion
<
3
>
>
SolutionType
;
typedef
std
::
vector
<
RigidBodyMotion
<
double
,
3
>
>
SolutionType
;
// parse data file
ParameterTree
parameterSet
;
...
...
@@ -78,7 +78,7 @@ int main (int argc, char *argv[]) try
x
[
i
].
r
[
0
]
=
0
;
x
[
i
].
r
[
1
]
=
0
;
x
[
i
].
r
[
2
]
=
double
(
i
)
/
(
x
.
size
()
-
1
);
x
[
i
].
q
=
Rotation
<
3
,
double
>::
identity
();
x
[
i
].
q
=
Rotation
<
double
,
3
>::
identity
();
}
// /////////////////////////////////////////
...
...
@@ -94,7 +94,7 @@ int main (int argc, char *argv[]) try
axis
[
2
]
=
parameterSet
.
get
<
double
>
(
"dirichletAxisZ"
);
double
angle
=
parameterSet
.
get
<
double
>
(
"dirichletAngle"
);
x
.
back
().
q
=
Rotation
<
3
,
double
>
(
axis
,
M_PI
*
angle
/
180
);
x
.
back
().
q
=
Rotation
<
double
,
3
>
(
axis
,
M_PI
*
angle
/
180
);
// backup for error measurement later
SolutionType
initialIterate
=
x
;
...
...
@@ -124,7 +124,7 @@ int main (int argc, char *argv[]) try
RodAssembler
<
GridType
::
LeafGridView
,
3
>
rodAssembler
(
grid
.
leafView
(),
&
localStiffness
);
RiemannianTrustRegionSolver
<
GridType
,
RigidBodyMotion
<
3
>
>
rodSolver
;
RiemannianTrustRegionSolver
<
GridType
,
RigidBodyMotion
<
double
,
3
>
>
rodSolver
;
#if 1
rodSolver
.
setup
(
grid
,
&
rodAssembler
,
...
...
This diff is collapsed.
Click to expand it.
rodobstacle.cc
+
4
−
4
View file @
bb611a1d
...
...
@@ -71,7 +71,7 @@ int main (int argc, char *argv[]) try
// Some types that I need
typedef
BCRSMatrix
<
FieldMatrix
<
double
,
blocksize
,
blocksize
>
>
MatrixType
;
typedef
BlockVector
<
FieldVector
<
double
,
blocksize
>
>
CorrectionType
;
typedef
std
::
vector
<
RigidBodyMotion
<
2
>
>
SolutionType
;
typedef
std
::
vector
<
RigidBodyMotion
<
double
,
2
>
>
SolutionType
;
// parse data file
ParameterTree
parameterSet
;
...
...
@@ -155,7 +155,7 @@ int main (int argc, char *argv[]) try
for
(
int
i
=
0
;
i
<
x
.
size
();
i
++
)
{
x
[
i
].
r
[
0
]
=
0
;
x
[
i
].
r
[
1
]
=
i
;
//double(i)/(x.size()-1);
x
[
i
].
q
=
Rotation
<
2
,
double
>::
identity
();
x
[
i
].
q
=
Rotation
<
double
,
2
>::
identity
();
}
x
.
back
().
r
[
1
]
+=
1
;
...
...
@@ -293,7 +293,7 @@ int main (int argc, char *argv[]) try
SolutionType
newIterate
=
x
;
for
(
int
j
=
0
;
j
<
newIterate
.
size
();
j
++
)
newIterate
[
j
]
=
RigidBodyMotion
<
2
>::
exp
(
newIterate
[
j
],
corr
[
j
]);
newIterate
[
j
]
=
RigidBodyMotion
<
double
,
2
>::
exp
(
newIterate
[
j
],
corr
[
j
]);
/** \todo Don't always recompute oldEnergy */
double
oldEnergy
=
rodAssembler
.
computeEnergy
(
x
);
...
...
@@ -304,7 +304,7 @@ int main (int argc, char *argv[]) try
// Add correction to the current solution
for
(
int
j
=
0
;
j
<
x
.
size
();
j
++
)
x
[
j
]
=
RigidBodyMotion
<
2
>::
exp
(
x
[
j
],
corr
[
j
]);
x
[
j
]
=
RigidBodyMotion
<
double
,
2
>::
exp
(
x
[
j
],
corr
[
j
]);
// Subtract correction from the current obstacle
for
(
int
k
=
0
;
k
<
corr
.
size
();
k
++
)
...
...
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