📄 mainshuktest.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->setBorder(-8.0,8.0, -2.5,0.05); base->addBox(wzRegion(2), -8.0,8.0, -3.0,-0.1); cogenRefine ref = new CogenRefine(base->generator()); ref->refinementGlobal(0.81,0.21,1.0); ref->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->refinementNearPoint(0.21,0.1,0, 1.0,0.4,0, 0.6,0.0,0); ref->refinementNearPoint(0.21,0.11,0, 0.6,0.1,0, -3.2,-0.1,0); ref->refinementNearPoint(0.11,0.11,0, 0.8,0.1,0, 0.3,-0.1,0); ref->refinementNearPoint(0.41,0.05,0, 8.0,0.05,0, 0.0,-0.1,0); ref->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& shuk1 = *new wz2DshiftShukovski; shuk1.setShiftPoints(+0.0,-0.2,+0.0,0.6); shuk1.setYofCircleCenter(1.0); wz2DshiftShukovski& shuk2 = *new wz2DshiftShukovski(&shuk1); shuk2.setShiftPoints(-3.2,0.0,-3.2,0.5); cogenChart chart = new CogenChart(ref->generator(),(wzmap)&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->addBox(wzRegion(6),-8.2,8.2,-8.2,8.2); wzIndex i1 = ortho->addBox(wzRegion(1),-8.0,8.0); ortho->setFaceOfBox(wzFace(2),i1); ortho->addBox(wzRegion(2),-8.0,8.0,-3.0,-1.0); ortho->addPlaneY(0.04); cogenRefine oref = new CogenRefine(ortho->generator()); oref->refinementGlobal(0.81,0.41,1.0); oref->refinementNearPoint(0.05,1.0,0, 0.05,10.0,0, -8.0,0.0,0); oref->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->add(chart->generator()); gen->add(oref->generator()); wzgrid grid = (*gen)(); grid->write("test.sg");}</PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -