Peano
Loading...
Searching...
No Matches
Patch.py
Go to the documentation of this file.
1# This file is part of the Peano project. For conditions of distribution and
2# use, please see the copyright notice at www.peano-framework.org
3
4
5class Patch(object):
6 """
7 Patch class that contains offset, size and value of a Peano patch.
8
9 Attributes:
10 ----------
11 offset: Tuple
12 Offset of the patch from origin of coordinate system
13
14 size: Tuple
15 Size of patch
16
17 values: List
18 List of values in the patch
19
20 subdomain: integer
21 Integer value which identifies from which subdomain data stems from
22
23 Parameters:
24 ----------
25 file_path: String
26 String of input file path (including filename and extension)
27 Not here anymore. @todo update
28 """
29
30 def __init__(self, offset, size, values, unknown_name, subdomain_number=0):
31 self.offset = offset
32 self.size = size
33 self.values = values
34 self.subdomain_number = subdomain_number
35 self.unknown_name = unknown_name
36 self.unknowns = -1 # should fix this
37
38 def __repr__(self):
39 return (
40 self.unknown_name
41 + ": ("
42 + str(self.offset)
43 + "x"
44 + str(self.size)
45 + ","
46 + str(self.values)
47 + ","
48 + str(self.subdomain_number)
49 + ")"
50 )
Patch class that contains offset, size and value of a Peano patch.
Definition Patch.py:5
__init__(self, offset, size, values, unknown_name, subdomain_number=0)
Definition Patch.py:30