mus_particle_comm_module Module

mus_particle_comm_module contains the routines used for communication of particle data between processes



Subroutines

public subroutine mus_particles_initialize_communication(particleGroup, scheme, geometry, params)

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), target :: particleGroup

Array of particles

type(mus_scheme_type), intent(inout) :: scheme

Scheme for access to leveldescriptor

type(mus_geom_type), intent(in) :: geometry

Geometry for access to tree

type(mus_param_type), intent(in) :: params

Params for access to dt, dx, etc.

public subroutine mus_particles_comm_init_buffers(particleGroup, nProcs, maxParticles)

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), target :: particleGroup

Array of particles

integer, intent(in) :: nProcs

Number of processes to communicate with

integer, intent(in) :: maxParticles

Maximum number of particles that can be held in communication buffer

public subroutine exchangeParticlesToRemove(this, send, recv, comm, myRank, message_flag)

If a particle is removed from the global domain (e.g. after colliding with an open boundary) then exchangeParticlesToRemove will send messages informing all other processes that this particle should be removed.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: this

particleGroup of this process

type(mus_particles_communication_type), intent(inout) :: send

Communication type for sending force contributions

type(mus_particles_communication_type), intent(inout) :: recv

Communication type for receiving force contributions

integer, intent(in) :: comm

MPI communicator

integer, intent(in) :: myRank

Rank of this process

integer, intent(in) :: message_flag

Flag for message (in Musubi this is just iLevel, don't think we really need this here)

public subroutine exchangeParticlesToRemove_DPS(this, send, recv, comm, myRank, message_flag)

If a particle is removed from the global domain (e.g. after colliding with an open boundary) then exchangeParticlesToRemove will send messages informing all other processes that this particle should be removed.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: this

particleGroup of this process

type(mus_particles_communication_type), intent(inout) :: send

Communication type for sending force contributions

type(mus_particles_communication_type), intent(inout) :: recv

Communication type for receiving force contributions

integer, intent(in) :: comm

MPI communicator

integer, intent(in) :: myRank

Rank of this process

integer, intent(in) :: message_flag

Flag for message (in Musubi this is just iLevel, don't think we really need this here)

public subroutine exchangeForces(this, send, recv, comm, myRank, message_flag)

exchangeForces send force contributions from each process on which a particle exists to the particle owner. The total hydrodynamic force is then computed by the particle owner as the sum of all the force contributions (which physically are the surface forces from the part of the particle surface handled by each process). The owner then updates particle velocity in a subsequent call to a different routine. For momentum-exchange method only!

Arguments

Type IntentOptional Attributes Name
class(mus_particle_group_type), intent(inout) :: this

particleGroup of this process

type(mus_particles_communication_type), intent(inout) :: send

Communication type for sending force contributions

type(mus_particles_communication_type), intent(inout) :: recv

Communication type for receiving force contributions

integer, intent(in) :: comm

MPI communicator

integer, intent(in) :: myRank

Rank of this process

integer, intent(in) :: message_flag

Flag for message (in Musubi this is just iLevel, don't think we really need this here)

public subroutine resetForceBuffers(this)

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: this

particleGroup of this process

public subroutine addCollisionForceToBuffer(particleGroup, recvRankIndex, Fcoll, particleID)

addCollisionForceToBuffer adds DEM collision force Fcoll to the force buffer sent to particle with id particleID on rank recvRankIndex.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: particleGroup

particleGroup of this process

integer :: recvRankIndex

Index of receiving rank in particleGroup%send%buf_force(recvRankIndex)

real(kind=rk), intent(in) :: Fcoll(3)

Collision force to add to buffer

integer, intent(in) :: particleID

ID of particle to which collision force should be applied

public subroutine DEM_exchangeForces_DPS(this, send, recv, comm, myRank, message_flag)

DEM_exchangeForces sends DEM collision force contributions from collisions that cannot be resolved by the receiving process. The send force buffers in this case must already be filled in the DEM collision-handling routines!

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: this

particleGroup of this process

type(mus_particles_communication_type), intent(inout) :: send

Communication type for sending force contributions

type(mus_particles_communication_type), intent(inout) :: recv

Communication type for receiving force contributions

integer, intent(in) :: comm

MPI communicator

integer, intent(in) :: myRank

Rank of this process

integer, intent(in) :: message_flag

Flag for message (in Musubi this is just iLevel, don't think we really need this here)

public subroutine DEM_exchangeForces(this, send, recv, comm, myRank, message_flag)

DEM_exchangeForces sends DEM collision force contributions from collisions that cannot be resolved by the receiving process. The send force buffers in this case must already be filled in the DEM collision-handling routines!

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: this

particleGroup of this process

type(mus_particles_communication_type), intent(inout) :: send

Communication type for sending force contributions

type(mus_particles_communication_type), intent(inout) :: recv

Communication type for receiving force contributions

integer, intent(in) :: comm

MPI communicator

integer, intent(in) :: myRank

Rank of this process

integer, intent(in) :: message_flag

Flag for message (in Musubi this is just iLevel, don't think we really need this here)

public subroutine DEM_exchangeWallPositions(this, send, recv, comm, myRank, message_flag)

DEM_exchangeWallPositions sends wall position sums close to a particle as detected on each process to the particle owner, which averages the results to get one average wall position Upon termination of this routine particle%rwall for all particles which I own should be set correctly.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: this

particleGroup of this process

type(mus_particles_communication_type), intent(inout) :: send

Communication type for sending force contributions

type(mus_particles_communication_type), intent(inout) :: recv

Communication type for receiving force contributions

integer, intent(in) :: comm

MPI communicator

integer, intent(in) :: myRank

Rank of this process

integer, intent(in) :: message_flag

Flag for message (in Musubi this is just iLevel, don't think we really need this here)

public subroutine DEM_exchangeWallPositions_DPS(this, send, recv, comm, myRank, message_flag)

DEM_exchangeWallPositions sends wall position sums close to a particle as detected on each process to the particle owner, which averages the results to get one average wall position Upon termination of this routine particle%rwall for all particles which I own should be set correctly.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: this

particleGroup of this process

type(mus_particles_communication_type), intent(inout) :: send

Communication type for sending force contributions

type(mus_particles_communication_type), intent(inout) :: recv

Communication type for receiving force contributions

integer, intent(in) :: comm

MPI communicator

integer, intent(in) :: myRank

Rank of this process

integer, intent(in) :: message_flag

Flag for message (in Musubi this is just iLevel, don't think we really need this here)

public subroutine exchangePositions(this, send, recv, comm, myRank, message_flag)

exchangePositions exchanges particles continuous positions after they have been updated by the particle owner. Each process sends position updates for particles they own and receives updates for particles which they do not own, but that do exist in their particleGroup.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: this

particleGroup of this process

type(mus_particles_communication_type), intent(inout) :: send

Communication type for sending force contributions

type(mus_particles_communication_type), intent(inout) :: recv

Communication type for receiving force contributions

integer, intent(in) :: comm

MPI communicator

integer, intent(in) :: myRank

Rank of this process

integer, intent(in) :: message_flag

Flag for message (in Musubi this is just iLevel, don't think we really need this here)

public subroutine exchangePositions_DPS(this, send, recv, comm, myRank, message_flag)

exchangePositions exchanges particles continuous positions after they have been updated by the particle owner. Each process sends position updates for particles they own and receives updates for particles which they do not own, but that do exist in their particleGroup.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: this

particleGroup of this process

type(mus_particles_communication_type), intent(inout) :: send

Communication type for sending force contributions

type(mus_particles_communication_type), intent(inout) :: recv

Communication type for receiving force contributions

integer, intent(in) :: comm

MPI communicator

integer, intent(in) :: myRank

Rank of this process

integer, intent(in) :: message_flag

Flag for message (in Musubi this is just iLevel, don't think we really need this here)

public subroutine exchangeVelocities(this, send, recv, comm, myRank, message_flag)

exchangeVelocities exchanges particles continuous velocities after they have been updated by the particle owner. Each process sends velocity updates for particles they own and receives updates for particles which they do not own, but that do exist in their particleGroup.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: this

particleGroup of this process

type(mus_particles_communication_type), intent(inout) :: send

Communication type for sending force contributions

type(mus_particles_communication_type), intent(inout) :: recv

Communication type for receiving force contributions

integer, intent(in) :: comm

MPI communicator

integer, intent(in) :: myRank

Rank of this process

integer, intent(in) :: message_flag

Flag for message (in Musubi this is just iLevel, don't think we really need this here)

public subroutine exchangeVelocities_DPS(this, send, recv, comm, myRank, message_flag)

exchangeVelocities exchanges particles continuous velocities after they have been updated by the particle owner. Each process sends velocity updates for particles they own and receives updates for particles which they do not own, but that do exist in their particleGroup.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: this

particleGroup of this process

type(mus_particles_communication_type), intent(inout) :: send

Communication type for sending force contributions

type(mus_particles_communication_type), intent(inout) :: recv

Communication type for receiving force contributions

integer, intent(in) :: comm

MPI communicator

integer, intent(in) :: myRank

Rank of this process

integer, intent(in) :: message_flag

Flag for message (in Musubi this is just iLevel, don't think we really need this here)

public subroutine exchangeHydroForces_DPS(this, send, recv, comm, myRank, message_flag)

exchangeHydroForces_DPS exchanges particles hydrodynamic forces after they have been updated by the particle owner. Each process sends force updates for particles they own and receives updates for particles which they do not own, but that do exist in their particleGroup.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: this

particleGroup of this process

type(mus_particles_communication_type), intent(inout) :: send

Communication type for sending force contributions

type(mus_particles_communication_type), intent(inout) :: recv

Communication type for receiving force contributions

integer, intent(in) :: comm

MPI communicator

integer, intent(in) :: myRank

Rank of this process

integer, intent(in) :: message_flag

Flag for message (in Musubi this is just iLevel, don't think we really need this here)

public subroutine exchangeParticleStates(this, send, recv, comm, myRank, message_flag)

exchangeParticleStates is used to exchange particle (continuous) position and velocity as well as the integer coordOfOrigin. This is necessary for (for example) the collision handling routines

Arguments

Type IntentOptional Attributes Name
class(mus_particle_group_type), intent(inout) :: this

particleGroup of this process

type(mus_particles_communication_type), intent(inout) :: send

Communication type for sending force contributions

type(mus_particles_communication_type), intent(inout) :: recv

Communication type for receiving force contributions

integer, intent(in) :: comm

MPI communicator

integer, intent(in) :: myRank

Rank of this process

integer, intent(in) :: message_flag

Flag for message (in Musubi this is just iLevel, don't think we really need this here)

public subroutine exchangeNewParticles_MEM(this, send, recv, comm, myRank, message_flag)

exchangeNewParticles sends all the data needed to initialize a particle on a process. This is needed when a particle travels from one process to another. The data is used to add the particle to the receiving process particleGroup. This only creates a continuous representation of the particle on the receiving process. A subsequent call to a different routine then maps this to the discrete representation in the form of elements in the exclusionList.

Arguments

Type IntentOptional Attributes Name
class(mus_particle_group_type), intent(inout) :: this

particleGroup of this process

type(mus_particles_communication_type), intent(inout) :: send

Communication type for sending force contributions

type(mus_particles_communication_type), intent(inout) :: recv

Communication type for receiving force contributions

integer, intent(in) :: comm

MPI communicator

integer, intent(in) :: myRank

Rank of this process

integer, intent(in) :: message_flag

Flag for message (in Musubi this is just iLevel, don't think we really need this here)

public subroutine exchangeNewParticles_DPS(this, send, recv, comm, myRank, message_flag)

exchangeNewParticles sends all the data needed to initialize a particle on a process. This is needed when a particle travels from one process to another. The data is used to add the particle to the receiving process particleGroup. This only creates a continuous representation of the particle on the receiving process. A subsequent call to a different routine then maps this to the discrete representation in the form of elements in the exclusionList.

Arguments

Type IntentOptional Attributes Name
class(mus_particle_group_type), intent(inout) :: this

particleGroup of this process

type(mus_particles_communication_type), intent(inout) :: send

Communication type for sending force contributions

type(mus_particles_communication_type), intent(inout) :: recv

Communication type for receiving force contributions

integer, intent(in) :: comm

MPI communicator

integer, intent(in) :: myRank

Rank of this process

integer, intent(in) :: message_flag

Flag for message (in Musubi this is just iLevel, don't think we really need this here)

public subroutine exchangeMomInc_DPS(this, send, recv, comm, myRank, message_flag)

exchangeMomInc_DPS send the accumulated momentum transfer FROM particles TO fluid from a particle's previous owner to its new owner.

Arguments

Type IntentOptional Attributes Name
type(mus_particle_group_type), intent(inout) :: this

particleGroup of this process

type(mus_particles_communication_type), intent(inout) :: send

Communication type for sending force contributions

type(mus_particles_communication_type), intent(inout) :: recv

Communication type for receiving force contributions

integer, intent(in) :: comm

MPI communicator

integer, intent(in) :: myRank

Rank of this process

integer, intent(in) :: message_flag

Flag for message (in Musubi this is just iLevel, don't think we really need this here)