Peano
Loading...
Searching...
No Matches
35_offline-load-balancing-split-modes Namespace Reference

Functions

 offline_decomposition (modes)
 Arguments of the hardcoded load balancing with the given split modes.
 
 read_subdomains (directory)
 Subdomain of each fine grid cell, read from the first snapshot's patch files.
 
 read_cells_per_tree (directory)
 Cells per tree as Peano reports them in the last load balancing statistics of run.log.
 
 draw_tree_sketch (axis, title, owners, caption)
 Draw a one-dimensional spacetree with three levels.
 
 draw_subdomains (axis, directory, title)
 Draw the subdomains of a run together with Peano's cell counts per tree.
 
 render (top_down_directory, bottom_up_directory, picture=SplitModesPicture)
 

Variables

 Here = os.path.dirname(os.path.abspath(__file__))
 
 _specification
 
 offline_load_balancing = importlib.util.module_from_spec(_specification)
 
 domain_decomposition = offline_load_balancing.domain_decomposition
 
 SplitModesPicture = os.path.join(Here, "35_offline-load-balancing-split-modes.png")
 
list TreeColours = ["#4c72b0", "#dd8452", "#55a868", "#c44e52"]
 
int CellsPerAxis = 27
 
float DomainOffset = -0.1
 
float DomainSize = 0.2
 
 parser
 
 default
 
 help
 
 args = parser.parse_args()
 
 work_directory
 
dict directories = {}
 
 exist_ok
 
 tutorial
 
 namespace
 
 load_balancer
 
 load_balancer_arguments
 

Function Documentation

◆ draw_subdomains()

35_offline-load-balancing-split-modes.draw_subdomains (   axis,
  directory,
  title 
)

Draw the subdomains of a run together with Peano's cell counts per tree.

Definition at line 181 of file 35_offline-load-balancing-split-modes.py.

References read_cells_per_tree(), and read_subdomains().

Referenced by render().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_tree_sketch()

35_offline-load-balancing-split-modes.draw_tree_sketch (   axis,
  title,
  owners,
  caption 
)

Draw a one-dimensional spacetree with three levels.

owners holds the owner per level, i.e. a list with 1, 3 and 9 entries.

Definition at line 147 of file 35_offline-load-balancing-split-modes.py.

Referenced by render().

Here is the caller graph for this function:

◆ offline_decomposition()

35_offline-load-balancing-split-modes.offline_decomposition (   modes)

Arguments of the hardcoded load balancing with the given split modes.

Definition at line 60 of file 35_offline-load-balancing-split-modes.py.

References Decomposition.equidistant_splitting(), RegularGridGenerator.RegularGridGenerator(), and SplitTrees.split_tree().

Here is the call graph for this function:

◆ read_cells_per_tree()

35_offline-load-balancing-split-modes.read_cells_per_tree (   directory)

Cells per tree as Peano reports them in the last load balancing statistics of run.log.

Definition at line 140 of file 35_offline-load-balancing-split-modes.py.

Referenced by draw_subdomains().

Here is the caller graph for this function:

◆ read_subdomains()

35_offline-load-balancing-split-modes.read_subdomains (   directory)

Subdomain of each fine grid cell, read from the first snapshot's patch files.

The patch files hold one file per tree, but neither the file names nor the order in which the trees write their files tell us the tree number. We only know that tree 0 is the one tree which holds the cells along the periodic boundary. The result therefore holds 0 for tree 0 and 1, 2, ... for the other trees, numbered by the position of their first cell along the space-filling curve. These numbers are not necessarily Peano's tree numbers, as Peano runs through the curve forth and back in alternating mesh sweeps.

Definition at line 78 of file 35_offline-load-balancing-split-modes.py.

References SFC.Peano_to_Cartesian_2d().

Referenced by draw_subdomains().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ render()

35_offline-load-balancing-split-modes.render (   top_down_directory,
  bottom_up_directory,
  picture = SplitModesPicture 
)

Definition at line 205 of file 35_offline-load-balancing-split-modes.py.

References draw_subdomains(), and draw_tree_sketch().

Here is the call graph for this function:

Variable Documentation

◆ _specification

35_offline-load-balancing-split-modes._specification
protected
Initial value:
1= importlib.util.spec_from_file_location(
2 "offline_load_balancing_illustrations",
3 os.path.join(Here, "35_offline-load-balancing.py"),
4)

Definition at line 38 of file 35_offline-load-balancing-split-modes.py.

◆ args

35_offline-load-balancing-split-modes.args = parser.parse_args()

Definition at line 261 of file 35_offline-load-balancing-split-modes.py.

◆ CellsPerAxis

int 35_offline-load-balancing-split-modes.CellsPerAxis = 27

Definition at line 55 of file 35_offline-load-balancing-split-modes.py.

◆ default

35_offline-load-balancing-split-modes.default

Definition at line 253 of file 35_offline-load-balancing-split-modes.py.

◆ directories

dict 35_offline-load-balancing-split-modes.directories = {}

Definition at line 267 of file 35_offline-load-balancing-split-modes.py.

◆ domain_decomposition

35_offline-load-balancing-split-modes.domain_decomposition = offline_load_balancing.domain_decomposition

Definition at line 44 of file 35_offline-load-balancing-split-modes.py.

◆ DomainOffset

float 35_offline-load-balancing-split-modes.DomainOffset = -0.1

Definition at line 56 of file 35_offline-load-balancing-split-modes.py.

◆ DomainSize

float 35_offline-load-balancing-split-modes.DomainSize = 0.2

Definition at line 57 of file 35_offline-load-balancing-split-modes.py.

◆ exist_ok

35_offline-load-balancing-split-modes.exist_ok

Definition at line 270 of file 35_offline-load-balancing-split-modes.py.

◆ help

35_offline-load-balancing-split-modes.help

Definition at line 254 of file 35_offline-load-balancing-split-modes.py.

◆ Here

35_offline-load-balancing-split-modes.Here = os.path.dirname(os.path.abspath(__file__))

Definition at line 35 of file 35_offline-load-balancing-split-modes.py.

◆ load_balancer

35_offline-load-balancing-split-modes.load_balancer

Definition at line 276 of file 35_offline-load-balancing-split-modes.py.

◆ load_balancer_arguments

35_offline-load-balancing-split-modes.load_balancer_arguments

Definition at line 277 of file 35_offline-load-balancing-split-modes.py.

◆ namespace

35_offline-load-balancing-split-modes.namespace

Definition at line 275 of file 35_offline-load-balancing-split-modes.py.

◆ offline_load_balancing

35_offline-load-balancing-split-modes.offline_load_balancing = importlib.util.module_from_spec(_specification)

Definition at line 42 of file 35_offline-load-balancing-split-modes.py.

◆ parser

35_offline-load-balancing-split-modes.parser
Initial value:
1= argparse.ArgumentParser(
2 description="Create the split-mode PNG of the tutorial 35_offline-load-balancing.ipynb"
3 )

Definition at line 248 of file 35_offline-load-balancing-split-modes.py.

◆ SplitModesPicture

35_offline-load-balancing-split-modes.SplitModesPicture = os.path.join(Here, "35_offline-load-balancing-split-modes.png")

Definition at line 52 of file 35_offline-load-balancing-split-modes.py.

◆ TreeColours

list 35_offline-load-balancing-split-modes.TreeColours = ["#4c72b0", "#dd8452", "#55a868", "#c44e52"]

Definition at line 54 of file 35_offline-load-balancing-split-modes.py.

◆ tutorial

35_offline-load-balancing-split-modes.tutorial

Definition at line 274 of file 35_offline-load-balancing-split-modes.py.

◆ work_directory

35_offline-load-balancing-split-modes.work_directory
Initial value:
1= args.work_directory or tempfile.mkdtemp(
2 prefix="35_offline-load-balancing-split-modes-"
3 )

Definition at line 263 of file 35_offline-load-balancing-split-modes.py.