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

📄 cogcornertest.html

📁 有限元学习研究用源代码(老外的),供科研人员参考
💻 HTML
字号:
<TITLE>A Corner</TITLE>

<H1>A Corner</H1>

 <P>Returns a corner with three different boundary faces;
See <A HREF="cogfunctiontest.html">cogfunctiontest.html</A> and
<A HREF="cogfacetest.html">cogfacetest.html</A>

<PRE>
#include "cogfunction.hxx"
#include "cogfaces.hxx"

float px = 0.6;
float py = 0.7;
float pz = 0.8;
float dxy = px-py;
float dxz = px-pz;
float dyz = py-pz;

static cogSegment Faces(const cogPoint& x)
{
 if(x[0] &gt; x[1]+dxy)
	if(x[0] &gt; x[2]+dxz)	return wzFace(2);	// x is greatest
	else			return wzFace(4);	// z is greatest
 else
	if(x[1] &gt; x[2]+dyz)	return wzFace(3);	// y is greatest
	else			return wzFace(4);	// z is greatest
}

static cogSegment Regions(const cogPoint& x)
{
 if(x[0]&gt;px) return wzRegion(1);
 if(x[1]&gt;py) return wzRegion(1);
 if(x[2]&gt;pz) return wzRegion(1);
 return wzRegion(2);
}


cogeometry	test_cogeometry()
{
  cogeometry region = new CogeometrySimpleRegions(Regions);
//  region-&gt;Delta = 1.e-6;
  cogeometry faces  = new CogeometrySimpleFaces(Faces,region);
//  faces-&gt;Delta = 1.e-6;
  return faces;
}

</PRE>

⌨️ 快捷键说明

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