mit-crpg/openmc — pull request #169 by nhorelik (2013-04-14 04:19:14+00:00)
Title: New plot type: 3D voxels

This pull request adds a new plot type for 3D geometry visualization. In a manner very similar to the 2D ppm generator, this drags a particle across the user-defined plot window and determines the cell or material for the center of each voxel (like a pixel, but in 3D). The generator dumps a binary datafile containing the xyz position of each voxel, as well as the cell or material id associated with it. The user can then visualize this however they want - an example utility script is also added that converts this binary dump into a SILO rectilinear mesh that can be viewed in Visit, Paraview, etc, where clipping and thresholding can be utilized to selectively view certain cells or materials. For example, the following image of a grid spacer in the BEAVRS model took about 3 minutes to generate on my laptop, creating a 55MB binary file (200x200x91 voxels). It takes a few seconds to convert to a 14MB SILO file, which renders smoothly in Paraview. With a little patience you could up the resolution on this to see all the detail. Also, this kind of raster algorithm should scale fairly well if we want to do it in parallel.

![spacer](https://f.cloud.github.com/assets/1110672/377464/bd2d709e-a4b9-11e2-951d-1208c6e74ed8.png)

This pull request also cleans up the 2D ppm generator a little, and makes the plot echo a little cleaner from output.F90.