|
Peano
|
The visualiser is first and foremost a persistency layer around datasets. More...


Public Member Functions | |
| __init__ (self, file_name, output_directory=".", strip_relative_paths=True, start=0, end=0, verbose=False, split_unknowns=False) | |
| split_unknowns: Boolean Write one additional array per (named) variable. | |
| process_snapshot (self, snapshot, i) | |
| Helper function to process a single snapshot. | |
| display (self, max_workers=None) | |
| Should be called only once. | |
| display_single_file (self) | |
| If we are here we've supplied a single file which is itself a snapshot. | |
| write_vtu (self, unknown_name, grid_data, index=None) | |
| unknown_name should describe which unknown we are writing here. | |
| parse_and_render_snapshot (self, snapshot, index=0) | |
| We want to call the method in superclass, and then process this data into VTUUnstructuredGrid. | |
Public Member Functions inherited from tarch.plotter.api.output.Visualiser.Visualiser | |
| read_metadata (self) | |
| Read the patch file metadata. | |
| append_filter (self, filter) | |
| remove_filters (self) | |
| parse_snapshot (self, snapshot) | |
| We rewrite "reload" from previous version of this file. | |
Protected Attributes | |
| _tp | |
| _grid | |
| _strip_relative_paths | |
| _file_name | |
Protected Attributes inherited from tarch.plotter.api.output.Visualiser.Visualiser | |
| _file_name | |
| _start | |
| _end | |
| _filter | |
| _dimensions | |
| _description | |
| _is_data_associated_to_cell | |
The visualiser is first and foremost a persistency layer around datasets.
It does not work on the command line.
Use this class by feeding the patch meta file you want to render into render.py, which will call this class.
Everything happens in either display() or display_single_file(). Please see documentation of these functions for more info.
Definition at line 411 of file VTUUnstructuredGrid.py.
| tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.__init__ | ( | self, | |
| file_name, | |||
output_directory = ".", |
|||
strip_relative_paths = True, |
|||
start = 0, |
|||
end = 0, |
|||
verbose = False, |
|||
split_unknowns = False |
|||
| ) |
split_unknowns: Boolean Write one additional array per (named) variable.
Reimplemented from tarch.plotter.api.output.Visualiser.Visualiser.
Definition at line 423 of file VTUUnstructuredGrid.py.
References tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.__init__().
Referenced by tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.__init__().


| tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.display | ( | self, | |
max_workers = None |
|||
| ) |
Should be called only once.
How does this work?
For each unknown that we see on each cell/vertex, we produce an ordered list of VTUUnstructuredGrid files, and a PVD file to glue them together.
Reimplemented from tarch.plotter.api.output.Visualiser.Visualiser.
Definition at line 467 of file VTUUnstructuredGrid.py.
References tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.display().
Referenced by tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.display().


| tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.display_single_file | ( | self | ) |
If we are here we've supplied a single file which is itself a snapshot.
Turn it into an instance of the snapshot helper class, set the timestamp to 0 and pass it back. We can just call parse_and_render_snapshot() on the result
Reimplemented from tarch.plotter.api.output.Visualiser.Visualiser.
Definition at line 634 of file VTUUnstructuredGrid.py.
References tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.display_single_file(), tarch.plotter.api.output.Visualiser.Visualiser.parse_and_render_snapshot(), and tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.parse_and_render_snapshot().
Referenced by tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.display_single_file().


| tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.parse_and_render_snapshot | ( | self, | |
| snapshot, | |||
index = 0 |
|||
| ) |
We want to call the method in superclass, and then process this data into VTUUnstructuredGrid.
Returns the filenames that we wrote, for each unknown. We combine these into vtk at the end.
Reimplemented from tarch.plotter.api.output.Visualiser.Visualiser.
Definition at line 672 of file VTUUnstructuredGrid.py.
References tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.display_as_tree, tarch.plotter.api.output.VTUUnstructuredGrid.name_unknowns(), tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.parse_and_render_snapshot(), tarch.plotter.api.output.VTUUnstructuredGrid.prepare_2D_patches_unstructured_grid(), tarch.plotter.api.output.VTUUnstructuredGrid.prepare_3D_patches_unstructured_grid(), tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.split_unknowns, and tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.write_vtu().
Referenced by tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.display_single_file(), tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.parse_and_render_snapshot(), and tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.process_snapshot().


| tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.process_snapshot | ( | self, | |
| snapshot, | |||
| i | |||
| ) |
Helper function to process a single snapshot.
Calls parse_and_render_snapshot and returns the snapshot timestamp and filenames.
Definition at line 455 of file VTUUnstructuredGrid.py.
References tarch.plotter.api.output.Visualiser.Visualiser.parse_and_render_snapshot(), tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.parse_and_render_snapshot(), TP::Parameters.verbose, tarch.plotter.api.filters.Filter.Filter.verbose, and tarch.plotter.api.output.Visualiser.Visualiser.verbose.

| tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.write_vtu | ( | self, | |
| unknown_name, | |||
| grid_data, | |||
index = None |
|||
| ) |
unknown_name should describe which unknown we are writing here.
Add an index to be placed in the filename
Definition at line 638 of file VTUUnstructuredGrid.py.
References postprocessing.PerformanceData.PerformanceData._file_name, peano4.api.Logger.Logger._file_name, tarch.plotter.api.output.Visualiser.Visualiser._file_name, tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid._file_name, OutputFile.OutputFile._file_name, TP::Parameters.verbose, tarch.plotter.api.filters.Filter.Filter.verbose, and tarch.plotter.api.output.Visualiser.Visualiser.verbose.
Referenced by tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.parse_and_render_snapshot().

|
protected |
Definition at line 491 of file VTUUnstructuredGrid.py.
Referenced by peano4.api.Logger.Logger.close(), tarch.plotter.api.output.Visualiser.Visualiser.display_single_file(), peano4.api.Logger.Logger.file_name(), OutputFile.OutputFile.parse(), postprocessing.PerformanceData.PerformanceData.parse(), tarch.plotter.api.output.Visualiser.Visualiser.read_metadata(), and tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.write_vtu().
|
protected |
Definition at line 442 of file VTUUnstructuredGrid.py.
|
protected |
Definition at line 445 of file VTUUnstructuredGrid.py.
|
protected |
Definition at line 441 of file VTUUnstructuredGrid.py.
| tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.display_as_tree |
Definition at line 444 of file VTUUnstructuredGrid.py.
Referenced by tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.parse_and_render_snapshot().
| tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.output_directory |
Definition at line 443 of file VTUUnstructuredGrid.py.
| tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.process_snapshot |
Definition at line 556 of file VTUUnstructuredGrid.py.
| tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.pvd_file |
Definition at line 448 of file VTUUnstructuredGrid.py.
| tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.show_progress |
Definition at line 499 of file VTUUnstructuredGrid.py.
Referenced by tarch.plotter.api.input.PatchFileParser.PatchFileParser.parse_file(), and tarch.plotter.api.output.Visualiser.Visualiser.parse_snapshot().
| tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.snapshots |
Definition at line 527 of file VTUUnstructuredGrid.py.
Referenced by tarch.plotter.api.output.PointProbe.PointProbe.display_single_file(), and tarch.plotter.api.output.Visualiser.Visualiser.read_metadata().
| tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.split_unknowns |
Definition at line 440 of file VTUUnstructuredGrid.py.
Referenced by tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.parse_and_render_snapshot().