Skip to content

Instantly share code, notes, and snippets.

View michalhabera's full-sized avatar

Michal Habera michalhabera

View GitHub Profile
@michalhabera
michalhabera / meshtagging_mvc.py
Created June 28, 2018 10:34
Terribly hacky MVC workaround for pygmsh-meshio-dolfin boundary tagging
from pygmsh.built_in.geometry import Geometry
from pygmsh import generate_mesh
import meshio
import dolfin
geom = Geometry()
lc = .1
p0 = geom.add_point([0, 0, 0], lcar=lc)
p1 = geom.add_point([1, 0, 0], lcar=lc)
@michalhabera
michalhabera / meshtagging.py
Created June 27, 2018 14:16
Preliminary tests of mesh tagging with pygmsh-meshio-dolfin pipeline
from pygmsh.built_in.geometry import Geometry
from pygmsh import generate_mesh
import meshio
from dolfin import Mesh, MeshFunction, XDMFFile
geom = Geometry()
lc = .1
p0 = geom.add_point([0, 0, 0], lcar=lc)