24小时热门版块排行榜    

查看: 820  |  回复: 0

人机dogrui

新虫 (初入文坛)

[求助] UDF单机多核并行计算

UDF如下,不知道应该怎么改
#include "udf.h"
#include "sg_pb.h"
#include "sg_mphase.h"

DEFINE_PB_BREAK_UP_RATE_FREQ(break_up_freq_tav, cell, thread, d_1)
{
     real epsi,f1, f2, rho_d;
     real C1 = 0.00481, C2 = 0.08, sigma = 0.04;
     Thread *tm = THREAD_SUPER_THREAD(thread);/*passed thread is phase*/
     epsi = C_D(cell, tm);
     rho_d = C_R(cell, thread);
     f1 = pow(epsi, 1./3.)/pow(d_1, 2./3.);
     f2 = -(C2*sigma)/(rho_d*pow(epsi,2./3.)*pow(d_1, 5./3.));
     return C1*f1*exp(f2);
}


DEFINE_PB_BREAK_UP_RATE_PDF(break_up_pdf_par, cell, thread, d_1, thread_2, d_2)
{
     real pdf;
         real C1 = 180;
     real f_2, f_3, f_4;
         f_2 = pow(d_2, 2) / pow(d_1, 3);
     f_3 = pow(d_2, 6) / pow(d_1, 6);
         f_4 = pow(1. - (pow(d_2, 3) / pow(d_1, 3)),2);
     pdf = f_2*f_3*f_4;

     return C1*pdf;
}
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 人机dogrui 的主题更新
信息提示
请填处理意见