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
127 stars 33 forks source link

generate_mesh: verbose=False #70

Closed nschloe closed 4 years ago

nschloe commented 4 years ago

By default, generate_mesh prints lots of intermediate stats,

[...]
Iteration #43, max movement is 0.010014, there are 367 vertices and 678 cells
     Elapsed wall-clock time 0.001311 :
Iteration #44, max movement is 0.010025, there are 367 vertices and 678 cells
     Elapsed wall-clock time 0.001292 :
Iteration #45, max movement is 0.010035, there are 367 vertices and 678 cells
     Elapsed wall-clock time 0.001268 :
Iteration #46, max movement is 0.010043, there are 367 vertices and 678 cells
     Elapsed wall-clock time 0.001271 :
[...]

It'd be very useful if it was possible to disable this. This is typically done by a verbose argument. (Usually, this defaults to False, too.)

krober10nd commented 4 years ago

I have the option nscreen which controls this output frequency.

nschloe commented 4 years ago

Okay. What do I have to set it to to completely silence SM? 0 just throws an error.

krober10nd commented 4 years ago

Ah okay. I had made nscreen larger than the max_iter to avoid the intermediate info but I can switch this to a verbose to completely silence all output.

nschloe commented 4 years ago

Perhaps you can add verbose if someone else nscreens for something.

krober10nd commented 4 years ago

Is this a pun? 👍

krober10nd commented 4 years ago

I think you mean if I the user specifies an nscreen then there's an additional vebose catch?

nschloe commented 4 years ago

I meant to say that you don't necessarily have to remove nscreens. I don't know if there's any use for it if there's a verbose option, but at least you yourself found it useful once.

krober10nd commented 4 years ago

yea I agree. It's more logical and easier to understand to just have a 'verbose' option.