Unwanted output while meshing a Sphere with mshr

Issue #690 wontfix
Adrien Coulier created an issue

While using the generate_mesh function on a sphere with mshr, I get the following output which is rather annoying. If I mesh a circle instead the output goes away. Is there any way to deactivate output from mshr?

import dolfin, mshr

dolfin.set_log_active(False)

geometry = mshr.Sphere(dolfin.Point(0, 0, 0), 6, 5)
mesh = mshr.generate_mesh(geometry, 5)
#!
Inserting protection balls...
  refine_balls = true
  min_balls_radius = 0
  min_balls_weight = 0
insert_corners() done. Nb of points in triangulation: 0
insert_balls_on_edges() done. Nb of points in triangulation: 0
refine_balls() done. Nb of points in triangulation: 0

Start surface scan...Scanning triangulation for bad facets (sequential) - number of finite facets = 22...
Number of bad facets: 12
end scan. [Bad facets:12]

Refining Surface...
Legend of the following line: (#vertices,#steps,#facets to refine,#tets to refine)
(97,88,0,0) (1222.2 vertices/s))
Total refining surface time: 0.072s

Start volume scan...Scanning triangulation for bad cells (sequential)... 268 cells scanned, done.
Number of bad cells: 254
end scan. [Bad tets:254]

Refining...
Legend of the following line: (#vertices,#steps,#facets to refine,#tets to refine)
(115,17,0,0) (1416.7 vertices/s))
Total refining volume time: 0.012s
Total refining time: 0.096s

Comments (4)

  1. Nico Schlömer

    As a workaround, since all the output from CGAL goes to std::cerr, one could just pipe that somewhere else, e.g.,

    python create_mesh.py 2> /dev/null
    
  2. Log in to comment