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


C++ MyPage::get方法代码示例

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


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

示例1: sizeof


//.........这里部分代码省略.........
    n = 0;

    // loop over parent non-skip granular list

    jlist = firstneigh_skip[i];
    jnum = numneigh_skip[i];

    for (jj = 0; jj < jnum; jj++) {
      joriginal = jlist[jj];
      j = joriginal & NEIGHMASK;
      if (ijskip[itype][type[j]]) continue;

      // flip I,J if necessary to satisfy onesided constraint
      // do not keep if I is now ghost

      if (surf[i] >= 0) {
        if (j >= nlocal) continue;
        tmp = i;
        i = j;
        j = tmp;
        flip = 1;
      } else flip = 0;

      numneigh[i]++;
      if (flip) i = j;
    }
  }

  // allocate all per-atom neigh list chunks, including history

  for (i = 0; i < nlocal; i++) {
    if (numneigh[i] == 0) continue;
    n = numneigh[i];
    firstneigh[i] = ipage->get(n);
    if (ipage->status())
      error->one(FLERR,"Neighbor list overflow, boost neigh_modify one");
    if (fix_history) {
      firsttouch[i] = ipage_touch->get(n);
      firstshear[i] = dpage_shear->get(dnum*n);
    }
  }

  // second loop over atoms in other list to store neighbors
  // skip I atom entirely if iskip is set for type[I]
  // skip I,J pair if ijskip is set for type[I],type[J]

  for (i = 0; i < nlocal; i++) numneigh[i] = 0;

  for (ii = 0; ii < inum_skip; ii++) {
    i = ilist_skip[ii];
    itype = type[i];
    if (iskip[itype]) continue;
    itag = tag[i];

    // loop over parent non-skip granular list and optionally its history info

    jlist = firstneigh_skip[i];
    jnum = numneigh_skip[i];

    for (jj = 0; jj < jnum; jj++) {
      joriginal = jlist[jj];
      j = joriginal & NEIGHMASK;
      if (ijskip[itype][type[j]]) continue;

      // flip I,J if necessary to satisfy onesided constraint
      // do not keep if I is now ghost
开发者ID:albapa,项目名称:lammps,代码行数:67,代码来源:neigh_derive.cpp


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