本文整理汇总了C++中stk::CommSparse::communicate方法的典型用法代码示例。如果您正苦于以下问题:C++ CommSparse::communicate方法的具体用法?C++ CommSparse::communicate怎么用?C++ CommSparse::communicate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类stk::CommSparse
的用法示例。
在下文中一共展示了CommSparse::communicate方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: allocate_and_send
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();
}
示例2: allocate_or_communicate
void allocate_or_communicate(int iphase, stk::CommSparse& comm)
{
if (iphase == 0)
{
comm.allocate_buffers();
}
else
{
comm.communicate();
}
}
示例3: send_num_active_neighbors_of_remote_elem_keys
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();
}
}
示例4: fill_buffer_with_local_neighbors_of_remote_keys
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();
}
}
示例5: communicate_remote_element_keys_to_check
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();
}
}
示例6: fill_buffer_with_local_element_keys_and_remote_node_keys
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();
}
}