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
d3762dde
Commit
d3762dde
authored
11 years ago
by
Oliver Sander
Committed by
sander
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
remove trailing whitespace
[[Imported from SVN: r9525]]
parent
9917b919
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/gfe/rodfactory.hh
+15
-15
15 additions, 15 deletions
dune/gfe/rodfactory.hh
with
15 additions
and
15 deletions
dune/gfe/rodfactory.hh
+
15
−
15
View file @
d3762dde
...
...
@@ -18,13 +18,13 @@ template <class GridView>
class
RodFactory
{
dune_static_assert
(
GridView
::
dimensionworld
==
1
,
"RodFactory is only implemented for grids in a 1d world"
);
public:
RodFactory
(
const
GridView
&
gridView
)
:
gridView_
(
gridView
)
{}
/** \brief Make a straight, unsheared rod from two given endpoints
\param[out] rod The new rod
...
...
@@ -65,30 +65,30 @@ template <int dim>
const
RigidBodyMotion
<
double
,
spaceDim
>&
beginning
,
const
RigidBodyMotion
<
double
,
spaceDim
>&
end
)
{
static
const
int
dim
=
GridView
::
dimension
;
// de facto: 1
//////////////////////////////////////////////////////////////////////////////////////////////
// Get smallest and largest coordinate, in order to create an arc-length parametrization
//////////////////////////////////////////////////////////////////////////////////////////////
typename
GridView
::
template
Codim
<
dim
>
::
Iterator
vIt
=
gridView_
.
template
begin
<
dim
>();
typename
GridView
::
template
Codim
<
dim
>
::
Iterator
vEndIt
=
gridView_
.
template
end
<
dim
>();
double
min
=
std
::
numeric_limits
<
double
>::
max
();
double
max
=
-
std
::
numeric_limits
<
double
>::
max
();
for
(;
vIt
!=
vEndIt
;
++
vIt
)
{
min
=
std
::
min
(
min
,
vIt
->
geometry
().
corner
(
0
)[
0
]);
max
=
std
::
max
(
max
,
vIt
->
geometry
().
corner
(
0
)[
0
]);
}
////////////////////////////////////////////////////////////////////////////////////
// Interpolate according to arc-length
////////////////////////////////////////////////////////////////////////////////////
rod
.
resize
(
gridView_
.
size
(
dim
));
for
(
vIt
=
gridView_
.
template
begin
<
dim
>();
vIt
!=
vEndIt
;
++
vIt
)
{
int
idx
=
gridView_
.
indexSet
().
index
(
*
vIt
);
Dune
::
FieldVector
<
double
,
1
>
local
=
(
vIt
->
geometry
().
corner
(
0
)[
0
]
-
min
)
/
(
max
-
min
);
...
...
@@ -125,14 +125,14 @@ template <int dim>
//////////////////////////////////////////////////////////////////////////////////////////////
// Get smallest and largest coordinate, in order to create an arc-length parametrization
//////////////////////////////////////////////////////////////////////////////////////////////
typename
GridView
::
template
Codim
<
dim
>
::
Iterator
vIt
=
gridView_
.
template
begin
<
dim
>();
typename
GridView
::
template
Codim
<
dim
>
::
Iterator
vEndIt
=
gridView_
.
template
end
<
dim
>();
double
min
=
std
::
numeric_limits
<
double
>::
max
();
double
max
=
-
std
::
numeric_limits
<
double
>::
max
();
RigidBodyMotion
<
double
,
spaceDim
>
beginning
,
end
;
for
(;
vIt
!=
vEndIt
;
++
vIt
)
{
if
(
vIt
->
geometry
().
corner
(
0
)[
0
]
<
min
)
{
min
=
vIt
->
geometry
().
corner
(
0
)[
0
];
...
...
@@ -143,13 +143,13 @@ template <int dim>
end
=
rod
[
gridView_
.
indexSet
().
index
(
*
vIt
)];
}
}
////////////////////////////////////////////////////////////////////////////////////
// Interpolate according to arc-length
////////////////////////////////////////////////////////////////////////////////////
rod
.
resize
(
gridView_
.
size
(
dim
));
for
(
vIt
=
gridView_
.
template
begin
<
dim
>();
vIt
!=
vEndIt
;
++
vIt
)
{
int
idx
=
gridView_
.
indexSet
().
index
(
*
vIt
);
Dune
::
FieldVector
<
double
,
1
>
local
=
(
vIt
->
geometry
().
corner
(
0
)[
0
]
-
min
)
/
(
max
-
min
);
...
...
@@ -221,7 +221,7 @@ void create(std::vector<RigidBodyMotion<double,spaceDim> >& rod,
}
private
:
const
GridView
gridView_
;
};
...
...
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