version 0.6.0
Loading...
Searching...
No Matches
type_particle_list Module Reference

The particle list type.

Data Types

type  t_particle_list
 The generic particle list. More...
 

Functions/Subroutines

subroutine t_particle_list_init (self, ndata, n, maxn)
 Initialize the list with a given number of elements and max elements.
 
subroutine t_particle_list_copy (self, particle_list_to_copy, maxn)
 Initialize the list with a given number of elements and max elements.
 
subroutine t_particle_list_resize (self, n)
 Change the size of the particle list.
 
subroutine t_particle_list_mpi_exchange (self)
 Exchange the particles with the neighbooring nodes if outside the local domain.
 
subroutine t_particle_list_set_advection_method (self, method)
 Set the advection method Accepted values:
 
subroutine t_particle_list_advect (self, dt_nm1, dt_n, dt, velocity_nm1, velocity_n, velocity_np1, interpolant)
 Advect the particle list with the advection method.
 
recursive subroutine t_particle_list_relocalize (self, exchange)
 Relocalize the particles in the domain or in foreign MPI nodes.
 
subroutine t_particle_list_clamp (self, nghosts_allowed)
 Clamp the particles inside the effective usable domain This is done for security matters as no particle should live outside the domain before advection.
 
subroutine t_particle_list_print (self)
 

Variables

integer, parameter default_max_elements = 100
 

Function/Subroutine Documentation

◆ t_particle_list_clamp()

subroutine type_particle_list::t_particle_list_clamp ( class(t_particle_list), intent(inout) self,
integer, intent(in) nghosts_allowed )
Parameters
[in,out]selfthe element
[in]nghosts_allowedthe number of ghosts that we allow

◆ t_particle_list_copy()

subroutine type_particle_list::t_particle_list_copy ( class(t_particle_list), intent(inout) self,
class(t_particle_list), intent(in) particle_list_to_copy,
integer, intent(in), optional maxn )
Parameters
[in,out]selfthe element
[in]particle_list_to_copythe particle list to copy
[in]maxN(optional) restrict the maximum number of particles (for efficiency matters).
Precondition
max_nelements > to particle_list_to_copynelements

◆ t_particle_list_init()

subroutine type_particle_list::t_particle_list_init ( class(t_particle_list), intent(inout) self,
integer, intent(in) ndata,
integer, intent(in) n,
integer, intent(in), optional maxn )
Parameters
[in,out]selfthe element to initialize
[in]ndatathe number of real data for each particle
[in]Nthe wanted number of particles (must be smaller than maxN); can be null
[in]maxN*(optional)* the maximum number of particles (for efficiency matters)
Precondition
N>=0 && N<=maxN

◆ t_particle_list_mpi_exchange()

subroutine type_particle_list::t_particle_list_mpi_exchange ( class(t_particle_list), intent(inout) self)
Todo
This could be done with less memory usage by using a map of destination nodes or a real list of outgoing particles
Note
If some particles reside outside the physical domain, we leave them in the current node
For efficiency, the neighbours outsiders are stored in a t_particle_list

The particle iterator

The number of outsiders

The outsider particles that has to be sent

The destination node (can be our own rank node) We have to use the relative neighbour information in order to avoid problems with periodic bnd (with 1 node that can be left neighbour as well as right)

◆ t_particle_list_relocalize()

recursive subroutine type_particle_list::t_particle_list_relocalize ( class(t_particle_list), intent(inout) self,
logical, intent(in), optional exchange )
Parameters
[in,out]selfthe element
[in]exchange*(optional)* if true, force the relocalization, even with periodic boundaries (this is used when exchanging with neighbour processors)

◆ t_particle_list_resize()

subroutine type_particle_list::t_particle_list_resize ( class(t_particle_list), intent(inout) self,
integer, intent(in) n )
Note
It does not affect the actual max_nelements if N<=selfmax_nelements. Otherwise, reallocate the array and augment the max_nelements sufficiently (max=max+N)

◆ t_particle_list_set_advection_method()

subroutine type_particle_list::t_particle_list_set_advection_method ( class(t_particle_list), intent(inout) self,
integer, intent(in) method )
  • time_order_1
  • time_order_RK2