"Collett, Hugh E" <h.collett19(a)imperial.ac.uk> writes:
> Sorry to bother you again, I don't know if there is a better platform
> to ask you about the mesh generator, but thank you very much in
> advance if you could help.
Please keep the list cc'd for archival, which requires you to be subscribed.
> I did delaunay 3d triangulation in paraview to give me facets and
> input these facets into your code, but I'm getting the kernel dying in
> jupyter. If you could take a look at my code below please I would be
> very grateful!
Running this code gives:
Error: Invalid PLC.
Two segments (6, 13) and (10, 11) intersect.
free(): double free detected in tcache 2
 139762 abort (core dumped) PYOPENCL_TEST=port python x.py
This suggests your input is invalid.
You also don't need Vtk to compute the Delaunay triangulation. TetGen
(via meshpy) can do thsi:
> Yes, you're right it seems.
> Is there any way to keep the initial surface mesh? I assumed tetgen wouldn't
> change the surface and would just fill the volume based off of the surface.
> The volume constraint I was hoping would allow me to create consistent sized
> tetrahedrals by calculating the tetrahedral area using the average face edge
> lengths of the surface.
No, not as far as I'm aware. In Triangle (the 2D mesher in meshpy), you
can allow or forbid boundary Steiner points, but I'm not sure that
tetgen allows the same. TetGen's documentation is really the right place
to look here; or maybe you might be able to ask Hang Si.
Also please take care to keep the list cc'd on your replies.
From: steersteer(a)gmail.com <steersteer(a)gmail.com>
Sent: 17 April 2020 16:30
I'm having a little problem with MeshPy's implementation of TetGen.
I have a mesh which I remeshed to a more coarse mesh.
I then load this into a module named trimesh and I extract the vertices and
I then use MeshPy for tetrahedralizing:
tetmesh_info = MeshInfo()
options = mp.Options('pq')
tetmesh = mp.build(tetmesh_info, options, max_volume=volume_constraint )
The resultant mesh's surface is much finer than the inputted mesh, in fact
it looks to have the same coarseness as the mesh before it was remeshed
Is this caused by TetGen do you think? Is there a setting I can change for
Or is it more likely that the verts and faces are somehow retained by the
remesh operation in the STL file and TetGen tetrahedralizing my original
Thanks for any insight you can give me,
I'm trying to use point attributes as a z value to create a 2.5D surface
mesh. I'm a little confused about how to use point_attributes. I have
TypeError: 'meshpy._internals.RealArray' object is not callable
info.point_attributes = p_attrs
AttributeError: can't set attribute
I've also tried to treat it like regions
RuntimeError: sizes of slave arrays cannot be changed
for i, p in info.points:
info.point_attributes[i] = 0 # or whatever number
IndexError: index out of bounds
I feel like I'm missing something pretty simple. If anyone knows how to do
this in meshpy please let me know. Any help would be greatly appreciated!
Dear MeshPy community,
I’m currently using the subdivide_facets function to refine meshes at the facets between regions in 2D. I’m curious if there’s an equivalent function, or a procedure, to refine meshes at facets between 3D regions? My current idea is to:
* Refine the 3D polygonal facets between regions. For each facet:
* Project the facet into 2D
* Build a mesh of the facet with Triangle
* Project the mesh back into 3D
* Replace the polygonal facets with the refined meshes
* Build with TetGen
There might be issues with Steiner points that require extra steps, but this is the general idea. Any feedback or suggestions would be greatly appreciated.
Georgia Institute of Technology
Giuseppe Romano <romanog(a)mit.edu> writes:
> Hi Andreas,
> This is Giuseppe, a MIT Research Scientist. I am working on nanoscale heat
> transport. I recently released OpenBTE (www.openbte.org).
Please send requests like this to the appropriate mailing list (cc'd).
> I just run into MeshPy: What a nice project!
> I have three questions, two of them being related to MeshPy.
> 1) I am having issues installing it (pip install meshpy):
> src/cpp/wrapper.cpp:1:10: fatal error: pybind11/pybind11.h: No such file
> or directory
> #include <pybind11/pybind11.h>
> compilation terminated.
> error: command 'gcc' failed with exit status 1
> Command "/data/anaconda3/bin/python -u -c "import setuptools,
> 'open', open)(__file__);code=f.read().replace('\r\n',
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
> --single-version-externally-managed --compile --user --prefix=" failed with
> error code 1 in /tmp/pip-install-f0i_uh6c/MeshPy/
Run 'pip install pybind11' before installing meshpy. (I'm trying to make
it so that's not required, but no luck so far.)
> 2) I am currently using gmsh, where I am able to set periodic nodes. Is it
> possible to do it with MeshPy.
Tetgen at one point had support for periodicity, but it was
removed. Triangle never did support periodicity well.
> 3) Any tips you can share with me on the job search? I am heavily focused
> on computing (not machine learning) and it seems hard to land a Faculty
That's tough to answer competently in this short (and public) format,
and there's plenty of good advice already out there. Plus, the market is
heavily segmented. My read is that the market for computational
engineers (you, I'm guessing) and numerics people (me) don't quite work
the same, so I'm not sure if anything I say might be useful.
Freecad OL <freecadol(a)gmail.com> writes:
> Hi Andreas,
> I try to install MeshPy 2018.2 under Ubuntu 18.04 as required by an another
> I think I have followed the steps from README file but i have an error as
> you can see in attachment.
> Do you have an advice, to solve this error that seem from wrap_trangle.cpp
pip install pybind11
should fix your problem. The recent commit:
adds code to catch this problem with a more intelligible error message.
"Hart, Kenneth A" <khart(a)gatech.edu> writes:
> I get the same error and I think this has to do with my setup.py hack
> to get MeshPy to install on the mac. I added a line that forces the
> Mac to use a C++ compiler instead of a C compiler because the compile
> line has a combination of C compiler and C++ flags. I figured
> switching the compiler to C++ would solve the problem. Now it installs
> but throws that realarray error.
> I want to try removing the C++ flags for C-compiled code, but I'm not
> experienced enough with distutils to attempt that. Perhaps Andreas
> could take a look?
Try current master.
Thanks for your swift reply. It wasn’t easy to install MeshPy in the first place. I figured the C++ flags also called for clang++ instead, so I ended up doing something similar to your hack, but on the command line:
$ CC=clang++ CPPFLAGS=-I/Users/aaragon/Local/pybind11/include python setup.py install
also because pybind’s installation didn’t put the header files in known header file paths.
> On Oct 10, 2018, at 18:49, Hart, Kenneth A <khart(a)gatech.edu> wrote:
> Hi Alejandro,
> I get the same error and I think this has to do with my setup.py hack to get MeshPy to install on the mac. I added a line that forces the Mac to use a C++ compiler instead of a C compiler because the compile line has a combination of C compiler and C++ flags. I figured switching the compiler to C++ would solve the problem. Now it installs but throws that realarray error.
> I want to try removing the C++ flags for C-compiled code, but I'm not experienced enough with distutils to attempt that. Perhaps Andreas could take a look?
> From: MeshPy <meshpy-bounces(a)tiker.net> on behalf of Alejandro Marcos Aragón <alejandro.aragon(a)gmail.com>
> Sent: Wednesday, October 10, 2018 12:24:16 PM
> To: MeshPy(a)tiker.net
> Subject: [MeshPy] problems when loading both tet and triangle
> Dear all,
> In the application I’m working on, I need to use both triangle and tetgen in the same function. I try to import both of them in a module as follows:
> import meshpy.triangle as triangle
> import meshpy.tet as tet
> but then I get the error:
> $ python test.py
> Traceback (most recent call last):
> File "test.py", line 6, in <module>
> import meshpy.tet as tet
> File "/Users/aaragon/.virtualenvs/pydev/lib/python3.7/site-packages/MeshPy-2018.2-py3.7-macosx-10.9-x86_64.egg/meshpy/tet.py", line 4, in <module>
> import meshpy._tetgen as internals
> ImportError: generic_type: type "RealArray" is already registered!
> If I invert the order the error happens then when I try to load triangle. Is there a way to fix this problem?
> On Mac OS, I’m using Python 3.7 and the latest version of MeshPy that uses PyBind (this was quite difficult to install).
> — Alejandro M. Aragón, Ph.D.