krober10nd / SeismicMesh

2D/3D serial and parallel triangular mesh generation tool for finite element methods.
https://seismicmesh.readthedocs.io/
GNU General Public License v3.0
129 stars 33 forks source link

more hints for the article #139

Closed nschloe closed 3 years ago

nschloe commented 4 years ago

Important:

Less important:

krober10nd commented 4 years ago

Awesome, thank you for the hints. 👍

krober10nd commented 4 years ago

Okay lets break these comments down:

You speak of "modifications of distmesh". What modifications are these, exactly? Please go into more detail in the article. (If the mods aren't too small.) If the mods are small, don't mention them.

Okay fair enough. I'll remove "modifications". Although I meant that the parallelism was never really an option in the DistMesh so it's a modification to the algorithm to support parallelism.

I think you need to make clearer that SeismicMesh is a parellel distmesh implementation plus a mesh density function generator. I would like to hear why distmesh_ and not some other algorithm?

Proposed new summary:

Summary

SeismicMesh is a Python package containing a parallel triangular mesh generator and mesh sizing function creator for two and three dimensional domains such as those encountered in seismology. C++ code is wrapped with Python for performance without losing ease-of-use. Mesh generation is performed in either serial or using distributed memory parallelism with an implementation of DistMesh [@doi:10.1137/S0036144503429121; @peterka2014high]. DistMesh is an uncomplicated algorithm that is known to produce high-quality cells, can be easily parallelized, and does not require explicit domain geometry information, which can be useful for people unfamiliar with mesh generation. Our implementation uses the Computational Geometry Algorithms Library [@cgal:hs-chdt3-20a] to perform many geometric operations quickly.

I'm thinking about how to revise the Statement of Need to incorporate your other suggestions.

nschloe commented 4 years ago

I tried to make it a bit more crisp (feel free to use or dismiss):

SeismicMesh is a Python package for simplex mesh generation in two or three dimensions. As an implementation of DistMesh [@doi:10.1137/S0036144503429121; @peterka2014high], it produces high-quality meshes at the expense of speed. For increased efficiency, the core package is written in C++, works in parallel, and uses the Computational Geometry Algorithms Library [@CGAL:hs-chdt3-20a]. SeismicMesh can also produce mesh-density functions from seismological data to be used in the mesh generator.

krober10nd commented 4 years ago

That's excellent, thank you Nico.

krober10nd commented 4 years ago

This paragraph is a little more challenging for me, but I think it's better below. I think the point you make is quite interesting about querying sizing functions.

Besides that it would be nice to perhaps highlight the implicit functions that I use make the geometry creation a lot easier than hand drawing an STL. I haven't yet determined where best to put that or if I will put that in.

Why don't you simply use Gmsh, right? Aha, you find that Gmsh is slow for your use case! Why? Because your density function is so complicated and it heavily benefits from vectorization. Gmsh's algorithm doesn't allow for vectorization, distmesh does. ==> For complicated density functions, distmesh is better.

Statement of need

The success of many finite element methods in geophysics hinges on the creation of a variable resolution and quality triangular mesh. Despite the fact that many mesh generation programs exist such as Gmsh and CGAL, it is rare to find capabilities that incorporate geophysical data directly into the mesh generation process to appropriately size elements. This in part contributes to the reality that automatic mesh generation for geophysical domains largely still remains an unsolved problem.

However recently some freely available packages have been created to script mesh generation from geophysical datasets such as in coastal ocean modeling [e.g., @roberts2019oceanmesh2d; GMT and Terreno @gorman2008systematic] and reservoir modeling [e.g., MeshIT @cacace2015meshit]. Following in a similar direction to those programs to ease the burden of mesh development for geophysical problems, the aim of this package is to provide a simple-to-use Python package to script mesh generation directly from geophysical datasets. This is accomplished first by building a mesh density function directly from seismic velocity models and then supplying these inputs to a mesh generator that can use these inputs while operating at scale.

Our mesh density functions can be used with other mesh generators however the usage of a particular sizing function can have significant implications on mesh generation performance. For example, Gmsh's advancing front and Delaunay refinement methods construct the mesh incrementally and do not permit vectorization which leads to significant slow downs at scale in 2D/3D mesh generation. In contrast, the DistMesh algorithm takes advantage of vectorization when querying a complex mesh density function making it more efficient and competitive to Gmsh and CGAL for this kind of meshing problem.

krober10nd commented 4 years ago

Okay, I did several iterations of the above and liked how it flowed. I also rewrote the performance section to take into consideration the improved 2D minimum cell qualities. It's now merged into main.

krober10nd commented 4 years ago

Do you have any more comments on this article @nschloe ? The latest paper is on the main branch.

krober10nd commented 4 years ago

@nschloe Can we close this issue?

nschloe commented 4 years ago

I will check as soon as I have time.

krober10nd commented 4 years ago

thanks

nschloe commented 3 years ago

Okay, closing.