Closed sstaehler closed 1 year ago
I got a partial fix by altering the end of the generate function in main.py (access by ctrl+left click on "generate" in your IDE, at least in VS code that's what it is) and then commented out the call to distmesh_smoothing and replaced the last bit at the end with:
points = pts # mesh.node_coords
# cells = mesh.cells["nodes"]
This produces a nice mesh (once its been cleaned up by optimesh), but it still has the issue of boundary points not lying on the boundary, which I'm trying to fix now:
Just found this in the changelog for meshplex:
replacing all instances of
node_coords
with points
is a good place to start, apparently signed_cell_areas
is no longer a thing too and has been replaced with the generic signed_cell_volumes
, while you're at it, also replace all instances of "nodes"
with "points"
. That still leaves some errors that I'm currently working through though.
This contains all the fixes, just copy paste this into main.py and you should be good to go.
@mcgeochd Thanks for sharing your work on this, any thoughts on making a PR for your fix? Current contributors to the package seem to be silent on recent issues so perhaps it would be in vain, but this is a pretty show-stopping issue as is so it would be nice to have a real fix.
Your code seems moderately different from the current main.py
by eye (even just imports), but I'm not sure where your edits are on the scale of "professional fix in the spirit and style of the original code" to "just make it work now".
Apologies for taking so long to reply, I think this is something @nschloe would have to step in to fix properly. I only managed to address one of the issues I found, others such as the new idx list incompatibility with the old methods I wasn’t able to find enough documentation to fix myself. There is the discord where you could seek help but I was unable to get any responses there myself.
No idea where node_coords
should come from. There must be an old version of something at play, as I've removed node_coords
from all of my packages a while ago.
I created a new anaconda environment on Python 3.9 and installed dmsh using pip. I'm trying to run the examples now, but I get an error at the first line basically.
AttributeError: 'MeshTri' object has no attribute 'node_coords'