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

📄 ibgovertex.cxx

📁 Delaunay三角形的网格剖分程序
💻 CXX
字号:
#include "ibgoctree.hxx"#include "cogwarnings.hxx"#include "wzoutput.hxx"static int place[2][4]={{0,1,3,2},{0,3,1,2}};void ibgOctree::findVertices(){  //  wzOutput& pout = wzOutput::Default;  int rc,n,c,s,d,base,nn,no,cc,co,pp,ee,k,l,pl;  int e,arg[4][2];//,ddd[4][2];  int v=vertices.create();  wzRangeLoop(bcells,c){    n = bcType[c];    base = bcBase[c];    if(n==2) continue;    // wzAssert(n>2); // that would be incorrect counting or an interesting geometry.    //    pc(c);    for(ee=0;ee<n;ee++){      e = bcEdge[ee][c];      //      pe(e);      pl = ePlane[e];      if(pCell[0][pl]==c)	{s=0;}      else			{s=1;}      //      if(pCell[s][pl]!=c) continue;	// hack      wzAssert(pCell[s][pl]==c);      d = pDirection(pl);      //      pout(" nodes of a side: <>(<>),<>(<>),<>(<>),<>(<>)\n");      for(k=0;k<PlaneCorners;k++){	pp = ptReverse[k][d];	if(s==0){	  cc = cReverse[llCell[pSide0[pp]][pSide1[pp]]];	  co = cReverse[llCell[pSide1[pp]][pSide0[pp]]];	}else{	  cc = cReverse[llCell[pSide1[pp]][pSide0[pp]]];	  co = cReverse[llCell[pSide0[pp]][pSide1[pp]]];	}	nn  = cNode[cc][base];	no  = cNode[co][base];	//	pout<<nBoundary[nn],nBoundary[no];	l = place[s][k];	//	ddd[k][0] = cc; ddd[k][1] = co;	arg[l][0] = nn; arg[l][1] = no;      }      try{	cogFlag2 f2(ePoint[e],ePointFace[e],ePointDown[e],ePointUp[e]);	cogFlag3 f3(vPoint[v],vPointEdge[v],vPointFace[v],vPointDown[v],vPointUp[v]);	rc=geo->Cube(f3,f2,		     cogCube(nPoint[arg[0][0]],			     nPoint[arg[1][0]],			     nPoint[arg[2][0]],			     nPoint[arg[3][0]],			     nPoint[arg[0][1]],			     nPoint[arg[1][1]],			     nPoint[arg[2][1]],			     nPoint[arg[3][1]]));	if(rc!=cogRCVertexFound){	  // establishing connection to the other face omitted yet;	  // means, no pair establishment yet.	  //	  wzAssert(0);	  continue;	}	//      pv(v);	vEdge[v] = e; eVertex[s][e]=v;	vCell[v] = c; vNext[v] = bcVertex[c]; bcVertex[c] = v;	vIdent[v]= 0;	// means, not yet implemented;	v = vertices.create();      }catch(...){	cogInfoVertexProblems();      }    }      }}

⌨️ 快捷键说明

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