|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
编译不能通过一直提示有fatal error C1004: unexpected end of file found,实在找不出原因了,求大家帮忙看看,谢谢了!!!
#include "udf.h"
#include "mem.h"
real a;
real a_1;
DEFINE_INIT(my_p_function, domain)
{
cell_t c;
Thread *t;
thread_loop_c (t,domain)
{
begin_c_loop_all (c,t)
{
C_P(c,t)=3.0e5;
}
end_c_loop_all (c,t)
}
}
DEFINE_PROFILE(pressure_profile,thread,position)
{
face_t f;
Thread *t;
cell_t c;
real xc[ND_ND];
begin_c_loop(c,t)
{
C_CENTROID(xc,c,t);
if (sqrt(ND_SUM(pow(xc[0]-0.2,2.),
pow(xc[1]-0.,2.),
pow(xc[2]-0.015,2.)))<0.001)
{
a=C_P(c,t);
}
if (sqrt(ND_SUM(pow(xc[0]-0.,2.),
pow(xc[1]-0.,2.),
pow(xc[2]-0.015,2.)))<0.001)
{
a_1=C_P(c,t);
}
}
end_c_loop(c, thread)
begin_f_loop(f,thread)
{
if (a<300000.0)
{
F_PROFILE(f,thread,position)=a_1+100.0;
}
else
{
F_PROFILE(f,thread,position)=a_1-100.0;
}
}
}
|
|