|
|
发表于 2003-12-30 08:39:40
|
显示全部楼层
udf中文帮助5
你肯定是高手,能否为我解答一下DEFINE_ON_DEMAND的错误在那?
我的文件如下,谢了!
DEFINE_ON_DEMAND(B0_Init)
{
Domain *d; /* declare domain pointer since it is not passed as an
argument to the DEFINE macro */
cell_t c;
Thread *t;
real x[ND_ND];
d = Get_Domain(0);
/* loop over all cell threads in the domain */
thread_loop_c (t,d)
{
/*if (NNULLP(THREAD_STORAGE(t,SV_UDM_I)))*/
/* loop over all cells */
begin_c_loop_all (c,t)
{
C_CENTROID(x,c,t);
C_UDSI(c,t,3)=-0.21;
C_UDSI(c,t,4)=0.172;
C_UDSI(c,t,5)=0.5229*pow(x[0],3.)-0.706*pow(x[0],2.)-0.0072*x[0]+0.1075;
}
end_c_loop_all (c,t)
}
} |
|