Peano
Loading...
Searching...
No Matches
exaparty.api.graphcompiler.Sequential Namespace Reference

Functions

 translate_one_step_of_species_into_mesh_traversal (step, current_species_set, mesh_traversals, alter_particle_position, use_continuous_particles_sequences, StepType step_type, verbose)
 Translate one step of species into mesh traversal.
 
 map_onto_separate_mesh_traversals_with_generic_mapper (sequence_of_steps, ParticleSortingAndStorage particle_sorting_and_storage, StepType step_type, verbose, mapper)
 Generic mapper of separate steps of separate particles onto mesh traversals.
 
 map_onto_separate_mesh_traversals (sequence_of_steps, ParticleSortingAndStorage particle_sorting_and_storage, StepType step_type, verbose)
 Simpest graph compiler mapping each step per particle onto one mesh traversal.
 
 initialisation_steps_onto_separate_mesh_traversals_multiscale_sort_scattered_memory (species_sets, verbose)
 
 initialisation_steps_onto_separate_mesh_traversals_bucket_sort_scattered_memory (species_sets, verbose)
 
 initialisation_steps_onto_separate_mesh_traversals_multiscale_sort_coalesced_memory (species_sets, verbose)
 
 initialisation_steps_onto_separate_mesh_traversals_bucket_sort_coalesced_memory (species_sets, verbose)
 
 particle_steps_onto_separate_mesh_traversals_multiscale_sort_scattered_memory (species_sets, verbose)
 For a sequential ordering, i.e.
 
 particle_steps_onto_separate_mesh_traversals_bucket_sort_scattered_memory (species_sets, verbose)
 For a sequential ordering, i.e.
 
 particle_steps_onto_separate_mesh_traversals_multiscale_sort_coalesced_memory (species_sets, verbose)
 For a sequential ordering, i.e.
 
 particle_steps_onto_separate_mesh_traversals_bucket_sort_coalesced_memory (species_sets, verbose)
 For a sequential ordering, i.e.
 

Function Documentation

◆ initialisation_steps_onto_separate_mesh_traversals_bucket_sort_coalesced_memory()

exaparty.api.graphcompiler.Sequential.initialisation_steps_onto_separate_mesh_traversals_bucket_sort_coalesced_memory (   species_sets,
  verbose 
)
See also
map_onto_separate_mesh_traversals()
Parameters
concatenate_steps_of_species[Species] Sequence of particle species to be handled.
verbose{True, False}

Definition at line 538 of file Sequential.py.

◆ initialisation_steps_onto_separate_mesh_traversals_bucket_sort_scattered_memory()

exaparty.api.graphcompiler.Sequential.initialisation_steps_onto_separate_mesh_traversals_bucket_sort_scattered_memory (   species_sets,
  verbose 
)
See also
map_onto_separate_mesh_traversals()
Parameters
concatenate_steps_of_species[Species] Sequence of particle species to be handled.
verbose{True, False}

Definition at line 494 of file Sequential.py.

◆ initialisation_steps_onto_separate_mesh_traversals_multiscale_sort_coalesced_memory()

exaparty.api.graphcompiler.Sequential.initialisation_steps_onto_separate_mesh_traversals_multiscale_sort_coalesced_memory (   species_sets,
  verbose 
)
See also
map_onto_separate_mesh_traversals()
Parameters
concatenate_steps_of_species[Species] Sequence of particle species to be handled.
verbose{True, False}

Definition at line 516 of file Sequential.py.

◆ initialisation_steps_onto_separate_mesh_traversals_multiscale_sort_scattered_memory()

exaparty.api.graphcompiler.Sequential.initialisation_steps_onto_separate_mesh_traversals_multiscale_sort_scattered_memory (   species_sets,
  verbose 
)
See also
map_onto_separate_mesh_traversals()
Parameters
concatenate_steps_of_species[Species] Sequence of particle species to be handled.
verbose{True, False}

Definition at line 472 of file Sequential.py.

◆ map_onto_separate_mesh_traversals()

exaparty.api.graphcompiler.Sequential.map_onto_separate_mesh_traversals (   sequence_of_steps,
ParticleSortingAndStorage  particle_sorting_and_storage,
StepType  step_type,
  verbose 
)

Simpest graph compiler mapping each step per particle onto one mesh traversal.

Very simple compiler which takes each individual algorithmic step per species and maps it onto one mesh traversal. We won't get any fancy parallelism besides the core domain decomposition.

As we work with a strictly synchronised way, we can ignore in and outgoing dependencies which affect the global state. They are implicitly handled.

It is important to recognise the inter-dependencies between steps:

We do not have to care about the plotting: It always resorts the particles, and it always re-analyses which particles are local for a tree. Consequently, the plotting will throw away local particle copies if particles have meanwhile left the domain. We may assume that all particles are in the right place after the plotting. We also may assume that the initialisation inserts particles only at the right point. The realisation of this behaviour can be found in Project.generate_Peano4_project().

Due to the observations above, we can conclude that particles might have moved in the first step of the algorithmic sequence if and only if the last step has changed a position. Otherwise, we know that all is in place. As we run through the species one by one, we also have to make this reasoning one by one.

Initialisation

The initialisation is no different to the time stepping besides two places:

  1. We have to use the initialisation steps rather than the algorithm steps.
  2. We have to insert an additional dummy sweep initially. After users have inserted their particles, they are scattered all over the place. If the first initialisation phase then relies on continuous AoS data, it will crash.

The latter "tweak" obviously can be ignored whenever we work without coalesced memory.

Tree statistics

We assume that there is a tree marker already. So our analysis will create it, but we assume that it is already out there, so we don't have to add it actually to the project.

Adaptive mesh refinement

If the mesh changes, we have to resort. In the second step of the sorting, particles might still be dropped. Throughout drops, we may not evaluate particle-particle interactions, as the mesh-particle topology continues to change, so we'll evaluate stuff twice. Therefore, we have to insert dummy steps. This is not a problem when we bucket sort.

Parameters
sequence_of_steps[(Species,Step)] Sequence of tuples each consisting of one species and one step. Typically constructed through functions within SpeciesStepOrdering.py.
particle_sortingParticleSorting
observer_preambleString Usually people pass in "Init" or "Step" here to distinguish observers for the initialisation from the actual particle update steps.
verbose{True, False}
Returns
mesh_traversals

Definition at line 373 of file Sequential.py.

◆ map_onto_separate_mesh_traversals_with_generic_mapper()

exaparty.api.graphcompiler.Sequential.map_onto_separate_mesh_traversals_with_generic_mapper (   sequence_of_steps,
ParticleSortingAndStorage  particle_sorting_and_storage,
StepType  step_type,
  verbose,
  mapper 
)

Generic mapper of separate steps of separate particles onto mesh traversals.

expects a mapper that then defines how to actually map the species plus step combination.

Definition at line 209 of file Sequential.py.

◆ particle_steps_onto_separate_mesh_traversals_bucket_sort_coalesced_memory()

exaparty.api.graphcompiler.Sequential.particle_steps_onto_separate_mesh_traversals_bucket_sort_coalesced_memory (   species_sets,
  verbose 
)

For a sequential ordering, i.e.

1:1 mapping of steps per species onto traversals, it makes no real difference how we order the progress through the individual steps. So I just concatenate the steps per species.

See also
map_onto_separate_mesh_traversals()
Parameters
concatenate_steps_of_species[Species] Sequence of particle species to be handled.
verbose{True, False}

Definition at line 639 of file Sequential.py.

◆ particle_steps_onto_separate_mesh_traversals_bucket_sort_scattered_memory()

exaparty.api.graphcompiler.Sequential.particle_steps_onto_separate_mesh_traversals_bucket_sort_scattered_memory (   species_sets,
  verbose 
)

For a sequential ordering, i.e.

1:1 mapping of steps per species onto traversals, it makes no real difference how we order the progress through the individual steps. So I just concatenate the steps per species.

See also
map_onto_separate_mesh_traversals()
Parameters
concatenate_steps_of_species[Species] Sequence of particle species to be handled.
verbose{True, False}

Definition at line 586 of file Sequential.py.

◆ particle_steps_onto_separate_mesh_traversals_multiscale_sort_coalesced_memory()

exaparty.api.graphcompiler.Sequential.particle_steps_onto_separate_mesh_traversals_multiscale_sort_coalesced_memory (   species_sets,
  verbose 
)

For a sequential ordering, i.e.

1:1 mapping of steps per species onto traversals, it makes no real difference how we order the progress through the individual steps. So I just concatenate the steps per species.

See also
map_onto_separate_mesh_traversals()
Parameters
concatenate_steps_of_species[Species] Sequence of particle species to be handled.
verbose{True, False}

Definition at line 613 of file Sequential.py.

◆ particle_steps_onto_separate_mesh_traversals_multiscale_sort_scattered_memory()

exaparty.api.graphcompiler.Sequential.particle_steps_onto_separate_mesh_traversals_multiscale_sort_scattered_memory (   species_sets,
  verbose 
)

For a sequential ordering, i.e.

1:1 mapping of steps per species onto traversals, it makes no real difference how we order the progress through the individual steps. So I just concatenate the steps per species.

See also
map_onto_separate_mesh_traversals()
Parameters
concatenate_steps_of_species[Species] Sequence of particle species to be handled.
verbose{True, False}

Definition at line 560 of file Sequential.py.

◆ translate_one_step_of_species_into_mesh_traversal()

exaparty.api.graphcompiler.Sequential.translate_one_step_of_species_into_mesh_traversal (   step,
  current_species_set,
  mesh_traversals,
  alter_particle_position,
  use_continuous_particles_sequences,
StepType  step_type,
  verbose 
)

Translate one step of species into mesh traversal.

Takes one step of the species and adds it to the list of steps. That is, you get one more entry within mesh_traversals. Further to that, the routine also appends a boolean arker to alter_particle_position. It shows if the mesh will change the particle position (or search radius) or not. This is decided from step.effect, i.e. whether it is one of the CHANGE_POSITION_OR_INTERACTION_RADIUS(_AND_MIGHT_RERUN) variants.

See also
AlgorithmStep.may_trigger_rerun()

This routine is a helper routine of map_initialisation_steps_onto_separate_mesh_traversals() for example. Note that the returned steps are not fully functionally. If a step alters the particles within the mesh, you still have to resort the particles. That's not done in the step added by this routine, i.e. these steps lack the actual particle sorting. Any sorting has to spread over two steps, so it makes no sense to add it here. Instead, we befill the alter_particle_position, and we expect the calling routine to supplement the actual particle sorting later on in a postprocessing step once all steps are assembled.

Parameters
current_species_setParticle You get a specific algorithmic step as input. The current_species_set highlights to which this step originally belonged to.
mesh_traversals[peano4.api.solversteps.Step] Inout parameter. We append a new step to this sequence.
alter_particle_position[Bool] Inout parameter. We append a new marker to this sequence.

Definition at line 24 of file Sequential.py.