Peano
Loading...
Searching...
No Matches
tarch.plotter.api.input.PatchFileParser.UnknownAttributes Class Reference

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)

Detailed Description

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

Attributes:

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.

Constructor & Destructor Documentation

◆ __init__()

tarch.plotter.api.input.PatchFileParser.UnknownAttributes.__init__ ( self,
unknown_name,
dimensions,
is_data_associated_to_cell )

Definition at line 99 of file PatchFileParser.py.

Member Function Documentation

◆ __repr__()

tarch.plotter.api.input.PatchFileParser.UnknownAttributes.__repr__ ( self)

Definition at line 157 of file PatchFileParser.py.

◆ _initialise_default_mapping_if_no_mapping_specified()

◆ append_patch()

tarch.plotter.api.input.PatchFileParser.UnknownAttributes.append_patch ( self,
patch )

◆ set_celldata()

tarch.plotter.api.input.PatchFileParser.UnknownAttributes.set_celldata ( self,
celldata )

◆ set_description()

tarch.plotter.api.input.PatchFileParser.UnknownAttributes.set_description ( self,
description )

Definition at line 121 of file PatchFileParser.py.

References description.

◆ set_dof()

tarch.plotter.api.input.PatchFileParser.UnknownAttributes.set_dof ( self,
dof )

Definition at line 117 of file PatchFileParser.py.

References dof.

◆ set_mapping()

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.

◆ set_unknowns()

tarch.plotter.api.input.PatchFileParser.UnknownAttributes.set_unknowns ( self,
unknowns )

◆ unknown_names()

tarch.plotter.api.input.PatchFileParser.UnknownAttributes.unknown_names ( self)
See also
unknown_names_from_description()

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.

Here is the call graph for this function:

Field Documentation

◆ cell_data

tarch.plotter.api.input.PatchFileParser.UnknownAttributes.cell_data = []

Definition at line 108 of file PatchFileParser.py.

Referenced by append_patch(), and set_celldata().

◆ description

tarch.plotter.api.input.PatchFileParser.UnknownAttributes.description = ""

Definition at line 107 of file PatchFileParser.py.

Referenced by set_description(), and unknown_names().

◆ dimensions

◆ dof

int tarch.plotter.api.input.PatchFileParser.UnknownAttributes.dof = 0

◆ is_data_associated_to_cell

◆ mapping

tarch.plotter.api.input.PatchFileParser.UnknownAttributes.mapping = []

◆ unknown_name

tarch.plotter.api.input.PatchFileParser.UnknownAttributes.unknown_name = unknown_name

Definition at line 101 of file PatchFileParser.py.

◆ unknowns

tarch.plotter.api.input.PatchFileParser.UnknownAttributes.unknowns = 0

Definition at line 104 of file PatchFileParser.py.

Referenced by set_unknowns(), and unknown_names().


The documentation for this class was generated from the following file: