Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Praetorius, Simon
dune-dec
Commits
120d8512
Commit
120d8512
authored
Jun 04, 2017
by
Praetorius, Simon
Browse files
corrected some smaller errors
parent
ece06006
Changes
4
Hide whitespace changes
Inline
Side-by-side
dune/dec/halfedgegrid/GeometrySynchronization.hpp
View file @
120d8512
...
...
@@ -21,7 +21,7 @@ namespace Dec
,
cache_
(
cache
)
{}
bool
contains
(
int
dim
,
int
codim
)
const
bool
contains
(
int
/*
dim
*/
,
int
codim
)
const
{
return
codim
>
0
;
}
...
...
dune/dec/operators/Identity.hpp
View file @
120d8512
...
...
@@ -31,7 +31,7 @@ namespace Dec
protected:
// Implementation of operator methods:
template
<
class
Inserter
,
class
Entity
,
class
RowMapper
,
class
ColMapper
>
template
<
class
Inserter
,
class
Entity
>
void
assembleRow_impl
(
Inserter
&
A
,
Entity
const
&
e
,
float_type
factor
)
const
{
std
::
size_t
i
=
e
.
index
();
...
...
dune/dec/simplegrid/SimpleGrid.hpp
View file @
120d8512
...
...
@@ -141,6 +141,11 @@ namespace Dec
return
indexSet_
;
}
LeafIndexSet
const
&
indexSet
()
const
{
return
indexSet_
;
}
SimpleGrid
&
leafGridView
()
{
return
*
this
;
}
SimpleGrid
const
&
leafGridView
()
const
{
return
*
this
;
}
...
...
@@ -180,6 +185,14 @@ namespace Dec
/// Returns a vector of element connectivity
Elements
const
&
elements
()
const
{
return
elements_
;
}
/// Communicate data on this view
template
<
class
DataHandleImp
,
class
T
>
void
communicate
(
Dune
::
CommDataHandleIF
<
DataHandleImp
,
T
>&
/*data*/
,
Dune
::
InterfaceType
/*iftype*/
,
Dune
::
CommunicationDirection
/*dir*/
)
const
{}
auto
const
&
comm
()
const
{
return
comm_
;
}
private:
// Implementation details:
...
...
@@ -215,6 +228,8 @@ namespace Dec
Vertices
vertices_
;
LeafIndexSet
indexSet_
;
Dune
::
CollectiveCommunication
<
Dune
::
No_Comm
>
comm_
;
};
}
// end namespace Dec
test/test_ranges.cc
View file @
120d8512
...
...
@@ -28,7 +28,7 @@ namespace Dec { namespace test {
{
auto
vec
=
ranges
::
irange
(
5
);
DEC_TEST_APPROX
(
(
ranges
::
make_range
(
vec
.
begin
(),
vec
.
end
(),
[](
auto
&
it
)
{
++
it
;
},
[](
auto
it
)
{
return
*
it
;
})),
vec
);
DEC_TEST_APPROX
(
(
ranges
::
make_range
(
vec
.
begin
(),
vec
.
end
(),
[](
auto
&
it
,
auto
const
/*end*/
)
{
++
it
;
},
[](
auto
it
)
{
return
*
it
;
})),
vec
);
DEC_TEST_APPROX
(
(
ranges
::
make_cyclic_range
(
0
,
0
,
[](
auto
&
it
)
{
++
it
;
it
=
it
%
5
;
},
[](
auto
it
)
{
return
it
;
})),
vec
);
}
...
...
@@ -44,7 +44,7 @@ namespace Dec { namespace test {
DEC_TEST_APPROX
(
(
Dec
::
local_view
(
vec
,
idx
)),
vec
);
}
void
functor
()
{
DEC_TEST_APPROX
(
make_range
([](
int
i
)
{
return
2
*
i
;
},
5
),
(
std
::
vector
<
int
>
{
0
,
2
,
4
,
6
,
8
}));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment