Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Nils-Arne Dreier
dune-python
Commits
1d040c82
Commit
1d040c82
authored
Jul 10, 2018
by
Andreas Dedner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix an issue with using a reference element for a polygon
parent
a1d6cf87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
dune/python/grid/numpy.hh
dune/python/grid/numpy.hh
+5
-2
No files found.
dune/python/grid/numpy.hh
View file @
1d040c82
...
...
@@ -235,8 +235,11 @@ namespace Dune
lf
.
bind
(
element
);
coords
[
corners
].
first
.
push_back
(
poly
);
auto
ref
=
ReferenceElements
<
typename
GridView
::
ctype
,
dimGrid
>::
general
(
element
.
type
()
);
coords
[
corners
].
second
.
push_back
(
lf
(
ref
.
position
(
0
,
0
)
)
);
// for polygons we can't use a reference element but one could use
// the following for elements with type not none:
// auto ref = ReferenceElements< typename GridView::ctype, dimGrid >::general( element.type() );
// coords[ corners ].second.push_back( lf( ref.position(0,0) ) );
coords
[
corners
].
second
.
push_back
(
lf
(
geometry
.
local
(
geometry
.
center
()
)
)
);
lf
.
unbind
();
}
...
...
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