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


C++ block::meshDensity方法代码示例

本文整理汇总了C++中block::meshDensity方法的典型用法代码示例。如果您正苦于以下问题:C++ block::meshDensity方法的具体用法?C++ block::meshDensity怎么用?C++ block::meshDensity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在block的用法示例。


在下文中一共展示了block::meshDensity方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: facePointN

// Return the neighbour face point from the mapped indices
inline label facePointN
(
    const int facei,
    const block& block,
    const label i,
    const label j
)
{
    switch (facei)
    {
        case 0:
            return facePointN(block, 0, i, j);
        case 1:
            return facePointN(block, block.meshDensity().x(), i, j);
        case 2:
            return facePointN(block, i, 0, j);
        case 3:
            return facePointN(block, i, block.meshDensity().y(), j);
        case 4:
            return facePointN(block, i, j, 0);
        case 5:
            return facePointN(block, i, j, block.meshDensity().z());
        default:
            return -1;
    }
}
开发者ID:CDAC-CFD,项目名称:OpenFOAM-2.4.x,代码行数:27,代码来源:blockMeshMergeFast.C

示例2: unsignIndex

// Return the neighbour face point from the signed indices
inline label facePointN
(
    const block& block,
    const label i,
    const label j,
    const label k
)
{
    return block.vtxLabel
    (
        unsignIndex(i, block.meshDensity().x()),
        unsignIndex(j, block.meshDensity().y()),
        unsignIndex(k, block.meshDensity().z())
    );
}
开发者ID:CDAC-CFD,项目名称:OpenFOAM-2.4.x,代码行数:16,代码来源:blockMeshMergeFast.C

示例3: if

// Return the number of divisions in each direction for the face
Pair<label> faceNij(const label facei, const block& block)
{
    Pair<label> fnij;

    int i = facei/2;

    if (i == 0)
    {
        fnij.first() = block.meshDensity().y() + 1;
        fnij.second() = block.meshDensity().z() + 1;
    }
    else if (i == 1)
    {
        fnij.first() = block.meshDensity().x() + 1;
        fnij.second() = block.meshDensity().z() + 1;
    }
    else if (i == 2)
    {
        fnij.first() = block.meshDensity().x() + 1;
        fnij.second() = block.meshDensity().y() + 1;
    }

    return fnij;
}
开发者ID:CDAC-CFD,项目名称:OpenFOAM-2.4.x,代码行数:25,代码来源:blockMeshMergeFast.C


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