Closed krober10nd closed 3 years ago
mpiexec -n 2 python code_below.py
from mpi4py import MPI import numpy import SeismicMesh import meshio comm = MPI.COMM_WORLD h = 0.05 bbox = (0.0, 1.0, 0.0, 1.0, 0.0, 1.0) cube = SeismicMesh.geometry.Cube(bbox) def edge_length(x): return h + 0.05 * (numpy.abs(x[:, 0] - 1.0)) points, cells = SeismicMesh.generate_mesh( bbox=bbox, h0=h, domain=cube, edge_length=edge_length, verbose=2, ) points, cells = SeismicMesh.sliver_removal( points=points, bbox=bbox, h0=h, domain=cube, edge_length=edge_length, ) meshio.write_points_cells( "cube.vtk", points, [("tetra", cells)], file_format="vtk", )
mpiexec -n 2 python code_below.py