Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
nschloe committed Sep 25, 2020
1 parent cdcebe4 commit 2ca1621
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,22 @@ import meshio

mesh = meshio.read(
filename, # string, os.PathLike, or a buffer/open file
file_format="stl" # optional if filename is a path; inferred from extension
file_format="stl", # optional if filename is a path; inferred from extension
)
# mesh.points, mesh.cells, mesh.cells_dict, ...

# mesh.vtk.read() is also possible
```
to read a mesh. To write, do
```python
points = numpy.array([
[0.0, 0.0, 0.0],
[0.0, 1.0, 0.0],
[0.0, 0.0, 1.0],
])
cells = [
("triangle", numpy.array([[0, 1, 2]]))
]
points = numpy.array(
[
[0.0, 0.0, 0.0],
[0.0, 1.0, 0.0],
[0.0, 0.0, 1.0],
]
)
cells = [("triangle", numpy.array([[0, 1, 2]]))]
meshio.write_points_cells(
"foo.vtk",
points,
Expand All @@ -100,7 +100,7 @@ meshio.write_points_cells(
# point_data=point_data,
# cell_data=cell_data,
# field_data=field_data
)
)
```
or explicitly create a mesh object for writing
```python
Expand Down
2 changes: 1 addition & 1 deletion meshio/gmsh/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .main import read, write
from .common import _gmsh_to_meshio_type as gmsh_to_meshio_type
from .main import read, write

__all__ = ["read", "write", "gmsh_to_meshio_type"]

0 comments on commit 2ca1621

Please sign in to comment.