|
Peano
|
Data structure for adaptive mesh trees in Peano load balancing. More...


Public Member Functions | |
| __init__ (self, name, dimension, domain_offset, domain_size) | |
| Initialize a new Tree object. | |
| number_of_subtrees (self) | |
| number_of_leaves (self) | |
| __str__ (self) | |
| read_in_tree_from_arrays (self, input_tree_arrays, max_level, weighted=False) | |
| read_in_level_array (self, input_level_arrays, subtree_id, level) | |
| read_in_tree_from_artificial (self, input_artificial_arrays, max_level, weighted=False) | |
| update_split_pattern (self) | |
| update_weight (self) | |
Protected Attributes | |
| _name = name | |
| int | _dimension = dimension |
| _domain_offset = domain_offset | |
| _domain_size = domain_size | |
| list | _tree_arrays = [] |
| int | _leaf_count = 0 |
| int | _subtree_count = 0 |
| list | _split_pattern = [] |
| int | _max_level = -1 |
| bool | _weighted = False |
Data structure for adaptive mesh trees in Peano load balancing.
This class represents adaptive mesh trees as sequences of grid levels, where each level is stored as a 2D or 3D array. The tree structure is designed to support offline decomposition and load balancing analysis.
The main content of this class is a series of 2D or 3D arrays with dimension sizes of 3^(level+1), where level ranges from 1 to the maximum depth of the tree. Each entry in the arrays is a tuple of 2 numbers:
Level 1 (3x3 array):
Level 2 (9x9 array):
For adaptive meshes where some regions are not refined, entries have weight 0:
This data structure supports various load balancing operations:
This class works with:
| api.Tree.Tree.__init__ | ( | self, | |
| name, | |||
| dimension, | |||
| domain_offset, | |||
| domain_size ) |
Initialize a new Tree object.
Args: name (str): Descriptive name for the tree (e.g., "RegularGrid" or filename) dimension (int): Spatial dimension (2 for 2D, 3 for 3D) domain_offset (tuple): Physical coordinates of domain origin domain_size (tuple): Physical size of domain in each dimension
| api.Tree.Tree.__str__ | ( | self | ) |
Definition at line 150 of file Tree.py.
References _dimension, api.Project.Project._domain_offset, _domain_offset, exahype2.api.Project.Project._domain_offset, exaparty.api.Project.Project._domain_offset, api.Project.Project._domain_size, _domain_size, exahype2.api.Project.Project._domain_size, exaparty.api.Project.Project._domain_size, _leaf_count, _max_level, api.solvers.Solver.Solver._name, _name, dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling._name, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling._name, exagrype.api.FOSOSolver.FOSOSolver._name, exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling._name, exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling._name, exahype2.api.AuxiliaryVariables.AuxiliaryVariables._name, exahype2.api.dslhype.SyntaxTree.Construction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromDotProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromExisting._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromFunction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromMatrixVectorProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromOperation._name, exahype2.api.dslhype.SyntaxTree.MemoryAllocation._name, exahype2.api.dslhype.SyntaxTree.MemoryDeallocation._name, exahype2.api.Solver.Solver._name, mghype::matrixfree::solvers::Solver._name, peano4.api.dastgen2.Peano4DoubleArray.Peano4DoubleArray._name, peano4.api.dastgen2.Peano4IntegerArray.Peano4IntegerArray._name, peano4.api.dastgen2.Peano4SmartPointerDoubleArray.Peano4SmartPointerDoubleArray._name, peano4::RunMultipleSteps._name, solvers.api.Solver.Solver._name, tarch::services::ServiceRepository::ServiceEntry._name, _split_pattern, and _subtree_count.
| api.Tree.Tree.number_of_leaves | ( | self | ) |
Definition at line 147 of file Tree.py.
References _leaf_count.
| api.Tree.Tree.number_of_subtrees | ( | self | ) |
Definition at line 143 of file Tree.py.
References _subtree_count.
| api.Tree.Tree.read_in_level_array | ( | self, | |
| input_level_arrays, | |||
| subtree_id, | |||
| level ) |
Definition at line 214 of file Tree.py.
References _dimension, and _tree_arrays.
Referenced by read_in_tree_from_arrays().

| api.Tree.Tree.read_in_tree_from_arrays | ( | self, | |
| input_tree_arrays, | |||
| max_level, | |||
| weighted = False ) |
Definition at line 181 of file Tree.py.
References _dimension, _max_level, _subtree_count, _tree_arrays, _weighted, read_in_level_array(), update_split_pattern(), and update_weight().

| api.Tree.Tree.read_in_tree_from_artificial | ( | self, | |
| input_artificial_arrays, | |||
| max_level, | |||
| weighted = False ) |
Definition at line 228 of file Tree.py.
References _max_level, _subtree_count, _tree_arrays, _weighted, update_split_pattern(), and update_weight().

| api.Tree.Tree.update_split_pattern | ( | self | ) |
Definition at line 240 of file Tree.py.
References _dimension, _leaf_count, _max_level, _split_pattern, _subtree_count, and _tree_arrays.
Referenced by read_in_tree_from_arrays(), and read_in_tree_from_artificial().

| api.Tree.Tree.update_weight | ( | self | ) |
Definition at line 268 of file Tree.py.
Referenced by read_in_tree_from_arrays(), and read_in_tree_from_artificial().

|
protected |
Definition at line 125 of file Tree.py.
Referenced by __str__(), read_in_level_array(), read_in_tree_from_arrays(), and update_split_pattern().
|
protected |
|
protected |
Definition at line 127 of file Tree.py.
Referenced by __str__(), and scenarios.scenario.Scenario.set_global_simulation_parameters().
|
protected |
Definition at line 134 of file Tree.py.
Referenced by __str__(), number_of_leaves(), and update_split_pattern().
|
protected |
Definition at line 138 of file Tree.py.
Referenced by __str__(), read_in_tree_from_arrays(), read_in_tree_from_artificial(), and update_split_pattern().
|
protected |
Definition at line 124 of file Tree.py.
Referenced by __str__(), solvers.aderdg.ADERDG.ADERDG.__str__(), solvers.elliptic.AMRMarker.AMRMarker.__str__(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.__str__(), solvers.fv.FV.FV.__str__(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.__str__(), solvers.fv.EnclaveTasking.EnclaveTasking._enclave_task_name(), solvers.aderdg.ADERDG.ADERDG._generate_kernels(), solvers.aderdg.ADERDG.ADERDG._init_dictionary_with_default_parameters(), solvers.fv.FV.FV._init_dictionary_with_default_parameters(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._init_dictionary_with_default_parameters(), solvers.aderdg.ADERDG.ADERDG._interpolate_face_data_default_guard(), solvers.aderdg.SingleSweep.SingleSweep._interpolate_face_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._load_cell_data_default_guard(), solvers.fv.FV.FV._load_cell_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._load_cell_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._load_face_data_default_guard(), solvers.fv.FV.FV._load_face_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._load_face_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._provide_cell_data_to_compute_kernels_default_guard(), solvers.fv.FV.FV._provide_cell_data_to_compute_kernels_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._provide_cell_data_to_compute_kernels_default_guard(), solvers.aderdg.ADERDG.ADERDG._provide_face_data_to_compute_kernels_default_guard(), solvers.fv.FV.FV._provide_face_data_to_compute_kernels_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._provide_face_data_to_compute_kernels_default_guard(), solvers.aderdg.SingleSweep.SingleSweep._restrict_face_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._store_boundary_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._store_cell_data_default_guard(), solvers.fv.FV.FV._store_cell_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._store_cell_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._store_face_data_default_guard(), solvers.fv.FV.FV._store_face_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._store_face_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._unknown_identifier(), solvers.elliptic.AMRMarker.AMRMarker._unknown_identifier(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._unknown_identifier(), solvers.fv.FV.FV._unknown_identifier(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._unknown_identifier(), solvers.fv.FV.FV.add_actions_to_checkpoint_solution(), solvers.fv.EnclaveTasking.EnclaveTasking.add_actions_to_create_grid(), solvers.fv.EnclaveTasking.EnclaveTasking.add_actions_to_init_grid(), solvers.aderdg.ADERDG.ADERDG.add_actions_to_plot_solution(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.add_actions_to_plot_solution(), solvers.fv.FV.FV.add_actions_to_plot_solution(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.add_actions_to_plot_solution(), solvers.fv.EnclaveTasking.EnclaveTasking.add_entries_to_text_replacement_dictionary(), solvers.rkdg.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking.add_entries_to_text_replacement_dictionary(), solvers.aderdg.ADERDG.ADERDG.add_implementation_files_to_project(), solvers.elliptic.AMRMarker.AMRMarker.add_to_Peano4_datamodel(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.add_to_Peano4_datamodel(), solvers.aderdg.SingleSweep.SingleSweep.create_action_sets(), solvers.fv.rusanov.LocalTimeStepWithEnclaveTasking.LocalTimeStepWithEnclaveTasking.create_action_sets(), solvers.fv.rusanov.SubcyclingAdaptiveTimeStepWithEnclaveTasking.SubcyclingAdaptiveTimeStepWithEnclaveTasking.create_action_sets(), solvers.fv.rusanov.SubcyclingFixedTimeStep.SubcyclingFixedTimeStep.create_action_sets(), solvers.fv.rusanov.SubcyclingFixedTimeStepWithEnclaveTasking.SubcyclingFixedTimeStepWithEnclaveTasking.create_action_sets(), solvers.rkdg.SeparateSweeps.SeparateSweeps.create_action_sets(), solvers.fv.SingleSweep.SingleSweep.create_data_structures(), solvers.aderdg.ADERDG.ADERDG.get_name_of_global_instance(), solvers.elliptic.AMRMarker.AMRMarker.get_name_of_global_instance(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.get_name_of_global_instance(), solvers.fv.FV.FV.get_name_of_global_instance(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.get_name_of_global_instance(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.name(), and solvers.fv.FV.FV.name().
|
protected |
Definition at line 136 of file Tree.py.
Referenced by __str__(), and update_split_pattern().
|
protected |
Definition at line 135 of file Tree.py.
Referenced by __str__(), number_of_subtrees(), read_in_tree_from_arrays(), read_in_tree_from_artificial(), and update_split_pattern().
|
protected |
Definition at line 133 of file Tree.py.
Referenced by read_in_level_array(), read_in_tree_from_arrays(), read_in_tree_from_artificial(), and update_split_pattern().
|
protected |
Definition at line 139 of file Tree.py.
Referenced by read_in_tree_from_arrays(), and read_in_tree_from_artificial().