Required
filename| Type: | str | pathlib.Path |
| Description: | File to open. |
def read_abaqus_3d(filename: str | pathlib.Path) -> UnstructuredMesh: ...| Type: | str | pathlib.Path |
| Description: | File to open. |
UnstructuredMeshdef read_exodus(
filename: str | pathlib.Path,
attach_element_block_indices: bool = False,
select_element_block_indices: typing.Sequence[int] | None = None,
) -> UnstructuredMesh: ...| Type: | str | pathlib.Path |
| Description: | File to open. |
| Type: | bool |
| Default value: | False |
| Description: | If True, attach the element block indices to the mesh. |
| Type: | typing.Sequence[int] | None |
| Default value: | None |
| Description: | If given, read only these element blocks. Keep in mind that exodus uses 1-based indexing. |
UnstructuredMeshdef read_h5(
filename: str | pathlib.Path, read_data: bool = True
) -> UnstructuredMesh: ...| Type: | str | pathlib.Path |
| Description: | File to open. |
| Type: | bool |
| Default value: | True |
| Description: | read the elemental and element nodal data |
UnstructuredMeshdef read_h5_single_elemental_field(
filename: str | pathlib.Path, field_name: str
) -> npt.NDArray: ...| Type: | str | pathlib.Path |
| Description: | File to open. |
| Type: | str |
| Description: | Name of the field to read. |
npt.NDArraydef write_binary_vtk(
mesh: UnstructuredMesh, filename: pathlib.Path | str
) -> None: ...| Type: | UnstructuredMesh |
| Description: | The mesh to write. |
| Type: | pathlib.Path | str |
| Description: | Filename. Make sure it uses a .vtu extension so ParaView recognizes it. |
.e) file.- Points and connectivity - Element blocks - Elemental scalar fields - Nodal fields - Global (float) variables
- Elemental nodal fields (e.g., where different properties are assigned to different nodes of an element, with allowed discontinuities) - Global strings and arrays
def write_exodus(
mesh: UnstructuredMesh,
filename: str | pathlib.Path,
element_block_indices: str = "element_block_index",
compression: tuple[str, int] | None = None,
io_size: int = 0,
overwrite: bool = True,
) -> None: ...| Type: | UnstructuredMesh |
| Description: | Mesh to save. |
| Type: | str | pathlib.Path |
| Description: | Location to save the file to. Must end with .e. |
| Type: | str |
| Default value: | 'element_block_index' |
| Description: | Name of the elemental field that contains element block indices. |
| Type: | tuple[str, int] | None |
| Default value: | None |
| Description: | Compression settings. Pass a tuple of (method, option), e.g. ("gzip", 2). Slows down writing a lot but the resulting files are potentially much smaller. |
| Type: | int |
| Default value: | 0 |
| Description: | Determines how floating point variables are stored in the file. Inputs will be converted if required. Possible options include 0 for machine precision, 4 for single precision, and 8 for double precision. |
| Type: | bool |
| Default value: | True |
| Description: | Whether to overwrite existing file. |
.e.def write_h5(
mesh: UnstructuredMesh,
filename: str | pathlib.Path,
datatype: type[np.number] | None = numpy.float64,
compression: tuple[str, int] | None = None,
mode: str = "model",
write_chunk_size: int = 10000,
overwrite: bool = True,
periodic_axes: str | list[str] | None = None,
periodic_atol: float = 1e-08,
) -> None: ...| Type: | UnstructuredMesh |
| Description: | The mesh to write. |
| Type: | str | pathlib.Path |
| Description: | Filename. |
| Type: | type[np.number] | None |
| Default value: | numpy.float64 |
| Description: | Datatype to write. Only applies to the elemental field data, coordinates will always be written in double precision. If not set, a suitable data type will be chosen automatically. |
| Type: | tuple[str, int] | None |
| Default value: | None |
| Description: | Turn on compression. Pass a tuple of (method, option), e.g. ("gzip", 2). Slows down writing a lot but the resulting files are potentially much smaller. |
| Type: | str |
| Default value: | 'model' |
| Description: | one of "all", "model","skeleton", "minimal" or "minimal_fast". Controls the content of the mesh file and whether an xdmf file is added. 'all': largest file size, multiple block xdmf file and faster reading from file with UnstructuredMesh.from_h5() 'model': all data to view the model, single block xdmf file for easy opening in paraview 'skeleton': only the first order connectivity can be viewed 'minimal': smallest file size, no xdmf. 'minimal_fast': Same as minimal, but slightly larger file size for faster reading from file with UnstructuredMesh.from_h5() |
| Type: | int |
| Default value: | 10000 |
| Description: | HDF5 chunk size in bytes. |
| Type: | bool |
| Default value: | True |
| Description: | Potentially overwrite an existing file. |
| Type: | str | list[str] | None |
| Default value: | None |
| Description: | Pass a coordinate or list of coordinates that you would like to make periodic. For example: x or [x, y]. This is an experimental feature, and should be considered unstable. |
| Type: | float |
| Default value: | 1e-08 |
| Description: | Allow for flexibility on the tolerance for coordinate matching when considering periodic boundary conditions. This is an experimental feature, and should be considered unstable. |
def write_vtp(
mesh: UnstructuredMesh,
filename: pathlib.Path | str,
side_sets: typing.Sequence[str] = ("x0", "x1", "y0", "y1", "z0", "z1"),
) -> None: ...| Type: | UnstructuredMesh |
| Description: | The mesh to write. |
| Type: | pathlib.Path | str |
| Description: | filename |
| Type: | typing.Sequence[str] |
| Default value: | ('x0', 'x1', 'y0', 'y1', 'z0', 'z1') |
| Description: | Side sets to write. |