注册 登录
编程论坛 C++教室

请教这部分程序的中文注释。

chenxidong24 发布于 2011-12-02 19:29, 615 次点击
#if !RP_NODE  
  /* compute force on piston wall */
  force = 0.0;
  begin_f_loop (f, t)
    {
      real *AA;

      AA = F_AREA_CACHE (f, t);
      force += F_P (f, t) * AA[0];
    }
  end_f_loop (f, t)

# if RP_2D
  if (rp_axi)
    force *= 2.0 * M_PI;
# endif

  read_loc_velo_file (&loc, &velo);

  /* add in spring force */
# define K_SPRING 150000
  {
    real init_disp = 0.4 * 0.0254;
    real s_force =  K_SPRING * (loc + init_disp);

    force = force - s_force;
  }
0 回复
1