mainoctree3dtest.html
来自「有限元学习研究用源代码(老外的),供科研人员参考」· HTML 代码 · 共 33 行
HTML
33 行
<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 + =
减小字号Ctrl + -
显示快捷键?