The generic particle list.
More...
|
| procedure, non_overridable | init (self, ndata, n, maxn) |
| | Initialize the list with a given number of elements and max elements.
|
| |
| procedure, non_overridable | copy (self, particle_list_to_copy, maxn) |
| | Initialize the list with a given number of elements and max elements.
|
| |
| procedure, non_overridable | resize (self, n) |
| | Change the size of the particle list.
|
| |
| procedure, non_overridable | relocalize (self, exchange) |
| | Relocalize the particles in the domain or in foreign MPI nodes.
|
| |
| procedure, non_overridable | set_advection_method (self, method) |
| | Set the advection method Accepted values:
|
| |
| procedure, non_overridable | advect (self, dt_nm1, dt_n, dt, velocity_nm1, velocity_n, velocity_np1, interpolant) |
| | Advect the particle list with the advection method.
|
| |
| procedure, non_overridable | print (self) |
| | Debug purposes.
|
| |
|
| procedure, non_overridable, private | mpi_exchange (self) |
| | Exchange the particles with the neighbooring nodes if outside the local domain.
|
| |
| procedure, non_overridable, private | 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.
|
| |
The generic particle list.
◆ advect()
| procedure, non_overridable type_particle_list::t_particle_list::advect |
( |
class(t_particle_list), intent(inout) | self, |
|
|
double precision, intent(in) | dt_nm1, |
|
|
double precision, intent(in) | dt_n, |
|
|
double precision, intent(in) | dt, |
|
|
type(t_face_field), intent(in) | velocity_nm1, |
|
|
type(t_face_field), intent(in) | velocity_n, |
|
|
type(t_face_field), intent(in) | velocity_np1, |
|
|
class(t_rec_point_3d), intent(inout) | interpolant ) |
|
final |
Advect the particle list with the advection method.
◆ clamp()
| procedure, non_overridable, private type_particle_list::t_particle_list::clamp |
( |
class(t_particle_list), intent(inout) | self, |
|
|
integer, intent(in) | nghosts_allowed ) |
|
finalprivate |
Clamp the particles inside the effective usable domain This is done for security matters as no particle should live outside the domain before advection.
- Parameters
-
| [in,out] | self | the element |
| [in] | nghosts_allowed | the number of ghosts that we allow |
◆ copy()
| procedure, non_overridable 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 ) |
|
final |
Initialize the list with a given number of elements and max elements.
- Parameters
-
| [in,out] | self | the element |
| [in] | particle_list_to_copy | the particle list to copy |
| [in] | maxN | (optional) restrict the maximum number of particles (for efficiency matters). |
- Precondition
- max_nelements > to particle_list_to_copynelements
◆ init()
| procedure, non_overridable 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 ) |
|
final |
Initialize the list with a given number of elements and max elements.
- Parameters
-
| [in,out] | self | the element to initialize |
| [in] | ndata | the number of real data for each particle |
| [in] | N | the 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
◆ mpi_exchange()
| procedure, non_overridable, private type_particle_list::t_particle_list::mpi_exchange |
( |
class(t_particle_list), intent(inout) | self | ) |
|
|
finalprivate |
Exchange the particles with the neighbooring nodes if outside the local domain.
- 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
◆ print()
| procedure, non_overridable type_particle_list::t_particle_list::print |
( |
class(t_particle_list), intent(inout) | self | ) |
|
|
final |
◆ relocalize()
| procedure, non_overridable type_particle_list::t_particle_list::relocalize |
( |
class(t_particle_list), intent(inout) | self, |
|
|
logical, intent(in), optional | exchange ) |
|
final |
Relocalize the particles in the domain or in foreign MPI nodes.
- Parameters
-
| [in,out] | self | the element |
| [in] | exchange | (optional) if true, force the relocalization, even with periodic boundaries (this is used when exchanging with neighbour processors) |
◆ resize()
| procedure, non_overridable type_particle_list::t_particle_list::resize |
( |
class(t_particle_list), intent(inout) | self, |
|
|
integer, intent(in) | n ) |
|
final |
Change the size of the particle list.
- 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)
◆ set_advection_method()
| procedure, non_overridable type_particle_list::t_particle_list::set_advection_method |
( |
class(t_particle_list), intent(inout) | self, |
|
|
integer, intent(in) | method ) |
|
final |
Set the advection method Accepted values:
- time_order_1
- time_order_RK2
◆ advection_method
◆ data
| double precision, dimension(:,:), allocatable type_particle_list::t_particle_list::data |
The data associated to each particle. It is indexed as (ndata:nparticles).
◆ max_nelements
The maximum number of elements (can be resized)
◆ ndata
| integer type_particle_list::t_particle_list::ndata |
The number of double data associated to each particles.
◆ ndim
| integer type_particle_list::t_particle_list::ndim |
The number of dimensions.
◆ nelements
| integer type_particle_list::t_particle_list::nelements |
The effective number of elements.
◆ particles
| type(t_particle), dimension(:), allocatable type_particle_list::t_particle_list::particles |
The documentation for this type was generated from the following file: