Tuesday, 31 July 2012

Velocity computation


  1. for (int y = 1; y < N - 1; y++) {
  2.         for (int x = 1; x < M - 1; x++) {
  3.                 vel(x,y,0) = 0.0;
  4.                 vel(x,y,1) = 0.0;
  5.                 for (int i = 0; i < 9; i++) {
  6.                         vel(x,y,0) += PDFGrid(x,y,i) * cx[i];
  7.                         vel(x,y,1) += PDFGrid(x,y,i) * cy[i];
  8.                 }
  9.         }
  10. }

No comments:

Post a Comment

LinkWithin

Related Posts Plugin for WordPress, Blogger...

Popular Posts