⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ibgopoints.cxx

📁 Delaunay三角形的网格剖分程序
💻 CXX
字号:
#include "ibgoctree.hxx"#include "wzgrid.hxx"#include "cogwarnings.hxx"#include "wzview.hxx"void ibgGetPoints(wzpoints p, ibgoctree oct){  try{    oct->test();  }catch(...){  }  oct->getPointList(p);}void ibgOctreeData::getPointList(wzpoints p){  wzPoint *n;  wzIndex bn;  ibgiNode i; cogFace s;  int e,vv,j,k,nn = 0;  int cregion=0,cface=0,cedge=0,cvertex=0;  int crhidden=0,cfhidden=0;//,cehidden=0,cvhidden=0;  wzArray<int>	nindex(nodes,1,0);  wzArray<int>	findex(faces,1,0);  p->boxDim = GridDim;  p->setFloatValues(geo->floatValues());  wzCurrentData::current.pointList = p;  nindex[0] = 0;  wzRangeLoop(nodes,i){    bn = nBoundary[i];     if(bn && (bnType[bn] & ibgoHidden)){      nindex[i] = 0;      crhidden++;      continue;    }    j = p->create(); nindex[i] = j;    n  = &(p->Point[j]);    *n = nPoint[i];    p->Near[j] = nindex[nOld[i]];  }  cregion = j;  wzRangeLoop(faces,i){    if(fType[i] & ibgoHidden){      findex[i] = 0;       cfhidden++;      continue;    }    j = p->create();    findex[i] = j;    n  = &(p->Point[j]);    *n = fPoint[i];    if((k = -fUp[i])>0 && k<i && findex[k])	p->Near[j] = findex[k];    else if(k<0) 				p->Near[j] = nindex[bnBase[-k]];    else if((k= -fDown[i])>0&&k<i&&findex[k])	p->Near[j] = findex[k];    else if(k<0) 				p->Near[j] = nindex[bnBase[-k]];    else					p->Near[j] = 0;  }  cface = j-cregion;  /*  // this variant makes only one edge per plane  wzRangeLoop(planes,i){    e = pEdge[i];    if(!e) continue;    j  = p->create(); cedge++;    n  = &(p->Point[j]);    *n = ePoint[e];    p->Near[j] = nindex[bnBase[pNode[0][i]]];  }  */  wzRangeLoop(edges,e){    j  = p->create(); cedge++;    n  = &(p->Point[j]);    *n = ePoint[e];    p->Near[j] = nindex[bnBase[pNode[0][ePlane[e]]]];  }  wzRangeLoop(bcells,i){    vv = bcVertex[i];    if(!vv) continue;    nn = p->create(); cvertex++;    n  = &(p->Point[nn]);    *n = vPoint[vv];    p->Near[nn] = nindex[cNode[0][bcBase[i]]];  }  cogInfoGenerate    ("with <> points (in region <>(-<>), on face <>(-<>), on edge <>, vertices <>)")      << p->length(), cregion, crhidden, cface, cfhidden, cedge, cvertex;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -