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

make purpose of SeismicMesh clearer #44

Closed nschloe closed 4 years ago

nschloe commented 4 years ago

This is about the README. The premise of SeismicMesh is unclear:

2D/3D triangular meshing for a slab of Earth based on modifications to the DistMesh algorithm. SeismicMesh is distributed under GPL3.

First off, I think it's tetrahedral meshing in 3D, right? What does is "meshing for a slab of Earth" mean, how is it different from meshing for the air around a wing? What exactly does SeismicMesh do differently than gmsh, or what's it's specialty? I'm guessing it has to do with the segy files. How is this useful for seismic computations?

krober10nd commented 4 years ago

It's both 2D and 3D quality triangular meshing in serial and distributed memory parallel. I can make the purpose a bit clearer of course on the README but I thought this was the purpose of the paper.

nschloe commented 4 years ago

The paper should definitely be linked in the readme, but the first paragraph in the readme should definitely make clear what SeismicMesh is and what it can do. How is it better than the existing mesh generators out there, why did you write it?

nschloe commented 4 years ago

I personally am curious what makes SeismicMesh particular to seismic problems.

krober10nd commented 4 years ago

Sure, okay I agree in can be made clearer. I'll work on that.

Here are answers in regard to existing mesh generations like gmsh vs. `SeismicMesh:

Here are my comments on your question about your query why SeismicMesh is particular to seismic problems:

Bottom line: the are many general purpose use cases of SeismicMesh besides in seismology but currently that's what it's used for.

krober10nd commented 4 years ago

I took a stab at improving the purpose and clarity in #45, which can be seen here https://github.com/krober10nd/SeismicMesh/tree/purpose

krober10nd commented 4 years ago

I did a couple more revisions of the README and merged it in. I personally think it's clearer now.

krober10nd commented 4 years ago

Revised it a little more today.

nschloe commented 4 years ago

These aforementioned mesh generation software generally require a sizing function to be defined on a mesh, which creates a circular problem of building a mesh to build a mesh.

That's not true. CGAL does mesh refinement based on general functions (see, e.g., https://github.com/nschloe/pygalmesh#local-refinement) and so does gmsh.

So if I get it right, SeismicMesh is basically a big distmesh implementation that can also ready seismic velocity model files and create a mesh sizing field from it. Is that correct?

krober10nd commented 4 years ago

That's not true. CGAL does mesh refinement based on general functions (see, e.g., https://github.com/nschloe/pygalmesh#local-refinement) and so does gmsh.

That's fair and I'll edit the language to reflect your point. However, I meant more along the lines of how does a user build a sizing function from a given seismic velocity model.

For analytical sizing functions, it's straightforward. For user-defined fields, the gmsh 4.6.0 user guide syas:

The PostView field specifies an explicit background mesh in the form of a scalar post-processing view (see Post-processing commands, and File formats) in which the nodal values are the target element sizes. This method is very general but it requires a first (usually rough) mesh and a way to compute the target sizes on this mesh (usually through an error estimation procedure, in an iterative process of mesh adaptation). Warning: only parsed (.pos) files can currently be used as background meshes (.msh files cannot be used, since the mesh used to define the field will be destroyed during the meshing process). (Note that you can also load a background mesh directly from the command line using the -bgm option (see Command-line options), or in the GUI by selecting ‘Apply as background mesh’ in the post-processing view option menu.)

Hence where my comment a mesh to define a mesh.

So if I get it right, SeismicMesh is basically a big distmesh implementation that can also ready seismic velocity model files and create a mesh sizing field from it. Is that correct?

That's correct. A parallel distmesh with mesh improvement and mesh sizing field creation from seismic velocity model files.

nschloe commented 4 years ago

That's correct.

Good. Can SeismicMesh generate meshes for non-rectangular domains, too?

krober10nd commented 4 years ago

Good. Can SeismicMesh generate meshes for non-rectangular domains, too?

Yep.

There's two examples in the folder examples that show how you can mesh non-rectangular domains (2D and 3D).

I use iso contours of seismic velocity to define a 0-level set, which defines the meshing domain.