|
Peano
|
Probe the data within a Peano patch file at one point over time. More...


Public Member Functions | |
| __init__ (self, file_name, point, output_file, start, end, verbose=False) | |
| Abstract superclass of a visualiser. | |
| process_snapshot (self, snapshot, i) | |
| Return (timestamp, dict from unknown name onto (number of unknowns, description, values or None)) | |
| display (self, max_workers=1) | |
| This is the one routine the visualisers typically do overwrite. | |
| display_single_file (self) | |
| If we are here we've supplied a single file which is itself a snapshot. | |
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_and_render_snapshot (self, snapshot) | |
| We pass in a snapshot object here, which should contain time stamp and filenames for everything we want to render here. | |
| parse_snapshot (self, snapshot) | |
| We rewrite "reload" from previous version of this file. | |
Data Fields | |
| patch_filter | |
| show_progress | |
| snapshots | |
| process_snapshot | |
Data Fields inherited from tarch.plotter.api.output.Visualiser.Visualiser | |
| identifier | |
| verbose | |
| show_progress | |
| patch_filter | |
| snapshots | |
| meta_data_has_been_read | |
Static Public Attributes | |
| int | Tolerance = 1e-8 |
Protected Member Functions | |
| _probe_patch_data (self, patch_file_data, point) | |
| Return list of unknowns at point or None if point is not covered. | |
| _assert_default_cell_mapping (self, patch_file_data) | |
| Cell data with a user-defined (distorted) mapping is not supported. | |
| _run (self, max_workers) | |
| _column_names (self, columns, descriptions) | |
| One column name per unknown of each data set. | |
| _write_csv (self, results) | |
Protected Attributes | |
| _point | |
| _output_file | |
Protected Attributes inherited from tarch.plotter.api.output.Visualiser.Visualiser | |
| _file_name | |
| _start | |
| _end | |
| _filter | |
| _dimensions | |
| _description | |
| _is_data_associated_to_cell | |
Probe the data within a Peano patch file at one point over time.
This is not a visualiser but a postprocessing tool, but it reuses the whole meta file and snapshot logic of the Visualiser. Per snapshot, we parse only those patches which contain the probe point (
The result is a csv file with one row per snapshot. The first column is the snapshot's time stamp, followed by all unknowns of all data sets found in the file. If the point is not covered by any patch in a snapshot, we write NaNs.
If the point sits exactly on the face between two patches of the same size, we take the patch to the right/top/front, i.e. we use half-open intervals [offset,offset+size). Only if no such patch exists (domain boundary), we fall back to the patch to the left.
Definition at line 37 of file PointProbe.py.
| tarch.plotter.api.output.PointProbe.PointProbe.__init__ | ( | self, | |
| file_name, | |||
| start, | |||
| end, | |||
| verbose, | |||
| end, | |||
verbose = False |
|||
| ) |
Abstract superclass of a visualiser.
file_name: String Name of a Peano patch file. This does not need to be a meta file.
If we run render.py with the argument -s (to denote we are using single file), then we will use the file_name to create a member of the snapshot class (which captures the patch file to read, with default timestamp of 0). This is then parsed by parse_and_render, and handed back to child class.
If this is a meta file, then display() will be used.
verbose: Boolean Controls how much the class writes out.
self.identifier: String Pick one subidentifier from the input file. If this one is empty, we take every input data set. However, some output formats (such as ParaView) don't support multiple output data sets, so we might end up with either the first or last one from the file - depending on the implementations.
Reimplemented from tarch.plotter.api.output.Visualiser.Visualiser.
Definition at line 61 of file PointProbe.py.
References tarch.plotter.api.output.PointProbe.PointProbe.__init__().
Referenced by tarch.plotter.api.output.PointProbe.PointProbe.__init__().


|
protected |
Cell data with a user-defined (distorted) mapping is not supported.
Definition at line 130 of file PointProbe.py.
Referenced by tarch.plotter.api.output.PointProbe.PointProbe._probe_patch_data().

|
protected |
One column name per unknown of each data set.
If a data set names its unknowns (
Definition at line 195 of file PointProbe.py.
Referenced by tarch.plotter.api.output.PointProbe.PointProbe._write_csv().

|
protected |
Return list of unknowns at point or None if point is not covered.
Definition at line 66 of file PointProbe.py.
References tarch.plotter.api.output.PointProbe.PointProbe._assert_default_cell_mapping(), and tarch.plotter.api.output.PointProbe.PointProbe.Tolerance.
Referenced by tarch.plotter.api.output.PointProbe.PointProbe.process_snapshot().


|
protected |
Definition at line 172 of file PointProbe.py.
Referenced by tarch.plotter.api.output.PointProbe.PointProbe.display(), and tarch.plotter.api.output.PointProbe.PointProbe.display_single_file().

|
protected |
Definition at line 224 of file PointProbe.py.
References tarch.plotter.api.output.PointProbe.PointProbe._column_names(), and tarch.plotter.api.output.PointProbe.PointProbe._output_file.

| tarch.plotter.api.output.PointProbe.PointProbe.display | ( | self, | |
max_workers = 1 |
|||
| ) |
This is the one routine the visualisers typically do overwrite.
Reimplemented from tarch.plotter.api.output.Visualiser.Visualiser.
Definition at line 253 of file PointProbe.py.
References tarch.plotter.api.output.PointProbe.PointProbe._run(), and tarch.plotter.api.output.PointProbe.PointProbe.display().
Referenced by tarch.plotter.api.output.PointProbe.PointProbe.display().


| tarch.plotter.api.output.PointProbe.PointProbe.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 257 of file PointProbe.py.
References tarch.plotter.api.output.PointProbe.PointProbe._run(), tarch.plotter.api.output.PointProbe.PointProbe.display_single_file(), tarch.plotter.api.output.PointProbe.PointProbe.snapshots, tarch.plotter.api.output.Visualiser.Visualiser.snapshots, and tarch.plotter.api.output.VTUUnstructuredGrid.VTUUnstructuredGrid.snapshots.
Referenced by tarch.plotter.api.output.PointProbe.PointProbe.display_single_file().


| tarch.plotter.api.output.PointProbe.PointProbe.process_snapshot | ( | self, | |
| snapshot, | |||
| i | |||
| ) |
Return (timestamp, dict from unknown name onto (number of unknowns, description, values or None))
Definition at line 155 of file PointProbe.py.
References tarch.plotter.api.output.PointProbe.PointProbe._point, tarch.plotter.api.output.PointProbe.PointProbe._probe_patch_data(), tarch.plotter.api.output.Visualiser.Visualiser.parse_snapshot(), TP::Parameters.verbose, tarch.plotter.api.filters.Filter.Filter.verbose, and tarch.plotter.api.output.Visualiser.Visualiser.verbose.

|
protected |
Definition at line 64 of file PointProbe.py.
Referenced by tarch.plotter.api.output.PointProbe.PointProbe._write_csv().
|
protected |
Definition at line 63 of file PointProbe.py.
Referenced by tarch.plotter.api.output.PointProbe.PointProbe.process_snapshot().
| tarch.plotter.api.output.PointProbe.PointProbe.patch_filter |
Definition at line 173 of file PointProbe.py.
Referenced by tarch.plotter.api.input.PatchFileParser.PatchFileParser.__parse_patch_region(), and tarch.plotter.api.output.Visualiser.Visualiser.parse_snapshot().
| tarch.plotter.api.output.PointProbe.PointProbe.process_snapshot |
Definition at line 188 of file PointProbe.py.
| tarch.plotter.api.output.PointProbe.PointProbe.show_progress |
Definition at line 174 of file PointProbe.py.
Referenced by tarch.plotter.api.input.PatchFileParser.PatchFileParser.parse_file(), and tarch.plotter.api.output.Visualiser.Visualiser.parse_snapshot().
| tarch.plotter.api.output.PointProbe.PointProbe.snapshots |
Definition at line 179 of file PointProbe.py.
Referenced by tarch.plotter.api.output.PointProbe.PointProbe.display_single_file(), and tarch.plotter.api.output.Visualiser.Visualiser.read_metadata().
|
static |
Definition at line 59 of file PointProbe.py.
Referenced by tarch.plotter.api.output.PointProbe.PointProbe._probe_patch_data().