Hello Andreas,
thanks for your fast reply! Yes, I am doing some 2D meshing. I have now tried to use test_triangle.py, but I get the following error, which was reported in this forum before:
'boost::python::error_already_set'
I always got this problem if I define a refinement_func. I use boost from the ubuntu repository together with the latest version of meshpy from git, could that be a problem?
Cheers, Johannes
Hello Andreas,
thanks for publishing your MeshPy code! I am pretty new to python programming and have therefore some simple questions: I am trying to mesh some primitives eg. circles, rectangles etc. and combinations of them. Using the build method I can easily obtain the elements and points, but the mesh generator adds only few points to the ones I have provided with the MeshInfo object and the mesh is therefore quite coarse. I tried to change the values of the parameters volume_contraints and max_volume but this didn't really change anything. So I was wondering which parameters to use to refine my mesh. Also, I saw that there might be the possibility to set the number of element vertices for HO elements. How can I do that? In case, are the vertices equally spaced over the elements or do they follow some optimized rules (e.g. Legendre-Gauss-Lobatto)?
Thanks for your help! Cheers, Johannes
Hello Andreas,
thanks for your fast reply! Yes, I am doing some 2D meshing. I have now tried to use test_triangle.py, but I get the following error, which was reported in this forum before:
'boost::python::error_already_set'
I always got this problem if I define a refinement_func. I use boost from the ubuntu repository together with the latest version of meshpy from git, could that be a problem?
Cheers, Johannes
Hi Johannes,
First, I'm inferring you're using the 2D mesher in meshpy, right?
Regarding refinement: Look at
test/test_triangle.pyin the meshpy distribution. That shows you how to do (even non-uniform) refinement.Regarding high order: I think Triangle goes up to second order elements. So if you want true high order, you're likely better off coding your own LGL bits. Alternatively, gmsh has full support for actual high-order geometry. Recent meshpy (from git) has the ability to run gmsh out-of-process. If you need to steal a gmsh reader, try here.
Andreas