ibgocube.cxx
来自「有限元学习研究用源代码(老外的),供科研人员参考」· CXX 代码 · 共 36 行
CXX
36 行
#include "ibgoctree.hxx"
void ibgOctree::noteEdgeOnCube(ibgIndex p, ibgIndex e, ibgIndex s)
{
int c;
if((c=pCell[s][p])<0) c = createSimpleBoundaryCube(-c);
if(c){ // else we are outside.
bcEdge[bcType[c]][c] = e;
bcType[c]++;
}
}
ibgIndex ibgOctree::createSimpleBoundaryCube(ibgIndex base)
{
int i,j,t,c,bc,n,p;
wzAssert(cBoundary[base]==0);
bc = bcells.create();
bcBase[bc] = base;
cBoundary[base] = bc;
bcType[bc] = 0;
bcVertex[bc] = 0;
for(i=0;i<Corners;i++){
n = nBoundary[cNode[i][base]];
if(!n) n=createSimpleBoundaryNode(cNode[i][base]);
for(j=0;j<3;j++){
p = bnPlane[csPlane[i][j]][n]; if(!p) continue;
t = csPlaneSide[i][j];
c = pCell[t][p];
if(c == bc) continue;
wzAssert(c == -base);
pCell[t][p] = bc;
}
}
return bc;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?