|
|
发表于 2009-4-17 14:33:32
|
显示全部楼层
DEFINE_EXECUTE_AT_END is a general-purpose macro that is executed at the end of an
iteration in a steady state run, or at the end of a time step in a transient run.
每个时间步结束汇报你要的流量应该是可以的。随便编了一个,没有上机测试调试,仅供参考。
DEFINE_EXECUTE_AT_END(execute_at_end)
{
Domain *d;
face_t f;
Thread *t;
real sum_mass=0.;
d = Get_Domain(1);
t=Lookup_Thread(d,out_face_ID);
begin_f_loop(f,t)
{
sum_mass+=F_FLUX(f,t);
}
end_f_loop(f,t)
Message("total flux is %g\n",sum_mass);
}
其中out_face_ID是你要监控的face的id整数号。 |
|