Peano
Loading...
Searching...
No Matches
peano4.visualisation.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)
 
 set_celldata (self, celldata)
 
 set_mapping (self, mapping)
 
 append_patch (self, patch)
 
 __repr__ (self)
 

Data Fields

 unknown_name
 
 unknowns
 
 dof
 
 description
 
 cell_data
 
 mapping
 
 is_data_associated_to_cell
 
 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 8 of file PatchFileParser.py.

Constructor & Destructor Documentation

◆ __init__()

peano4.visualisation.input.PatchFileParser.UnknownAttributes.__init__ ( self,
unknown_name,
dimensions,
is_data_associated_to_cell )

Definition at line 67 of file PatchFileParser.py.

Member Function Documentation

◆ __repr__()

peano4.visualisation.input.PatchFileParser.UnknownAttributes.__repr__ ( self)

Definition at line 121 of file PatchFileParser.py.

◆ _initialise_default_mapping_if_no_mapping_specified()

peano4.visualisation.input.PatchFileParser.UnknownAttributes._initialise_default_mapping_if_no_mapping_specified ( self)
protected

◆ append_patch()

peano4.visualisation.input.PatchFileParser.UnknownAttributes.append_patch ( self,
patch )

◆ set_celldata()

peano4.visualisation.input.PatchFileParser.UnknownAttributes.set_celldata ( self,
celldata )

◆ set_description()

peano4.visualisation.input.PatchFileParser.UnknownAttributes.set_description ( self,
description )

◆ set_dof()

peano4.visualisation.input.PatchFileParser.UnknownAttributes.set_dof ( self,
dof )

◆ set_mapping()

peano4.visualisation.input.PatchFileParser.UnknownAttributes.set_mapping ( self,
mapping )

◆ set_unknowns()

Field Documentation

◆ cell_data

◆ description

peano4.visualisation.input.PatchFileParser.UnknownAttributes.description

◆ dimensions

peano4.visualisation.input.PatchFileParser.UnknownAttributes.dimensions

Definition at line 79 of file PatchFileParser.py.

Referenced by peano4.visualisation.input.PatchFileParser.PatchFileParser.__parse_meta_data_region(), peano4.visualisation.input.PatchFileParser.PatchFileParser.__parse_patch_region(), exahype2.symhype.PDE.PDE._implementation_of_mapping_onto_named_quantities(), peano4.visualisation.input.PatchFileParser.UnknownAttributes._initialise_default_mapping_if_no_mapping_specified(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.convert_index_to_dim(), equations.euler.Euler.eigenvalues(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.eval_integral(), equations.elastic.Elastic.flux(), equations.euler.Euler.flux(), mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.get_boundary_matrix(), mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.get_cell_from_face_matrix(), mghype.api.matrixgenerators.DLinear.DLinear.get_cell_identity_matrix(), mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.get_cell_identity_matrix(), mghype.api.matrixgenerators.DLinear.DLinear.get_cell_mass_matrix(), mghype.api.matrixgenerators.DLinear.DLinear.get_cell_system_matrix_for_laplacian(), mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.get_cell_system_matrix_for_laplacian(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_deriv(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_points_for_dimension(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_polynomial(), mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.get_projection_matrices(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_weights_for_dimension(), matrices.DgGenerator.getCellToFaceMatrix(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.implementation_of_eigenvalues(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.implementation_of_flux(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.implementation_of_max_eigenvalue(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.implementation_of_ncp(), api.solvers.DiscontinuousGalerkinDiscretisation.DiscontinuousGalerkinDiscretisation.nodes_per_cell(), api.solvers.DiscontinuousGalerkinDiscretisation.DiscontinuousGalerkinDiscretisation.nodes_per_face(), and peano4.visualisation.input.PatchFileParser.PatchFileParser.parse_file().

◆ dof

◆ is_data_associated_to_cell

◆ mapping

◆ unknown_name

peano4.visualisation.input.PatchFileParser.UnknownAttributes.unknown_name

Definition at line 69 of file PatchFileParser.py.

Referenced by peano4.visualisation.input.Patch.Patch.__repr__().

◆ unknowns


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