📄 mainoctree3dtest.html
字号:
<TITLE>COG 2.0: 3D grids</TITLE>
<A HREF="mainfacetest.html">next</A>
<H1>COG 2.0: 3D example of CogenOctree</H1>
<P>The possibilities of the class
<A HREF="cogenoctree.html">CogenOctree</A> are available in 3D too.
compared with our <A HREF="mainoctreetest.html">2D test example</A> we
simply have to add some more parameters for the related values in
z-direction:
<PRE>
#include "<A HREF="coglib.hxx">cog/coglib.hxx</A>"
int main()
{
cogenOctree gen = new CogenOctree();
gen->addBox(wzRegion(2), 0.0,0.4, 0.0,0.5, 0.0,0.6);
gen->addBox(wzRegion(3), 0.2,1.0, 0.3,1.0, 0.4,1.0);
gen->addPlaneZ(0.9);
gen->setRegularRefinementZ(1);
</PRE>
<P>Note that we have defined one plane in z-direction to fix the
z-coordinate of the points of the 2D grid.
<PRE>
wzgrid grid = (*gen)();
grid->write("test.sg");
}
</PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -