PLUTO
4.4-patch2
|
Define MPI data-type structure for MPI communications. More...
Functions | |
void | Particles_SetID (particleNode *PHead) |
Define the MPI Datatype of the Particle structure so that it can be passed among processors. This has to be done for each PARTICLES type depending on the quantities present in the structure.
References http://mpi.deino.net/mpi_functions/MPI_Type_create_struct.html https://stackoverflow.com/questions/33618937/trouble-understanding-mpi-type-create-struct https://stackoverflow.com/questions/9864510/struct-serialization-in-c-and-transfer-over-mpi
void Particles_SetID | ( | particleNode * | PHead | ) |
Assign id to newly injected particles. The id is incrementally assigned starting from the global counter p_idCounter.
|--------------|--------------|--------------|--------------|
[A] 1,2,3 4,5 6 7,8 = N0
[B] +dn(0)=2 +dn(1)=5 +dn(2)=3 +dn(3)=4
The new id must take the value:
rank #0: 1,2,3, [N0+1, N0+dn(0)] rank #1: 4,5, [N0+dn(0)+1, N0+dn(0)+dn(1)+1] rank #2: 6, [N0+dn(0)+dn(1)+1, N0+dn(0)+dn(1)+dn(2)+1] ...