|
carputils
Doxygen code documentation for the python framework controlling openCARP
|
Convert igb files to VTKHDF format. More...
Functions | |
| def | arg_parser () |
| Generate a standard argument parser for collection of common options. More... | |
| def | main (args) |
| Execute functions and create vtkhdf file. More... | |
| def | check_args (args) |
| Check given arguments in general. More... | |
| np.ndarray | read_pts (str file_path, bool skip_invalid=True) |
| Read in points of the mesh. More... | |
| np.ndarray | read_elem (str file_path) |
| Read in elements of the mesh. More... | |
| def | read_igb_in_chunks (str file_path, float max_memory_gigabytes) |
| Read in igb data as chunks. More... | |
| def | create_vtkhdf (str file_path, str geometry, str topology, dict num_geom, int cell_type) |
| Create vtkhdf file. More... | |
| def | write_vtkhdf (str file_path, np.ndarray data, dict num_geom, ts_next, int stride) |
| Write vtkhdf file. More... | |
Variables | |
| def | parsed_args = arg_parser() |
Convert igb files to VTKHDF format.
| def bin.igb_to_vtkhdf.arg_parser | ( | ) |
Generate a standard argument parser for collection of common options.
| def bin.igb_to_vtkhdf.check_args | ( | args | ) |
Check given arguments in general.
| args | Contains parsed arguments. |
| FileNotFoundError | If file to be read at the given path does not exist. |
| SystemExit | If file to be written already exists and can't be overwritten. |
| def bin.igb_to_vtkhdf.create_vtkhdf | ( | str | file_path, |
| str | geometry, | ||
| str | topology, | ||
| dict | num_geom, | ||
| int | cell_type | ||
| ) |
Create vtkhdf file.
| file_path | Contains file path of the mesh. |
| geometry | Contains specified geometry of the mesh. |
| topology | Contains specified topology of the mesh. |
| num_geom | Contains number of cells, points, connections and points per cell. |
| cell_type | Contains specified cell type. |
| def bin.igb_to_vtkhdf.main | ( | args | ) |
Execute functions and create vtkhdf file.
| args | Contains parsed arguments as returned by the function arg_parser. |
| np.ndarray bin.igb_to_vtkhdf.read_elem | ( | str | file_path | ) |
Read in elements of the mesh.
| file_path | Contains file path of the mesh. |
| ValueError | If elements are not triangles or tetrahedra. |
| def bin.igb_to_vtkhdf.read_igb_in_chunks | ( | str | file_path, |
| float | max_memory_gigabytes | ||
| ) |
Read in igb data as chunks.
| file_path | Contains file path of the mesh. |
| max_memory_gigabytes | Contains maximum memory in gigabytes. |
| np.ndarray bin.igb_to_vtkhdf.read_pts | ( | str | file_path, |
| bool | skip_invalid = True |
||
| ) |
Read in points of the mesh.
| file_path | Contains file path of the mesh. skip_invalid (bool, optional): Skips invalid files. Defaults to True. |
| ValueError | If file contains invalid lines. |
| def bin.igb_to_vtkhdf.write_vtkhdf | ( | str | file_path, |
| np.ndarray | data, | ||
| dict | num_geom, | ||
| ts_next, | |||
| int | stride | ||
| ) |
Write vtkhdf file.
| file_path | Contains file path of the mesh. |
| data | Contains data of a chunk. |
| num_geom | Contains number of cells, points, connections and points per cell. |
| ts_next | Contains file part of a chuck to write. |
| stride | Contains stride in case time steps should be skipped. |
| def bin.igb_to_vtkhdf.parsed_args = arg_parser() |