Skip to content

Commit

Permalink
Tetgen: expose edgeadjtetlist (Issue #20)
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Aug 7, 2016
1 parent 5e41124 commit ea4857a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 3 additions & 0 deletions doc/tri-tet.rst
Expand Up @@ -282,6 +282,9 @@ Some common notions
.. attribute:: face_markers
.. attribute:: edges
.. attribute:: edge_markers
.. attribute:: edge_adjacent_elements

.. versionadded:: 2016.1
.. attribute:: number_of_point_attributes
.. attribute:: number_of_element_attributes

Expand Down
11 changes: 6 additions & 5 deletions meshpy/gmsh_reader.py
@@ -1,9 +1,6 @@
"""Reader for the GMSH file format."""

from __future__ import division
from __future__ import absolute_import
from six.moves import range
from functools import reduce
from __future__ import division, absolute_import

__copyright__ = "Copyright (C) 2009 Xueyu Zhu, Andreas Kloeckner"

Expand All @@ -27,6 +24,9 @@
THE SOFTWARE.
"""

from six.moves import range
from functools import reduce

import numpy as np
#import numpy.linalg as la
from pytools import memoize_method, Record
Expand Down Expand Up @@ -72,8 +72,9 @@
Reader
------
.. autoclass:: LiteralSource
.. autoclass:: ScriptSource
.. autoclass:: FileSource
.. autoclass:: ScriptWithFilesSource
.. autofunction:: read_gmsh
.. autofunction:: generate_gmsh
Expand Down
5 changes: 4 additions & 1 deletion src/cpp/wrap_tetgen.cpp
Expand Up @@ -49,6 +49,7 @@ namespace

tForeignArray<int> Edges;
tForeignArray<int> EdgeMarkers;
tForeignArray<int> EdgeAdjTetList;

public:
tMeshInfo()
Expand Down Expand Up @@ -78,7 +79,8 @@ namespace
FaceMarkers(trifacemarkerlist, numberoftrifaces, 1, &Faces),

Edges(edgelist, numberofedges, 2),
EdgeMarkers(edgemarkerlist, numberofedges, 1, &Edges)
EdgeMarkers(edgemarkerlist, numberofedges, 1, &Edges),
EdgeAdjTetList(edgeadjtetlist, numberofedges, 1, &Edges)
{
Elements.fixUnit(numberofcorners);
}
Expand Down Expand Up @@ -310,6 +312,7 @@ BOOST_PYTHON_MODULE(_tetgen)

.def_readonly("edges", &cl::Edges)
.def_readonly("edge_markers", &cl::EdgeMarkers)
.def_readonly("edge_adjacent_elements", &cl::EdgeAdjTetList)

.add_property("number_of_point_attributes",
&cl::numberOfPointAttributes,
Expand Down

0 comments on commit ea4857a

Please sign in to comment.