Neko 1.99.6
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
lpt_migrate Module Reference

Particle redistribution support for LPT.

Data Types

type  lpt_migrate_t
 

Functions/Subroutines

subroutine lpt_migrate_init (this, lag_len, strategy)
 Initialise particle migration settings.
 
subroutine lpt_migrate_free (this)
 Reset migration settings to defaults.
 
subroutine build_even_particle_distribution (n_root, counts, offsets, n_local)
 Build an even rank distribution from the root-rank particle count.
 
subroutine initialize_particle_distribution (this, inertia, particles)
 Apply the initial particle distribution required by the strategy.
 
subroutine migrate_particles (this, global_interp, periodic_bc, inertia, particles)
 Update particle ownership according to the selected migration strategy.
 
subroutine distribute_particles_evenly (this, inertia, particles)
 Distribute particles from rank 0 evenly across all ranks.
 
subroutine distribute_particle_ids (this, ids_old, counts, offsets, n_local, ids_local)
 Scatter particle ids from rank 0 to the current rank.
 
subroutine distribute_particle_scalar (this, scalar_old, counts, offsets, n_local, scalar_local)
 Scatter one particle scalar field from rank 0 to the current rank.
 
subroutine localize_global_interpolation (this, global_interp, n_local)
 Mark interpolation data as local after migration has completed.
 
subroutine migrate_particle_ids (this, migrate_comm, ids_old, n_particles_old, n_local, particle_ids_local)
 Exchange particle ids according to global-interpolation ownership data.
 
subroutine migrate_particle_scalar (this, migrate_comm, scalar_old, n_particles_old, n_local, scalar_local)
 Exchange one particle scalar according to interpolation ownership data.
 

Variables

integer, parameter, public lpt_migrate_to_owner = 1
 
integer, parameter, public lpt_migrate_none = 2
 

Function/Subroutine Documentation

◆ build_even_particle_distribution()

subroutine lpt_migrate::build_even_particle_distribution ( integer, intent(in n_root,
integer, dimension(:), intent(out), allocatable  counts,
integer, dimension(:), intent(out), allocatable  offsets,
integer, intent(out n_local 
)
private
Parameters
n_rootNumber of particles available on rank 0.
countsNumber of particles assigned to each rank.
offsetsParticle offsets into the root-rank arrays.
n_localNumber of particles assigned to this rank.

Definition at line 96 of file lpt_migration.f90.

Here is the caller graph for this function:

◆ distribute_particle_ids()

subroutine lpt_migrate::distribute_particle_ids ( class(lpt_migrate_t), intent(inout this,
integer, dimension(:), intent(in), allocatable  ids_old,
integer, dimension(0:), intent(in counts,
integer, dimension(0:), intent(in offsets,
integer, intent(in n_local,
integer, dimension(:), intent(inout), allocatable  ids_local 
)
private
Parameters
ids_oldRoot-rank particle ids.
countsNumber of ids assigned to each rank.
offsetsOffsets into ids_old.
n_localNumber of ids received by this rank.
ids_localLocal particle ids.

Definition at line 541 of file lpt_migration.f90.

◆ distribute_particle_scalar()

subroutine lpt_migrate::distribute_particle_scalar ( class(lpt_migrate_t), intent(inout this,
type(vector_t), intent(inout scalar_old,
integer, dimension(0:), intent(in counts,
integer, dimension(0:), intent(in offsets,
integer, intent(in n_local,
type(vector_t), intent(inout scalar_local 
)
private
Parameters
scalar_oldRoot-rank scalar values.
countsNumber of values assigned to each rank.
offsetsOffsets into scalar_old.
n_localNumber of values received by this rank.
scalar_localLocal scalar values.

Definition at line 569 of file lpt_migration.f90.

◆ distribute_particles_evenly()

subroutine lpt_migrate::distribute_particles_evenly ( class(lpt_migrate_t), intent(inout this,
logical, intent(in inertia,
type(particles_t), intent(inout particles 
)
private
Parameters
inertiaWhether particles carry inertial state.
particlesParticle storage to redistribute.

Definition at line 363 of file lpt_migration.f90.

Here is the call graph for this function:

◆ initialize_particle_distribution()

subroutine lpt_migrate::initialize_particle_distribution ( class(lpt_migrate_t), intent(inout this,
logical, intent(in inertia,
type(particles_t), intent(inout particles 
)
private
Parameters
inertiaWhether particles carry inertial state.
particlesParticle storage to distribute.

Definition at line 125 of file lpt_migration.f90.

◆ localize_global_interpolation()

subroutine lpt_migrate::localize_global_interpolation ( class(lpt_migrate_t), intent(inout this,
type(global_interpolation_t), intent(inout global_interp,
integer, intent(in n_local 
)
private
Parameters
global_interpInterpolation object to update.
n_localNumber of local particles.

Definition at line 596 of file lpt_migration.f90.

◆ lpt_migrate_free()

subroutine lpt_migrate::lpt_migrate_free ( class(lpt_migrate_t), intent(inout this)
private

Definition at line 84 of file lpt_migration.f90.

◆ lpt_migrate_init()

subroutine lpt_migrate::lpt_migrate_init ( class(lpt_migrate_t), intent(inout this,
integer, intent(in lag_len,
integer, intent(in), optional  strategy 
)
Parameters
lag_lenNumber of lagged RHS levels carried by particles.
strategyOptional migration strategy identifier.

Definition at line 73 of file lpt_migration.f90.

◆ migrate_particle_ids()

subroutine lpt_migrate::migrate_particle_ids ( class(lpt_migrate_t), intent(inout this,
type(glb_intrp_comm_t), intent(inout migrate_comm,
integer, dimension(:), intent(in), allocatable  ids_old,
integer, intent(in n_particles_old,
integer, intent(in n_local,
integer, dimension(:), intent(inout), allocatable  particle_ids_local 
)
private
Parameters
migrate_commRedistribution communicator from interpolation.
ids_oldParticle ids before migration.
n_particles_oldNumber of particles before migration.
n_localNumber of particles after migration.
particle_ids_localParticle ids after migration.

Definition at line 615 of file lpt_migration.f90.

◆ migrate_particle_scalar()

subroutine lpt_migrate::migrate_particle_scalar ( class(lpt_migrate_t), intent(inout this,
type(glb_intrp_comm_t), intent(inout migrate_comm,
type(vector_t), intent(inout scalar_old,
integer, intent(in n_particles_old,
integer, intent(in n_local,
type(vector_t), intent(inout scalar_local 
)
private
Parameters
migrate_commRedistribution communicator from interpolation.
scalar_oldScalar values before migration.
n_particles_oldNumber of particles before migration.
n_localNumber of particles after migration.
scalar_localScalar values after migration.

Definition at line 649 of file lpt_migration.f90.

◆ migrate_particles()

subroutine lpt_migrate::migrate_particles ( class(lpt_migrate_t), intent(inout this,
type(global_interpolation_t), intent(inout global_interp,
type(lpt_periodic_bc_t), intent(inout periodic_bc,
logical, intent(in inertia,
type(particles_t), intent(inout particles 
)
private
Parameters
global_interpInterpolation object used to locate particle owners.
periodic_bcPeriodic wrapper applied before ownership lookup.
inertiaWhether particles carry inertial state.
particlesParticle storage to migrate.

Definition at line 140 of file lpt_migration.f90.

Variable Documentation

◆ lpt_migrate_none

integer, parameter, public lpt_migrate::lpt_migrate_none = 2

Definition at line 50 of file lpt_migration.f90.

◆ lpt_migrate_to_owner

integer, parameter, public lpt_migrate::lpt_migrate_to_owner = 1

Definition at line 49 of file lpt_migration.f90.