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
iwr
dune-vtk
Commits
b41890c4
Commit
b41890c4
authored
Dec 03, 2018
by
Praetorius, Simon
Browse files
use mcmg mapper instead of index set when traversing elements
parent
0d5e1c63
Changes
1
Hide whitespace changes
Inline
Side-by-side
dune/vtk/datacollectorinterface.impl.hh
View file @
b41890c4
...
...
@@ -2,6 +2,7 @@
#include
<dune/geometry/referenceelements.hh>
#include
<dune/grid/common/gridenums.hh>
#include
<dune/grid/common/mcmgmapper.hh>
namespace
Dune
{
...
...
@@ -11,12 +12,12 @@ std::vector<T> DataCollectorInterface<GridView, Derived>
::
cellDataImpl
(
VtkFunction
const
&
fct
)
const
{
std
::
vector
<
T
>
data
(
gridView_
.
size
(
0
)
*
fct
.
ncomps
());
auto
const
&
indexSet
=
gridView_
.
indexSe
t
();
MultipleCodimMultipleGeomTypeMapper
<
GridView
>
mapper
(
gridView_
,
mcmgElementLayou
t
()
)
;
auto
localFct
=
localFunction
(
fct
);
for
(
auto
const
&
e
:
elements
(
gridView_
,
Partitions
::
all
))
{
localFct
.
bind
(
e
);
auto
refElem
=
referenceElement
<
T
,
GridView
::
dimension
>
(
e
.
type
());
std
::
size_t
idx
=
fct
.
ncomps
()
*
indexSet
.
index
(
e
);
std
::
size_t
idx
=
fct
.
ncomps
()
*
mapper
.
index
(
e
);
for
(
int
comp
=
0
;
comp
<
fct
.
ncomps
();
++
comp
)
data
[
idx
+
comp
]
=
T
(
localFct
.
evaluate
(
comp
,
refElem
.
position
(
0
,
0
)));
localFct
.
unbind
();
...
...
Write
Preview
Supports
Markdown
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