How to make EB2::build faster #4130
-
I'm trying to use AMReX to do wind turbine simulations. Now I have STL format geometry and want it to rotate at every timestep. It's a complex geometry and the mesh quantity would be extremely large for its representation. The problem I encounter is that building EB information is very slow, let alone every timestep I need to rebuild it. So I'm wondering if there is any trick to make |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
If you're not doing it already, you can use eb2.num_coarsen_opt to improve load balancing. How many triangles in your STL? |
Beta Was this translation helpful? Give feedback.
-
Good news and bad news, I guess. The good news is that we have code (https://github.com/rmrsk/EBGeometry) for turning STLs into distance fields, and this is done by means of hierarchical structures that perform way better than AMReX's native STL reader once you start hitting 10k triangles and beyond. The bad news is that 1) we haven't (yet) put this on the GPU, and 2) the surface must be manifold (watertight, no self-intersections, and coherently oriented faces). Dirty CAD files, in general, don't have very robust distance fields, so we haven't made much of an effort to support them. |
Beta Was this translation helpful? Give feedback.
-
I have submitted a draft PR (#4140) trying to address the performance issue. The code has not been thoroughly tested. But please feel free to give it a try and report any issues. |
Beta Was this translation helpful? Give feedback.
I have submitted a draft PR (#4140) trying to address the performance issue. The code has not been thoroughly tested. But please feel free to give it a try and report any issues.