chrono::ChDistributedDataManager Class Reference

Description

A class for storing data for maintaining a consistent view of a distributed simulation consisting of multiple wrapped instances of ChSystemParallelSMC.

#include <ChDistributedDataManager.h>

Collaboration diagram for chrono::ChDistributedDataManager:

Public Member Functions

 ChDistributedDataManager (ChSystemDistributed *my_sys)
 
int GetLocalIndex (unsigned int gid)
 Returns the local index of a body, given its global id. More...
 
void DefragmentFreeList ()
 Internal function for cleaning free list that tracks space for shapes. More...
 

Public Attributes

bool initial_add
 Indicates that the system is undergoing its inital setup. More...
 
std::vector< unsigned int > global_id
 Global id of each body. Maps local index to global index.
 
std::vector< distributed::COMM_STATUScomm_status
 Communication status of each body.
 
std::vector< distributed::COMM_STATUScurr_status
 Used as a reference only by ChCommDistributed.
 
std::unordered_map< uint, int > gid_to_localid
 Maps gloabl id to local id on this rank.
 
ChParallelDataManagerdata_manager
 Pointer to the main Chrono::Parallel Data Manager.
 
ChSystemDistributedmy_sys
 Pointer to the main dynamical system.
 
std::vector< int > body_shape_start
 Start index in this->body_shapes of the shapes associated with this local BODY index.
 
std::vector< int > body_shape_count
 Number of shapes associated with this local BODY index.
 
std::vector< int > body_shapes
 Indices of shape in DATA_MANAGER->shape_data struct for a given SHAPE.
 
struct LocalShapeNodelocal_free_shapes
 Linked-list of BLOCKS in ddm->body_shapes, indicating free/alloc'd.
 
std::vector< bool > dm_free_shapes
 Indicates that the space in the data_manager->shape_data is available.
 
int first_empty
 Index of the first unused body in the bodylist (internal)
 
int first_cosim
 
int last_cosim
 

Member Function Documentation

void ChDistributedDataManager::DefragmentFreeList ( )

Internal function for cleaning free list that tracks space for shapes.

Should not be called by the user.

int ChDistributedDataManager::GetLocalIndex ( unsigned int  gid)

Returns the local index of a body, given its global id.

Returns -1 if the body is not found on this rank.

Member Data Documentation

bool chrono::ChDistributedDataManager::initial_add

Indicates that the system is undergoing its inital setup.

Allows for some shortcuts by assuming contiguous valid data.