|
Peano
|
Helper class to capture all of the attributes we need for each unknown, but were originally fixed to the PatchFileParser class itself. More...
Public Member Functions | |
| __init__ (self, unknown_name, dimensions, is_data_associated_to_cell) | |
| set_unknowns (self, unknowns) | |
| set_dof (self, dof) | |
| set_description (self, description) | |
| unknown_names (self) | |
| set_celldata (self, celldata) | |
| set_mapping (self, mapping) | |
| append_patch (self, patch) | |
| __repr__ (self) | |
Data Fields | |
| unknown_name = unknown_name | |
| int | unknowns = 0 |
| int | dof = 0 |
| str | description = "" |
| list | cell_data = [] |
| list | mapping = [] |
| is_data_associated_to_cell = is_data_associated_to_cell | |
| dimensions = dimensions | |
Protected Member Functions | |
| _initialise_default_mapping_if_no_mapping_specified (self) | |
Helper class to capture all of the attributes we need for each unknown, but were originally fixed to the PatchFileParser class itself.
For instance, at time of writing the vis scripts cannot handle displaying separate vtu files for different data that is produced in Peano patch files. An excerpt:
begin patch offset 9.629630e-01 9.629630e-01 size 3.703704e-02 3.703704e-02 begin vertex-values "value" 0 0 0 0 end vertex-values begin vertex-values "rhs" 0 0 0 0 end vertex-values end patch
Previously, the only thing that would get parsed is the "value" field, before moving on. We aim to get it to do the "rhs" part as well.
However, we cannot assume that the number of dofs per axis or unknowns per patch volume will be the same for both. So we create this helper class to hold those.
We fix is_data_associated_to_cell to be the same as the PatchFileParser object which, in turn, means they must be the same for all of the unknowns
file_path: String String of input file path (including filename and extension)
cell_data: list of patches List of Patches with file data
dimensions: Integer Dimension of domains
dof: Integer Number of degrees of freedom per axis
unknowns: Integer Number of unknowns per patch volume
mapping: series of d-dimensional tuples Distorts the domain
set_identifier: String Can be empty to parse everything.
Definition at line 40 of file PatchFileParser.py.
| tarch.plotter.api.input.PatchFileParser.UnknownAttributes.__init__ | ( | self, | |
| unknown_name, | |||
| dimensions, | |||
| is_data_associated_to_cell ) |
Definition at line 99 of file PatchFileParser.py.
| tarch.plotter.api.input.PatchFileParser.UnknownAttributes.__repr__ | ( | self | ) |
Definition at line 157 of file PatchFileParser.py.
|
protected |
Definition at line 136 of file PatchFileParser.py.
References api.solvers.DiscontinuousGalerkinDiscretisation.DiscontinuousGalerkinDiscretisation.dimensions, convert::data::PatchData.dimensions, convert::data::Variable.dimensions, exahype2.api.dslhype2.Types.TVector.dimensions, mghype.api.matrixgenerators.DLinear.DLinear.dimensions, mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.dimensions, mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.dimensions, mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.dimensions, mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.dimensions, dimensions, dof, is_data_associated_to_cell, exahype2::ccz4::ahf::PostprocessOptions.mapping, and mapping.
| tarch.plotter.api.input.PatchFileParser.UnknownAttributes.append_patch | ( | self, | |
| patch ) |
Definition at line 154 of file PatchFileParser.py.
References peano4.api.datamodel.Model.Model.cell_data, peano4.api.solversteps.Step.Step.cell_data, peano4.api.taskgraph.Task.Task.cell_data, and cell_data.
| tarch.plotter.api.input.PatchFileParser.UnknownAttributes.set_celldata | ( | self, | |
| celldata ) |
Definition at line 128 of file PatchFileParser.py.
References peano4.api.datamodel.Model.Model.cell_data, peano4.api.solversteps.Step.Step.cell_data, peano4.api.taskgraph.Task.Task.cell_data, and cell_data.
| tarch.plotter.api.input.PatchFileParser.UnknownAttributes.set_description | ( | self, | |
| description ) |
Definition at line 121 of file PatchFileParser.py.
References description.
| tarch.plotter.api.input.PatchFileParser.UnknownAttributes.set_dof | ( | self, | |
| dof ) |
Definition at line 117 of file PatchFileParser.py.
References dof.
| tarch.plotter.api.input.PatchFileParser.UnknownAttributes.set_mapping | ( | self, | |
| mapping ) |
Definition at line 132 of file PatchFileParser.py.
References exahype2::ccz4::ahf::PostprocessOptions.mapping, and mapping.
| tarch.plotter.api.input.PatchFileParser.UnknownAttributes.set_unknowns | ( | self, | |
| unknowns ) |
Definition at line 113 of file PatchFileParser.py.
References convert::data::Variable.unknowns, tarch.plotter.api.input.Patch.Patch.unknowns, and unknowns.
| tarch.plotter.api.input.PatchFileParser.UnknownAttributes.unknown_names | ( | self | ) |
Definition at line 124 of file PatchFileParser.py.
References description, tarch.plotter.api.input.PatchFileParser.unknown_names_from_description(), convert::data::Variable.unknowns, tarch.plotter.api.input.Patch.Patch.unknowns, and unknowns.

| tarch.plotter.api.input.PatchFileParser.UnknownAttributes.cell_data = [] |
Definition at line 108 of file PatchFileParser.py.
Referenced by append_patch(), and set_celldata().
| tarch.plotter.api.input.PatchFileParser.UnknownAttributes.description = "" |
Definition at line 107 of file PatchFileParser.py.
Referenced by set_description(), and unknown_names().
| tarch.plotter.api.input.PatchFileParser.UnknownAttributes.dimensions = dimensions |
Definition at line 111 of file PatchFileParser.py.
Referenced by tarch.plotter.api.input.PatchFileParser.PatchFileParser.__parse_meta_data_region(), tarch.plotter.api.input.PatchFileParser.PatchFileParser.__parse_patch_region(), tarch.plotter.api.input.PatchFileParser.PatchFileParser.__record_doubles_per_patch(), _initialise_default_mapping_if_no_mapping_specified(), equations.euler.Euler.eigenvalues(), equations.elastic.Elastic.flux(), equations.euler.Euler.flux(), matrices.DgGenerator.getCellToFaceMatrix(), and tarch.plotter.api.input.PatchFileParser.PatchFileParser.parse_file().
| int tarch.plotter.api.input.PatchFileParser.UnknownAttributes.dof = 0 |
Definition at line 106 of file PatchFileParser.py.
Referenced by _initialise_default_mapping_if_no_mapping_specified(), and set_dof().
| tarch.plotter.api.input.PatchFileParser.UnknownAttributes.is_data_associated_to_cell = is_data_associated_to_cell |
Definition at line 110 of file PatchFileParser.py.
Referenced by tarch.plotter.api.input.PatchFileParser.PatchFileParser.__parse_meta_data_region(), tarch.plotter.api.input.PatchFileParser.PatchFileParser.__parse_patch_region(), _initialise_default_mapping_if_no_mapping_specified(), and tarch.plotter.api.input.PatchFileParser.PatchFileParser.parse_file().
| tarch.plotter.api.input.PatchFileParser.UnknownAttributes.mapping = [] |
Definition at line 109 of file PatchFileParser.py.
Referenced by _initialise_default_mapping_if_no_mapping_specified(), and set_mapping().
| tarch.plotter.api.input.PatchFileParser.UnknownAttributes.unknown_name = unknown_name |
Definition at line 101 of file PatchFileParser.py.
| tarch.plotter.api.input.PatchFileParser.UnknownAttributes.unknowns = 0 |
Definition at line 104 of file PatchFileParser.py.
Referenced by set_unknowns(), and unknown_names().