Peano
Loading...
Searching...
No Matches
Filter.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 Filter(object):
6 """
7 An abstract filter class. Implement render to filter out
8 patches from the data that are not to be displayed.
9 """
10
12 self, run_on_individual_pieces_of_data, run_on_concatenated_data, verbose
13 ):
14 """
15 exploit_idempotent: boolean
16 Exploit the fact that the filter is idempotent, i.e. that we
17 can apply it to fragments of the dataset and then to the whole
18 result again.
19 """
20 self.run_on_individual_pieces_of_data = run_on_individual_pieces_of_data
21 self.run_on_concatenated_data = run_on_concatenated_data
22 self.verbose = verbose
23 pass
24
25 def __str__(self):
26 return (
27 "Filter: "
28 + self.__class__.__name__
29 + ", run on individual pieces of data="
31 + ", run on concatenated data="
32 + str(self.run_on_concatenated_data)
33 + ", verbose="
34 + str(self.verbose)
35 )
36
37 def render(
38 self,
39 cell_data,
40 dof,
41 dimension,
42 unknowns,
43 is_data_associated_to_cell,
44 description,
45 mapping,
46 ):
47 """
48 Overwrite this one for the particular filter.
49
50 cell_data: [Patch]
51 """
52 return (
53 cell_data,
54 dof,
55 dimension,
56 unknowns,
57 is_data_associated_to_cell,
58 description,
59 mapping,
60 )
An abstract filter class.
Definition Filter.py:5
__init__(self, run_on_individual_pieces_of_data, run_on_concatenated_data, verbose)
exploit_idempotent: boolean Exploit the fact that the filter is idempotent, i.e.
Definition Filter.py:13