maincog2dtest.html
来自「有限元学习研究用源代码(老外的),供科研人员参考」· HTML 代码 · 共 38 行
HTML
38 行
<TITLE>COG 2.0: rectangle</TITLE>
<H1>Intersection with a rectangle</H1>
<P>In this variant, instead of the <A HREF="maincogtest.html">3D
cube</A>, the intersection of the
<A HREF="cogtest.html">test cogeometry</A> with a 2D rectangle
(shifted in z-direction) is computed.
<PRE>
#include "<A HREF="coglib.hxx">cog/coglib.hxx</A>"
cogeometry test_cogeometry();
#include "<A HREF="cogtest.cxx">cogtest.cxx</A>"
int main()
{
cogeometry geom = test_cogeometry();
cogenOctree gen = new <A HREF="cogenoctree.html">CogenOctree</A>();
gen->setBorder(-1.0,1.0, -1.0,1.0);
gen->refinementGlobal(0.2,0.2);
gen->faceRefinementGlobal(0.05,0.4);
</PRE>
<P>The following line defines the position in z-direction of the box.
Varying this value we obtain different intersections of the full 3D
cogeometry.
<PRE>
gen->addPlaneZ(0.4);
wzgrid grid = (*gen)(geom);
grid->write("test.sg");
}
</PRE>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?