You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if it's a bug or I'm doing something wrong.
I'm making a mesh with around 500,000 cells using TreeMesh and when I try to plot it, it returns a MemoryError.
I am using Discretize 0.10.0 and python 3.8.
This is my code to create the mesh:
If I try to plot a slice of the mesh adding range_x=[-5, 5], range_y=[ -300, 0]) into the mesh.plot_slice() function, It also returns the same MemoryError.
Let me know how I can fix it.
Thank you!
The text was updated successfully, but these errors were encountered:
The issue is clearly coming from the plotting method trying to build a meshgrid out of coordinates of the cell centers of the underlying tensormesh. Since your smallest cells are too small in comparison to the range of the mesh, then the memory needed to allocate such meshgrid arrays is huge. I think we need to reimplement some of the pieces of this methods, since it shouldn't be required to allocate GBs of memory just to plot one slice of the mesh.
Oh boy, that is using a lot of memory to do this!
I've wanted to put more efficient intersection methods into the TreeMesh and/or give the user access to them. It already does efficient intersection tests for some simple geometric shapes in the refine functions, would just need to separate them into different functions and make the intersection tests rely on those.
Hello,
I'm not sure if it's a bug or I'm doing something wrong.
I'm making a mesh with around 500,000 cells using TreeMesh and when I try to plot it, it returns a MemoryError.
I am using Discretize 0.10.0 and python 3.8.
This is my code to create the mesh:
The resulting mesh is:
When I try to plot it:
If I try to plot a slice of the mesh adding
range_x=[-5, 5], range_y=[ -300, 0])
into themesh.plot_slice()
function, It also returns the same MemoryError.Let me know how I can fix it.
Thank you!
The text was updated successfully, but these errors were encountered: