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

📄 mainspheretest.html

📁 Delaunay三角形的网格剖分程序
💻 HTML
字号:
<TITLE>COG 2.1: Spherical coordinates</TITLE><H1>COG 2.1: spherical coordinates</H1> <P>See <A HREF="mainpolartest.html">the polar coordinate example</A>for general instructions about curved coordinates. <P>The first coordinate is the radius <B>r</B>, then the angle<B>theta</B> (between -wzPi/2 and wzPi/2), the last is the angle<B>phi</B> (between -wzPi and wzPi). <P>The example below creates a spherical grid with varioussubregions which are box-like in these coordinates.   <P><IMG SRC="spheretest.gif"><PRE>#include "<A HREF="coglib.hxx">cog/coglib.hxx</A>"int main(){  cogenOctree base = new CogenOctree();  wzIndex i2 = base-&gt;addBox(wzRegion(2), 0.2,0.3,-wzPi/2,-1.0,-wzPi,wzPi);  wzIndex i3 = base-&gt;addBox(wzRegion(3), 	0.3,0.4, 0.0,wzPi/2, -1.9, -1.0);  wzIndex i4 = base-&gt;addBox(wzRegion(6), 	0.0,0.4, -0.5,0.5, 0.0,1.0);  base-&gt;setFaceOfBox(wzFace(2),i2);  base-&gt;setFaceOfBox(wzFace(3),i3);  base-&gt;setFaceOfBox(wzFace(6),i4);  base-&gt;refinementGlobal(0.1,0.4, 0.4);  base-&gt;addPlaneX(0.1);  base-&gt;addPlaneX(0.25);  base-&gt;addPlaneX(0.35);  base-&gt;addPlaneY(wzPi/2);  base-&gt;addPlaneY(-wzPi/2);  base-&gt;addPlaneZ(wzPi);  base-&gt;addPlaneZ(-wzPi);  wz3dmap sphere = new wz3Dspherical;  cogenChart gen = new CogenChart(base-&gt;generator(),sphere);  wzgrid grid = (*gen)();  grid->write("test.sg");}</PRE><H2>Known Problems</H2> <P>"edge problems" sometimes occur if, as in this example, thecritical regions of the coordinates (the axis (r == 0), the origin)are part of the boundary.  They may be ignored. <P>Defining regions outside the domain of definition causes errors.Be careful if the boundaries are correct: non-negative for X, -wzPi/2to wzPi/2 for Y, -wzPi to wzPi for Z <P>Defining different regions for (phi==wzPi) and (phi==-wzPi) causeserrors.  Be careful that the region numbers coinside there.

⌨️ 快捷键说明

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