Advertisement
Guest User

Untitled

a guest
Dec 27th, 2011
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.39 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. xrangemn=0;
  4. xrangemx=`cat coursework_2011_cuda_tesla_1dv2.cuf | grep inparams%dx | awk '{print $3}'`*`cat coursework_2011_cuda_tesla_1dv2.cuf | grep 'integer, parameter :: grid' | awk '{print $6}'`;
  5. yrangemn=-9;
  6. yrangemx=60;
  7.  
  8. for i in `seq 1 9`; do
  9. name="plot000${i}.png"
  10.  
  11. gnuplot << EOF
  12. set encoding utf8
  13. set title ""
  14. set term png font "/usr/share/fonts/corefonts/arial.ttf"
  15. set xlabel "c"
  16. set ylabel "x"
  17. set xrange [$xrangemn:$xrangemx]
  18. set yrange [$yrangemn:$yrangemx]
  19. set grid
  20. set output "./$name"
  21.  
  22. plot "1d_cuda_p_\ \ \ $i.txt" using 1:2 title "p" lw 2 with lines,\
  23. "1d_cuda_rho_\ \ \ $i.txt" using 1:2 title "P" with lines,\
  24. "1d_cuda_Vx_\ \ \ $i.txt" using 1:2 title "Vx" with lines,\
  25. "ftheta.txt" using 1:2 title "f" with lines
  26.  
  27. EOF
  28. done
  29.  
  30. for i in `seq 10 99`; do
  31. name="plot00${i}.png"
  32.  
  33. gnuplot << EOF
  34. set encoding utf8
  35. set title ""
  36. set term png font "/usr/share/fonts/corefonts/arial.ttf"
  37. set xlabel "c"
  38. set ylabel "x"
  39. set xrange [$xrangemn:$xrangemx]
  40. set yrange [$yrangemn:$yrangemx]
  41. set grid
  42. set output "./$name"
  43.  
  44. plot "1d_cuda_p_\ \ $i.txt" using 1:2 title " pressure" lw 2 with lines,\
  45. "1d_cuda_rho_\ \ $i.txt" using 1:2 title " density" with lines,\
  46. "1d_cuda_Vx_\ \ $i.txt" using 1:2 title " Vx" with lines,\
  47. "ftheta.txt" using 1:2 title " forces" with lines
  48.  
  49. EOF
  50. done
  51.  
  52. for i in `seq 100 999`; do
  53. name="plot0${i}.png"
  54.  
  55. gnuplot << EOF
  56. set encoding utf8
  57. set title ""
  58. set term png font "/usr/share/fonts/corefonts/arial.ttf"
  59. set xlabel "c"
  60. set ylabel "x"
  61. set xrange [$xrangemn:$xrangemx]
  62. set yrange [$yrangemn:$yrangemx]
  63. set grid
  64. set output "./$name"
  65.  
  66. plot "1d_cuda_p_\ $i.txt" using 1:2 title " pressure" lw 2 with lines,\
  67. "1d_cuda_rho_\ $i.txt" using 1:2 title " density" with lines,\
  68. "1d_cuda_Vx_\ $i.txt" using 1:2 title " Vx" with lines,\
  69. "ftheta.txt" using 1:2 title " forces" with lines
  70.  
  71. EOF
  72. done
  73.  
  74. for i in `seq 1000 3000`; do
  75. name="plot${i}.png"
  76.  
  77. gnuplot << EOF
  78. set encoding utf8
  79. set title ""
  80. set term png font "/usr/share/fonts/corefonts/arial.ttf"
  81. set xlabel "c"
  82. set ylabel "x"
  83. set xrange [$xrangemn:$xrangemx]
  84. set yrange [$yrangemn:$yrangemx]
  85. set grid
  86. set output "./$name"
  87.  
  88. plot "1d_cuda_p_$i.txt" using 1:2 title " pressure" lw 2 with lines,\
  89. "1d_cuda_rho_$i.txt" using 1:2 title " density" with lines,\
  90. "1d_cuda_Vx_$i.txt" using 1:2 title " Vx" with lines,\
  91. "ftheta.txt" using 1:2 title " forces" with lines
  92.  
  93. EOF
  94. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement