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

📄 mainshuktest.html

📁 Delaunay三角形的网格剖分程序
💻 HTML
字号:
<TITLE>COG 2.0: Shukowski coordinates</TITLE><H1>COG 2.0: Shukowski coordinates</H1> <P>A possibility to obtain spline-like conformal coordinates to modelnon-trivial surfaces is the composition of Shukowski transformations.A Shukowski transformation can be used to move a given point x0 toanother point x1, modifying the coordinates in the neighbourhood ofthe point, but without a lot of change far away from the point.  <P>Here we see an example of a composition of two Shukowskitransformations to obtain a non-trivially curved surface. Near thesurface we want to have a fine grid in orthogonal direction: <P><IMG SRC="shuktest.gif"><PRE>#include "<A HREF="coglib.hxx">cog/coglib.hxx</A>"int main(){  cogenOctree base = new CogenOctree();  base-&gt;setBorder(-8.0,8.0, -2.5,0.05);  base-&gt;addBox(wzRegion(2), -8.0,8.0, -3.0,-0.1);  cogenRefine ref = new CogenRefine(base-&gt;generator());  ref-&gt;refinementGlobal(0.81,0.21,1.0);  ref-&gt;faceRefinementGlobal(0.008,1.0);</PRE> <P>The following refinement has been useful to solve the <A HREF="curvatureproblem.html">curvature problem</A> (step by step- looking where a problem occurs, then introducing an additionalrefinement near the problem):<PRE>  ref-&gt;refinementNearPoint(0.21,0.1,0,  1.0,0.4,0,  0.6,0.0,0);  ref-&gt;refinementNearPoint(0.21,0.11,0,  0.6,0.1,0, -3.2,-0.1,0);  ref-&gt;refinementNearPoint(0.11,0.11,0,  0.8,0.1,0,  0.3,-0.1,0);  ref-&gt;refinementNearPoint(0.41,0.05,0,  8.0,0.05,0,  0.0,-0.1,0);  ref-&gt;refinementNearPoint(0.81,0.4,0,  8.0,0.2,0,  0.0,-0.1,0);</PRE> <P>Now the most interesting part - the definition and composition ofthe Shukowski functions:<PRE>  wz2DshiftShukovski&amp; shuk1 = *new wz2DshiftShukovski;  shuk1.setShiftPoints(+0.0,-0.2,+0.0,0.6);  shuk1.setYofCircleCenter(1.0);  wz2DshiftShukovski&amp; shuk2 = *new wz2DshiftShukovski(&amp;shuk1);  shuk2.setShiftPoints(-3.2,0.0,-3.2,0.5);  cogenChart chart = new CogenChart(ref-&gt;generator(),(wzmap)&amp;shuk2);</PRE> <P>Outside the interesting region we define an orthogonal grid.  Aremarkable point is the definition of region 2, which is defined asthe union of two parts - one for each system of coordinates.  <P>Another point is that introducing a coarse grid plane at Y=0.04 wehave solved a <A HREF="matchproblem.html">match problem</A>.<PRE>  cogenOctree ortho = new CogenOctree;  ortho-&gt;addBox(wzRegion(6),-8.2,8.2,-8.2,8.2);  wzIndex i1 = ortho-&gt;addBox(wzRegion(1),-8.0,8.0);  ortho-&gt;setFaceOfBox(wzFace(2),i1);  ortho-&gt;addBox(wzRegion(2),-8.0,8.0,-3.0,-1.0);  ortho-&gt;addPlaneY(0.04);  cogenRefine oref = new CogenRefine(ortho-&gt;generator());  oref-&gt;refinementGlobal(0.81,0.41,1.0);  oref-&gt;refinementNearPoint(0.05,1.0,0,  0.05,10.0,0, -8.0,0.0,0);  oref-&gt;refinementNearPoint(0.05,1.0,0,  0.05,10.0,0,  8.0,0.0,0);</PRE> <P>What remains is standard.<PRE>  cogenComposite gen = new CogenUnion;  gen-&gt;add(chart-&gt;generator());  gen-&gt;add(oref-&gt;generator());  wzgrid grid = (*gen)();  grid->write("test.sg");}</PRE>

⌨️ 快捷键说明

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