File: degenerate_removal.py

package info (click to toggle)
mshr 2018.1.0%2Bdfsg1-7
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,136 kB
  • sloc: cpp: 9,808; python: 680; makefile: 242; sh: 62; ansic: 11
file content (14 lines) | stat: -rw-r--r-- 446 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from mshr import *

# This union of spheres challenges the removal of degenerate facets
# since the intersection polyline of the two spheres matches lines in
# the triangulation of the spheres. Because of that roundoff errors
# introduces a lot of very small triangles when the union is carried
# out.

a = Sphere(dolfin.Point(0,0,0), .5)
b = Sphere(dolfin.Point(.5,0,0), .5)

domain = CSGCGALDomain3D(a+b)
domain.ensure_meshing_preconditions()