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

preserving pfix #95

Closed krober10nd closed 4 years ago

krober10nd commented 4 years ago
 import numpy as np
 import SeismicMesh

 import meshio

 hmin = 0.05

 pfix = np.linspace((0.0, 0.0, 0.0), (1.0, 0.0, 1.0), int(np.sqrt(2) / hmin))

 cube = SeismicMesh.Cube((0.0, 1.0, 0.0, 1.0, 0.0, 1.0))

 points, cells = SeismicMesh.generate_mesh(domain=cube, edge_length=hmin, pfix=pfix)
 meshio.write_points_cells(
     "cube_wpfix.vtk",
     points,
     [("tetra", cells)],
     file_format="vtk",
 )
krober10nd commented 4 years ago

addresses #95