Advertisement
Guest User

Untitled

a guest
May 30th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. CloseKernels[];
  2. LaunchKernels[8];
  3. xres2 = 8;
  4. yres2 = 8;
  5. l = 1;
  6. indTab = Flatten[Table[{ll, i, j}, {ll, Length[res1C[[l]]]}, {i, xres2 - 1}, {j, yres2 - 1}], 2];
  7. DistributeDefinitions["Global`*"];
  8.  
  9. ParallelDo[
  10.  
  11. ll = indTab[[ij, 1]];
  12. i = indTab[[ij, 2]];
  13. j = indTab[[ij, 3]];
  14.  
  15. x0 = res1C[[l, ll, 1]];
  16. y0 = res1C[[l, ll, 2]];
  17.  
  18. P1 = smplGrd[[x0 + 0, y0 + 0]];
  19. P2 = smplGrd[[x0 + 1, y0 + 1]];
  20.  
  21. xint2 = Re[P1];
  22. xfin2 = Re[P2];
  23. xinc2 = (xfin2 - xint2)/(xres2 - 1);
  24. x2 = Table[xint2 + (i - 1) xinc2, {i, xres2}];
  25.  
  26. yint2 = Im[P1];
  27. yfin2 = Im[P2];
  28. yinc2 = (yfin2 - yint2)/(yres2 - 1);
  29. y2 = Table[yint2 + (i - 1) yinc2, {i, yres2}];
  30.  
  31. smplGrd2 = Table[x2[[ii]] + I y2[[jj]], {ii, xres2}, {jj, yres2}];
  32.  
  33. OMint = Re[smplGrd2[[i + 0, j + 0]] nrm];
  34. OMfin = Re[smplGrd2[[i + 1, j + 0]] nrm];
  35. GMint = Im[smplGrd2[[i + 0, j + 0]] nrm];
  36. GMfin = Im[smplGrd2[[i + 0, j + 1]] nrm];
  37.  
  38. Print[{OMint, OMfin, GMint, GMfin}]
  39.  
  40. , {ij, (xres2 - 1) (yres2 - 1) Length[res1C[[l]]]}];
  41.  
  42. Set::wrsym: Symbol smplGrd2 is Protected.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement