|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
我用uds定义了物理变量电压的方程,然后我想在后处理看电压的梯度,然后我定义了如下的udf和内存变量,其中我在udf编译之后我就手动define-on-demand的执行,之后在初始化之前,我就保存了/solve/set>expert,但是计算一开始就出现了错误
DEFINE_ON_DEMAND(store_gradient)
{
Domain *domain;
cell_t c;
Thread *t;
domain=Get_Domain(2);
/* Fill the UDM with magnitude of gradient. */
thread_loop_c (t,domain)
{
begin_c_loop (c,t)
{
C_UDMI(c,t,0)=-C_UDSI_DIFF(c,t,0)*C_UDSI_G(c,t,0)[0];
C_UDMI(c,t,1)=-C_UDSI_DIFF(c,t,0)*C_UDSI_G(c,t,0)[1];
}
end_c_loop (c,t)
}
}
错误如下:
Error: get_udf_function: function store_gradient::libudf has wrong type: 7 != 40
Error Object: ()
在线等待答复,谢谢!
|
|