void allocate_and_send(stk::CommSparse& comm, const std::vector<SideSharingData>& sideSharingDataThisProc, const std::vector<stk::mesh::impl::IdViaSidePair>& idAndSides) { pack_data(comm, sideSharingDataThisProc, idAndSides); comm.allocate_buffers(); pack_data(comm, sideSharingDataThisProc, idAndSides); comm.communicate(); }
void allocate_or_communicate(int iphase, stk::CommSparse& comm) { if (iphase == 0) { comm.allocate_buffers(); } else { comm.communicate(); } }
void NoGhostGameofLife::send_num_active_neighbors_of_remote_elem_keys(stk::CommSparse& buffer) { for (int phase = 0 ; phase < 2; phase++) { for (stk::mesh::EntityKey remoteElemKey : m_remoteElementKeysToVisit) pack_number_of_local_neighbors_of_remote_element_into_buffer(buffer, remoteElemKey); if (0 == phase) buffer.allocate_buffers(); else if (1 == phase) buffer.communicate(); } }
void NoGhostGameofLife::fill_buffer_with_local_neighbors_of_remote_keys(stk::CommSparse& buffer) { for (int phase = 0; phase < 2; phase++) { for (stk::mesh::EntityKey remoteElemKey : m_remoteElementKeys) fill_buffer_with_local_neighbors_of_remote_element_key(remoteElemKey, buffer); if (0 == phase) buffer.allocate_buffers(); else buffer.communicate(); } }
void NoGhostGameofLife::communicate_remote_element_keys_to_check(stk::CommSparse& buffer) { for (int phase = 0; phase < 2; phase++) { for (stk::mesh::EntityKey remoteElemKey : m_remoteElementKeysToVisit) buffer.send_buffer(m_remoteElementKeyToOwningProcessor[remoteElemKey]). pack<stk::mesh::EntityKey>(remoteElemKey); if (0 == phase) buffer.allocate_buffers(); else buffer.communicate(); } }
void NoGhostGameofLife::fill_buffer_with_local_element_keys_and_remote_node_keys(stk::CommSparse& buffer) { for (int phase = 0; phase < 2; phase++) { for (stk::mesh::Entity elem : m_elements) fill_buffer_with_this_elements_info(elem, buffer); if (0 == phase) buffer.allocate_buffers(); else buffer.communicate(); } }