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

Data Structures

class  _PatchFile
 Binary-safe view onto a Peano patch file. More...
 
class  PatchFileParser
 Parser for Peano block file output. More...
 
class  UnknownAttributes
 Helper class to capture all of the attributes we need for each unknown, but were originally fixed to the PatchFileParser class itself. More...
 

Functions

 unknown_names_from_description (description, unknowns)
 Names of the unknowns as stored in the description of a patch file.
 

Function Documentation

◆ unknown_names_from_description()

tarch.plotter.api.input.PatchFileParser.unknown_names_from_description (   description,
  unknowns 
)

Names of the unknowns as stored in the description of a patch file.

Plotters such as exahype2.api.fv.PlotAsVTKFile write the names of the unknowns as comma-separated list into the description, e.g. "h, hu, hv, b". A variable with multiplicity k shows up as k names v[0], ..., v[k-1].

description: String Description of an unknown as read from the patch file.

unknowns: Integer Number of unknowns per degree of freedom.

Returns the list of names, or None if the description does not hold exactly one name per unknown. Names are C++ identifiers, as they stem from the Variables struct of a solver, optionally followed by an index [i]. Any other description is free text, which we do not interpret.

Definition at line 10 of file PatchFileParser.py.