📄 cogfunctiontest.html
字号:
<TITLE>COG 1.0 - CogeometrySimpleFunction</TITLE>
<H2>class <A NAME="Function">CogeometrySimpleFunction</A></H2>
<PRE>
#include "<A HREF="cogfunction.hxx">cogfunction.hxx</A>"
</PRE>
<P>Here we want to introduce a possibility to modify
cogeometries which is very variable - it allows to use the full power
of C++ as an input language for geometry definition.
<P>This class allows you to define a cogeometry implicit, by any
floating point function f(x) and an 1D cogeometry. All what you need
is to understand how to obtain coordinates, region numbers and other
information from a point (<A HREF="wzpointtest.html">wzPoint</A>) and
how to create an <A HREF="cog1dtest.html">1D cogeometry</A>.
<PRE>
static cogFloat Function(const cogPoint& x)
{
return 0.5*(x[1] - 1.5*x[2]*x[2] - 1.4*x[0]*x[0]*(x[0]-0.9))+0.3;
}
</PRE>
<P>The function <B>Function</B> has to return a function value. It is
assumed to be continuous, the algorithm may work faster if it is
smooth.
<PRE>
cogeometry test_cogeometry()
{
cogeometry original = test_cogeometry_1();
return new CogeometrySimpleFunction(<A HREF="#Function">Function</A>,original);
}
#ifdef test_cogeometry
this code can be used only in cogtest.cxx !!!!! see test.html#parameters for more;
#endif
</PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -