|
Peano
|
Repartition a single-piece .vtu into a K-piece .pvtu for low-memory streaming. More...
Functions | |
| _xml_type (data_array) | |
| _component_names (array) | |
| ComponentName attributes, as VTK's writer emits them, for the named components. | |
| _parallel_arrays (field_data, indent=" ") | |
| _write_summary (pvtu_path, grid, piece_sources) | |
| Write the .pvtu summary that ties the piece files together. | |
| repartition (input_path, output_path, pieces, compress=True) | |
| main (argv=None) | |
Variables | |
| dict | _VTK_TO_XML_TYPE |
Repartition a single-piece .vtu into a K-piece .pvtu for low-memory streaming.
The CCZ4 sample snapshots are written as one big <Piece>, which VTK's XML reader can only load all-at-once. This one-time, offline tool splits such a file into K disjoint pieces referenced by a .pvtu summary. The apparent-horizon finder can then stream that .pvtu piece by piece, so its peak memory is bounded by one piece rather than the whole grid.
The split itself must load the whole grid once (that is the cost this tool pays so the finder never has to). It is deliberately separate from the reader: it runs occasionally, has the opposite memory profile, and is unnecessary for genuinely multi-piece / domain-decomposed output that Peano already produces.
Usage: python3 repartition_vtu.py input.vtu output.pvtu [-k 8] [–no-compress]
The K piece files are written next to output.pvtu as <output-stem>_<p>.vtu.
|
protected |
ComponentName attributes, as VTK's writer emits them, for the named components.
Definition at line 48 of file repartition_vtu.py.
|
protected |
Definition at line 58 of file repartition_vtu.py.
|
protected |
Write the .pvtu summary that ties the piece files together.
Definition at line 76 of file repartition_vtu.py.
Referenced by repartition().

|
protected |
Definition at line 44 of file repartition_vtu.py.
| repartition_vtu.main | ( | argv = None | ) |
Definition at line 164 of file repartition_vtu.py.
References main(), and repartition().
Referenced by main().


| repartition_vtu.repartition | ( | input_path, | |
| output_path, | |||
| pieces, | |||
| compress = True ) |
Definition at line 105 of file repartition_vtu.py.
References _write_summary().
Referenced by main().


|
protected |
Definition at line 29 of file repartition_vtu.py.