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
123b57ed
Commit
123b57ed
authored
13 years ago
by
Youett, Jonathan
Committed by
akbib@FU-BERLIN.DE
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
adapt to changes in template order
[[Imported from SVN: r8156]]
parent
ac07a843
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/rodfactory.hh
+13
-13
13 additions, 13 deletions
dune/gfe/rodfactory.hh
dune/gfe/rodwriter.hh
+3
-3
3 additions, 3 deletions
dune/gfe/rodwriter.hh
with
16 additions
and
16 deletions
dune/gfe/rodfactory.hh
+
13
−
13
View file @
123b57ed
...
...
@@ -28,11 +28,11 @@ public:
\param[in] n The number of vertices
*/
template
<
int
dim
>
void
create
(
std
::
vector
<
RigidBodyMotion
<
dim
>
>&
rod
,
void
create
(
std
::
vector
<
RigidBodyMotion
<
double
,
dim
>
>&
rod
,
const
Dune
::
FieldVector
<
double
,
3
>&
beginning
,
const
Dune
::
FieldVector
<
double
,
3
>&
end
)
{
// Compute the correct orientation
Rotation
<
3
,
double
>
orientation
=
Rotation
<
3
,
double
>::
identity
();
Rotation
<
double
,
dim
>
orientation
=
Rotation
<
double
,
dim
>::
identity
();
Dune
::
FieldVector
<
double
,
3
>
zAxis
(
0
);
zAxis
[
2
]
=
1
;
...
...
@@ -46,10 +46,10 @@ template <int dim>
double
angle
=
std
::
acos
(
zAxis
*
d3
);
if
(
angle
!=
0
)
orientation
=
Rotation
<
3
,
double
>
(
axis
,
angle
);
orientation
=
Rotation
<
double
,
3
>
(
axis
,
angle
);
// Set the values
create
(
rod
,
RigidBodyMotion
<
dim
>
(
beginning
,
orientation
),
RigidBodyMotion
<
dim
>
(
end
,
orientation
));
create
(
rod
,
RigidBodyMotion
<
double
,
dim
>
(
beginning
,
orientation
),
RigidBodyMotion
<
double
,
dim
>
(
end
,
orientation
));
}
...
...
@@ -58,9 +58,9 @@ template <int dim>
\param[out] rod The new rod
*/
template
<
int
spaceDim
>
void
create
(
std
::
vector
<
RigidBodyMotion
<
spaceDim
>
>&
rod
,
const
RigidBodyMotion
<
3
,
double
>&
beginning
,
const
RigidBodyMotion
<
3
,
double
>&
end
)
void
create
(
std
::
vector
<
RigidBodyMotion
<
double
,
spaceDim
>
>&
rod
,
const
RigidBodyMotion
<
double
,
spaceDim
>&
beginning
,
const
RigidBodyMotion
<
double
,
spaceDim
>&
end
)
{
static
const
int
dim
=
GridView
::
dimension
;
// de facto: 1
...
...
@@ -92,7 +92,7 @@ template <int dim>
for
(
int
i
=
0
;
i
<
3
;
i
++
)
rod
[
idx
].
r
[
i
]
=
(
1
-
local
)
*
beginning
.
r
[
i
]
+
local
*
end
.
r
[
i
];
rod
[
idx
].
q
=
Rotation
<
3
,
double
>::
interpolate
(
beginning
.
q
,
end
.
q
,
local
);
rod
[
idx
].
q
=
Rotation
<
double
,
3
>::
interpolate
(
beginning
.
q
,
end
.
q
,
local
);
}
}
...
...
@@ -101,8 +101,8 @@ template <int dim>
\param[out] rod The new rod
*/
template
<
int
spaceDim
>
void
create
(
std
::
vector
<
RigidBodyMotion
<
spaceDim
>
>&
rod
,
const
RigidBodyMotion
<
spaceDim
,
double
>&
value
)
void
create
(
std
::
vector
<
RigidBodyMotion
<
double
,
spaceDim
>
>&
rod
,
const
RigidBodyMotion
<
double
,
spaceDim
>&
value
)
{
rod
.
resize
(
gridView_
.
size
(
1
));
std
::
fill
(
rod
.
begin
(),
rod
.
end
(),
value
);
...
...
@@ -114,7 +114,7 @@ template <int dim>
\param[in,out] rod The new rod
*/
template
<
int
spaceDim
>
void
create
(
std
::
vector
<
RigidBodyMotion
<
spaceDim
>
>&
rod
)
void
create
(
std
::
vector
<
RigidBodyMotion
<
double
,
spaceDim
>
>&
rod
)
{
static
const
int
dim
=
GridView
::
dimension
;
// de facto: 1
assert
(
gridView_
.
size
(
dim
)
==
rod
.
size
());
...
...
@@ -128,7 +128,7 @@ template <int dim>
double
min
=
std
::
numeric_limits
<
double
>::
max
();
double
max
=
-
std
::
numeric_limits
<
double
>::
max
();
RigidBodyMotion
<
spaceDim
>
beginning
,
end
;
RigidBodyMotion
<
double
,
spaceDim
>
beginning
,
end
;
for
(;
vIt
!=
vEndIt
;
++
vIt
)
{
if
(
vIt
->
geometry
().
corner
(
0
)[
0
]
<
min
)
{
...
...
@@ -153,7 +153,7 @@ template <int dim>
for
(
int
i
=
0
;
i
<
3
;
i
++
)
rod
[
idx
].
r
[
i
]
=
(
1
-
local
)
*
beginning
.
r
[
i
]
+
local
*
end
.
r
[
i
];
rod
[
idx
].
q
=
Rotation
<
3
,
double
>::
interpolate
(
beginning
.
q
,
end
.
q
,
local
);
rod
[
idx
].
q
=
Rotation
<
double
,
3
>::
interpolate
(
beginning
.
q
,
end
.
q
,
local
);
}
}
...
...
This diff is collapsed.
Click to expand it.
dune/gfe/rodwriter.hh
+
3
−
3
View file @
123b57ed
...
...
@@ -16,7 +16,7 @@ class RodWriter
{
public:
static
void
writeBinary
(
const
std
::
vector
<
RigidBodyMotion
<
3
>
>&
rod
,
static
void
writeBinary
(
const
std
::
vector
<
RigidBodyMotion
<
double
,
3
>
>&
rod
,
const
std
::
string
&
filename
)
{
FILE
*
fpRod
=
fopen
(
filename
.
c_str
(),
"wb"
);
...
...
@@ -41,7 +41,7 @@ public:
/** \brief Write a planar rod
*/
void
writeRod
(
const
std
::
vector
<
RigidBodyMotion
<
2
>
>&
rod
,
void
writeRod
(
const
std
::
vector
<
RigidBodyMotion
<
double
,
2
>
>&
rod
,
const
std
::
string
&
filename
)
{
int
nLines
=
rod
.
size
()
+
1
+
3
*
rod
.
size
();
...
...
@@ -124,7 +124,7 @@ void writeRod(const std::vector<RigidBodyMotion<2> >& rod,
/** \brief Write a spatial rod
*/
void
writeRod
(
const
std
::
vector
<
RigidBodyMotion
<
3
>
>&
rod
,
void
writeRod
(
const
std
::
vector
<
RigidBodyMotion
<
double
,
3
>
>&
rod
,
const
std
::
string
&
filename
,
double
radius
=
1.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