<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi yt friends,<br class="">
<br class="">
I'm trying to produce 3D streamlines using the AMR data from FLASH following the yt-project tutorial <a href="http://yt-project.org/doc/visualizing/streamlines.html" class="">http://yt-project.org/doc/visualizing/streamlines.html</a>. However, the execution
 was very slow (in particular, at the 'Streamlines' call). The code didn't complete one single streamline after an hour. <br class="">
<br class="">
Here's the excerpt of my code:
<div class="">—————</div>
<div class="">c = ds.domain_center<br class="">
<br class="">
</div>
<div class="">streamlines = Streamlines(ds, c, 'velx', 'vely', 'velz', length=1.0*pc, get_magnitude=False)<br class="">
streamlines.integrate_through_volume()<br class="">
<br class="">
fig=plt.figure()<br class="">
ax = Axes3D(fig)<br class="">
for stream in streamlines.streamlines:<br class="">
  stream = stream[np.all(stream != 0.0, axis=1)]<br class="">
  ax.plot3D(stream[:,0], stream[:,1], stream[:,2], alpha=0.1)<br class="">
<br class="">
plt.savefig('streamlines.png')</div>
<div class="">—————</div>
<div class=""><br class="">
</div>
<div class="">I have two thoughts:</div>
<div class="">1. My FLASH file is quite large (~10GB). It may just be slow because of the large AMR grid size. Are there any ways to read only the velocities off the grid or only a subsection of the grid?</div>
<span class="">2. FLASH's octree data structure may be incompatible with the AMRKDTree construction (first step in streamlines creation). In the doc string of AMRKDTree, it says "Not applicable to particle or octree-based datasets.". If it's the case, I may
 have to find another way out.</span>
<div class=""><span class=""><br class="">
</span></div>
<div class=""><span class="">Thank you very much for your time! Have a great weekend!</span></div>
<div class=""><span class=""><br class="">
</span></div>
<div class=""><span class="">Best,</span></div>
<div class=""><span class="">Benny</span></div>
</body>
</html>