下面是我的源项自定义
#define CON 1.0e12
DEFINE_SOURCE(cell_x_source,cell,thread,dS,eqn)
{
Real source;
/*source term*/
source=-CON*C_MU_L(cell,thread)*C_U(cell,thread);
/*derivative of source term w.r.t.x-velocity.*/
dS[eqn]=-CON*C_MU_L(cell,thread);
return source;
}