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

📄 mainreftest.html

📁 Delaunay三角形的网格剖分程序
💻 HTML
字号:
<TITLE>COG 2.1: Local refinement</TITLE><A HREF="main2Dtest.html">next</A><H1>Local refinement</H1> <P><IMG SRC="reftest.gif"> <P>Some simple general (not octree-specific) methods to define arefinement are defined in the class <B>CogenRefine</B>. At first, wehave to define some other cogenerator. In this example, we usea simple rectangular geometry:<PRE>#include "<A HREF="coglib.hxx">cog/coglib.hxx</A>"int main(){  cogenOctree base = new CogenOctree();  base-&gt;addBox(wzRegion(2), 0.0,1.0,0.0,1.0);  base-&gt;addBox(wzRegion(3), 0.1,0.2, 0.7,0.9);  base-&gt;addBox(wzRegion(3), 0.3,0.4, 0.6,0.8);  base-&gt;addBox(wzRegion(4), 0.7,0.9, 0.1,0.5);</PRE> <P>Then this base should be used to define the cogenerator of<B>CogenRefine</B> type:<PRE>  cogenRefine gen = new CogenRefine(base-&gt;generator());  gen-&gt;refinementGlobal(0.2,0.2,0.1);  gen-&gt;faceRefinementGlobal(0.02,1.0);</PRE> <P>The simple global refinement calls <B>refinementGlobal</B> and<B>faceRefinementGlobal</B> are available too.  But there are otherinteresting possibilities.  For example, some homogeneous refinementin a given region with <B>refinementInRegion,refinementIsotropicInRegion</B>:<PRE>  gen-&gt;refinementIsotropicInRegion(0.04, wzRegion(3));  gen-&gt;refinementInRegion(0.04,0.2,0,    wzRegion(4));</PRE> <P>Another variant is refinement in the environment of some point.The first parameter (the first three in the anisotropic case) definethe refinement in that point: binary subdivision is used until theedges are below this distance.  The next parameter (the next three)define a distance parameter which defines the size of the domainaround the point which will be refined.  The last three parameters arethe coordinates of the point.  <P>Note that in 2D and 1D all parameters have to be given.<PRE>  gen-&gt;refinementIsotropicNearPoint(0.02,  0.1,         1,1,0);  gen-&gt;refinementNearPoint(0.02,0.1,0,     0.2,0,0,  0,0,0);</PRE><PRE>//  wzgrid grid = (*base)();  wzgrid grid = (*gen)();  grid->write("test.sg");}</PRE>

⌨️ 快捷键说明

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