当前位置: 首页>>代码示例>>C++>>正文


C++ CommSparse::communicate方法代码示例

本文整理汇总了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();
}
开发者ID:cihanuq,项目名称:Trilinos,代码行数:7,代码来源:SideSharingUsingGraph.cpp

示例2: allocate_or_communicate

void allocate_or_communicate(int iphase, stk::CommSparse& comm)
{
    if (iphase == 0)
    {
        comm.allocate_buffers();
    }
    else
    {
        comm.communicate();
    }
}
开发者ID:rainiscold,项目名称:trilinos,代码行数:11,代码来源:DiffingTool.cpp

示例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();
    }
}
开发者ID:vk1975,项目名称:trilinos,代码行数:12,代码来源:NoGhostGameofLife.cpp

示例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();
    }
}
开发者ID:vk1975,项目名称:trilinos,代码行数:12,代码来源:NoGhostGameofLife.cpp

示例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();
    }
}
开发者ID:vk1975,项目名称:trilinos,代码行数:13,代码来源:NoGhostGameofLife.cpp

示例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();
    }
}
开发者ID:vk1975,项目名称:trilinos,代码行数:13,代码来源:NoGhostGameofLife.cpp


注:本文中的stk::CommSparse::communicate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。