Description

This class holds functions for processing the system's bodies to determine when a body needs to be sent to another rank for either an update or for creation of a ghost.

The class also decides how to update the comm_status of each body based on its position and its comm_status.

Actions:

A body with an OWNED comm_status will be packed for exchange to create a ghost body on another rank when it passes into one of this rank's shared regions, at which point the body is given a SHARED comm_status on this rank.

A body with a SHARED comm_status will become OWNED when it moves into the owned region on this rank. A body with a SHARED comm_status will become GHOST when it crosses subhi or sublo and the other rank will change its comm_status for the body to SHARED.

A body with a GHOST comm_status will become OWNED when it moves into the owned region of this rank. A body with a GHOST comm_status will be removed when it moves into the one of this rank's unowned regions.

#include <ChCommDistributed.h>

Collaboration diagram for chrono::ChCommDistributed:

Public Member Functions

 ChCommDistributed (ChSystemDistributed *my_sys)
 
void Exchange ()
 Scans the system's data structures for bodies that: More...
 

Protected Attributes

ChSystemDistributedmy_sys
 
MPI_Datatype BodyExchangeType
 MPI Data Types for sending 1) new body 2) body update 3) new collision shape.
 
MPI_Datatype BodyUpdateType
 
MPI_Datatype ShapeType
 
ChParallelDataManagerdata_manager
 Pointer to underlying chrono::parallel data.
 
ChDistributedDataManagerddm
 Set of data for scaffolding on top of chrono::parallel.
 

Member Function Documentation

void ChCommDistributed::Exchange ( )

Scans the system's data structures for bodies that:

  • need to be sent to another rank to create ghosts
  • need to be sent to another rank to update ghosts
  • need to update their comm_status Sends updates via mpi to the appropriate rank Processes incoming updates from other ranks