[visit] 01/03: New upstream release 2.9.2

Alastair McKinstry mckinstry at moszumanska.debian.org
Wed Jun 17 08:20:14 UTC 2015


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch dev-2.9.2
in repository visit.

commit 049d5c54a1948392a247b1082713f187e4ed543a
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Wed Jun 17 07:53:45 2015 +0100

    New upstream release 2.9.2
---
 src/INSTALL_NOTES                                  |   18 +-
 src/SVN_REVISION                                   |    2 +-
 src/VERSION                                        |    2 +-
 src/avt/Filters/avtCoordSystemConvert.C            |    4 +
 src/avt/Filters/avtFacelistFilter.C                |   52 +-
 src/avt/Filters/avtXRayFilter.C                    |  515 ++++-
 src/avt/Filters/avtXRayFilter.h                    |   25 +-
 src/avt/Pipeline/Data/avtDataTree.C                |   37 +
 src/avt/Pipeline/Data/avtDataTree.h                |    2 +
 src/avt/Pipeline/Data/avtDataset.h                 |    1 +
 src/avt/Pipeline/Sinks/avtDatabaseWriter.C         |    2 +
 src/avt/Queries/Queries/avtXRayImageQuery.C        |  311 ++-
 src/avt/Queries/Queries/avtXRayImageQuery.h        |   26 +-
 src/bin/internallauncher                           |   37 +-
 src/config-site/rzuseqlac2-compute.cmake           |   13 +-
 src/config-site/rzuseqlac2-login.cmake             |   12 +-
 src/config-site/thembisa.cmake                     |    4 +-
 src/databases/CMakeLists.txt                       |    4 +-
 src/databases/Exodus/avtExodusFileFormat.C         |   15 +-
 .../FieldViewXDB/lib/Mac64/libVXDB_par.dylib       |  Bin 186652 -> 400964 bytes
 .../FieldViewXDB/lib/Mac64/libVXDB_ser.dylib       |  Bin 178284 -> 396692 bytes
 src/databases/Miranda/avtMirandaFileFormat.C       | 2172 ++++++++++----------
 src/databases/Miranda/avtMirandaFileFormat.h       |    2 +-
 src/databases/NETCDF/avtBasicNETCDFReader.C        |   12 +
 src/databases/Tecplot/avtTecplotFileFormat.C       |   32 +-
 src/gui/QvisGUIApplication.C                       |   29 +-
 src/gui/QvisXRayImageQueryWidget.C                 |  304 ++-
 src/gui/QvisXRayImageQueryWidget.h                 |   35 +-
 src/gui/SplashScreen.C                             |    5 +-
 src/operators/CoordSwap/avtCoordSwapFilter.C       |   38 +
 src/operators/IndexSelect/avtIndexSelectFilter.C   |  981 +++++++--
 src/operators/IndexSelect/avtIndexSelectFilter.h   |   32 +-
 src/plots/Label/CellLabels_body.C                  |   28 +
 src/plots/Label/NodeLabels_body.C                  |   44 +-
 src/plots/Label/avtLabelFilter.C                   |  192 +-
 src/plots/Label/avtLabelFilter.h                   |   14 +
 src/plots/Label/avtLabelPlot.C                     |    8 +
 src/resources/help/en_US/relnotes2.9.2.html        |   57 +
 src/resources/hosts/llnl/host_llnl_rzgw_rzuseq.xml |    2 +-
 src/resources/hosts/nersc/customlauncher           |   14 +-
 src/resources/hosts/umich/host_umich_flux.xml      |  149 +-
 src/sim/V2/lib/VisItControlInterface_V2.c          |   13 +-
 src/sim/V2/lib/VisItFortran.h                      |    3 +
 src/sim/V2/lib/visitfortransimV2interface.c        |    2 +
 src/sim/V2/runtime/SimEngine.C                     |  167 +-
 src/sim/V2/runtime/VisItControlInterfaceRuntime.C  |    5 +-
 src/svn_bin/build_visit                            |    2 +-
 src/svn_bin/build_visit_BGQ                        |    2 +-
 src/svn_bin/bv_support/bv_cgns.sh                  |   68 +-
 src/svn_bin/filter_link_commands_BGQ.sh            |   28 +
 src/svn_bin/visit-build-open                       |   85 +-
 src/svn_bin/visit-create-chksums                   |   36 +-
 src/svn_bin/visit-install                          |    5 +-
 src/svn_bin/visit-install-open                     |   49 +-
 .../contrib/pjacobi/F90/PJacobi_InSitu.f           |   17 +-
 src/viewer/core/ViewerWindow.C                     |    6 +-
 src/viewer/main/ViewerSubject.C                    |  152 +-
 src/visitpy/cli/cli.C                              |    8 +
 58 files changed, 4245 insertions(+), 1635 deletions(-)

diff --git a/src/INSTALL_NOTES b/src/INSTALL_NOTES
index c80275d..a642cbd 100644
--- a/src/INSTALL_NOTES
+++ b/src/INSTALL_NOTES
@@ -11,7 +11,7 @@ followed by the Unix installation instructions.
 Windows:
 ========
 
-1.  Download the visit2.9.1.exe or visit2.9.1_x64.exe installer program to
+1.  Download the visit2.9.2.exe or visit2.9.2_x64.exe installer program to
     your desktop.
 
 2.  Double click on the installer program icon to run the installer.
@@ -24,7 +24,7 @@ MacOS X:
 
 Downloads:
 
-1. Download VisIt-2.9.1.dmg and copy it to the desktop.
+1. Download VisIt-2.9.2.dmg and copy it to the desktop.
 
 2. Double click on the file to open it. This will cause MacOS to mount the
    disk image and open it in Finder.
@@ -46,12 +46,12 @@ Unix (gzipped tar file):
     distribution directory or update an existing distribution.  This is
     handled automatically.
 
-        chmod 755 visit-install2_9_1
-        ./visit-install2_9_1 "version" "platform" "directory"
+        chmod 755 visit-install2_9_2
+        ./visit-install2_9_2 "version" "platform" "directory"
 
     where
 
-        "version" will be 2.9.1 for the current distribution.
+        "version" will be 2.9.2 for the current distribution.
 
         "platform" will be one of the following:  linux-x86_64-rhel6 or
         linux-x86_64-ubuntu11 depending on the machine.  The one you
@@ -62,12 +62,12 @@ Unix (gzipped tar file):
 
     For example
 
-        chmod 755 visit-install2_9_1
-        ./visit-install2_9_1 2.9.1 linux-x86_64-rhel6 /usr/local/visit
+        chmod 755 visit-install2_9_2
+        ./visit-install2_9_2 2.9.2 linux-x86_64-rhel6 /usr/local/visit
 
-    will install the linux-x86_64-rhel6, 2.9.1 version of visit in the
+    will install the linux-x86_64-rhel6, 2.9.2 version of visit in the
     directory "/usr/local/visit".  Note that you will need to have the
-    file "visit2_9_1.linux-x86_64-rhel6.tar.gz" present in the current
+    file "visit2_9_2.linux-x86_64-rhel6.tar.gz" present in the current
     directory for this to function properly.
 
 2.  Add the bin directory below the installation directory
diff --git a/src/SVN_REVISION b/src/SVN_REVISION
index 2255b5b..750d2c0 100644
--- a/src/SVN_REVISION
+++ b/src/SVN_REVISION
@@ -1 +1 @@
-26374
+26667
diff --git a/src/VERSION b/src/VERSION
index dedcc7d..5d9ade1 100644
--- a/src/VERSION
+++ b/src/VERSION
@@ -1 +1 @@
-2.9.1
+2.9.2
diff --git a/src/avt/Filters/avtCoordSystemConvert.C b/src/avt/Filters/avtCoordSystemConvert.C
index 158255c..c2c96ec 100644
--- a/src/avt/Filters/avtCoordSystemConvert.C
+++ b/src/avt/Filters/avtCoordSystemConvert.C
@@ -348,6 +348,9 @@ TransformSingleVector(avtCoordSystemConvert::VectorTransformMethod method,
 //    Kathleen Biagas, Tue Aug 21 16:53:09 MST 2012
 //    Preserve coordinate type.
 //
+//    Kathleen Biagas, Thu Jun 4 16:51:27 MST 2015
+//    Pass along FieldData.
+//
 // ****************************************************************************
 
 static vtkDataSet *
@@ -560,6 +563,7 @@ Transform(vtkDataSet *in_ds,
         cellCoordsNew->Delete();
     }
 
+    rv->GetFieldData()->PassData(in_ds->GetFieldData());
     pts->Delete();
     newPts->Delete();
 
diff --git a/src/avt/Filters/avtFacelistFilter.C b/src/avt/Filters/avtFacelistFilter.C
index 4e3824f..b691c51 100644
--- a/src/avt/Filters/avtFacelistFilter.C
+++ b/src/avt/Filters/avtFacelistFilter.C
@@ -855,6 +855,11 @@ avtFacelistFilter::Take3DFaces(vtkDataSet *in_ds, int domain,std::string label,
 //    Hank Childs, Fri Feb  4 13:46:18 PST 2011
 //    Add additional arguments so this could be a static function.
 //
+//    Brad Whitlock, Fri May 22 14:56:31 PDT 2015
+//    When converting unstructured grids to polydata, do vertices, then lines,
+//    and then the polygons. This is needed because polydata puts the those 
+//    cell types into different bins, which affects the order of the cell data.
+//
 // ****************************************************************************
 
 vtkDataSet *
@@ -986,6 +991,7 @@ avtFacelistFilter::Take2DFaces(vtkDataSet *in_ds, bool forceFaceConsolidation,
         vtkUnstructuredGrid *ug = (vtkUnstructuredGrid *) in_ds;
         int ncells = ug->GetNumberOfCells();
         int noutcells = ncells;
+        bool containsVertices = false, containsLines = false;
         for (int i = 0 ; i < ncells ; i++)
         {
             int cellType = ug->GetCellType(i);
@@ -997,23 +1003,63 @@ avtFacelistFilter::Take2DFaces(vtkDataSet *in_ds, bool forceFaceConsolidation,
               case VTK_QUADRATIC_LINEAR_QUAD: noutcells += 4; break;
               case VTK_BIQUADRATIC_TRIANGLE:  noutcells += 6; break;
               case VTK_BIQUADRATIC_QUAD:      noutcells += 8; break;
-              default:                        noutcells++;    break;
+
+              case VTK_LINE: containsLines = true;noutcells++;break;
+              case VTK_VERTEX: containsVertices = true;noutcells++;break;
+
+             default:                        noutcells++;    break;
             }
         }
 
-
         out_ds->Allocate(noutcells);
         vtkCellData *in_cd = ug->GetCellData();
         vtkCellData *out_cd = out_ds->GetCellData();
         out_cd->CopyAllocate(in_cd, noutcells);
         vtkIdList *idlist     = vtkIdList::New();
         vtkIdList *idlist_cor = vtkIdList::New();
+
+        // Do the vertices first
+        if(containsVertices)
+        {
+            for (int i = 0 ; i < ncells ; i++)
+            {
+                int newid;
+                ug->GetCellPoints(i, idlist);
+                int cellType = ug->GetCellType(i);
+                if (cellType == VTK_VERTEX)
+                {
+                    newid = out_ds->InsertNextCell(cellType, idlist);
+                    out_cd->CopyData(in_cd, i, newid);
+                }
+            }
+        }
+
+        // Do the lines second
+        if(containsLines)
+        {
+            for (int i = 0 ; i < ncells ; i++)
+            {
+                int newid;
+                ug->GetCellPoints(i, idlist);
+                int cellType = ug->GetCellType(i);
+                if (cellType == VTK_LINE)
+                {
+                    newid = out_ds->InsertNextCell(cellType, idlist);
+                    out_cd->CopyData(in_cd, i, newid);
+                }
+            }
+        }
+
+        // Do all other cells last
         for (int i = 0 ; i < ncells ; i++)
         {
             int newid;
             ug->GetCellPoints(i, idlist);
             int cellType = ug->GetCellType(i);
-            if (cellType == VTK_QUADRATIC_EDGE)
+
+            if (cellType == VTK_VERTEX || cellType == VTK_LINE)
+                continue;
+            else if (cellType == VTK_QUADRATIC_EDGE)
             {
                 idlist_cor->SetNumberOfIds(3);
                 idlist_cor->SetId(0, idlist->GetId(0));
diff --git a/src/avt/Filters/avtXRayFilter.C b/src/avt/Filters/avtXRayFilter.C
index cb9fb9c..4a021a2 100644
--- a/src/avt/Filters/avtXRayFilter.C
+++ b/src/avt/Filters/avtXRayFilter.C
@@ -300,6 +300,12 @@ static bool IntersectLineWithQuad(const double v_00[3], const double v_10[3],
 //    I added support for specifying background intensities on a per bin
 //    basis.
 //
+//    Eric Brugger, Wed May 27 10:10:28 PDT 2015
+//    I modified the filter to also output the path length field.
+//
+//    Eric Brugger, Thu Jun  4 15:58:10 PDT 2015
+//    I added an option to enable outputting the ray bounds to a vtk file.
+//
 // ****************************************************************************
 
 avtXRayFilter::avtXRayFilter()
@@ -334,10 +340,12 @@ avtXRayFilter::avtXRayFilter()
     backgroundIntensity = 0.0;
     backgroundIntensities = NULL;
     nBackgroundIntensities = 0;
-    radBins = NULL;
+    intensityBins = NULL;
+    pathBins = NULL;
     numBins = 1;
 
     debugRay = -1;
+    outputRayBounds = false;
 }
 
 
@@ -352,6 +360,9 @@ avtXRayFilter::avtXRayFilter()
 //    I added support for specifying background intensities on a per bin
 //    basis.
 //
+//    Eric Brugger, Wed May 27 10:10:28 PDT 2015
+//    I modified the filter to also output the path length field.
+//
 // ****************************************************************************
 
 avtXRayFilter::~avtXRayFilter()
@@ -360,6 +371,10 @@ avtXRayFilter::~avtXRayFilter()
         delete [] lines;
     if (backgroundIntensities != NULL)
         delete [] backgroundIntensities;
+    if (intensityBins != NULL)
+        delete [] intensityBins;
+    if (pathBins != NULL)
+        delete [] pathBins;
 }
 
 
@@ -506,6 +521,40 @@ avtXRayFilter::SetBackgroundIntensities(double *intensities, int nIntensities)
 }
 
 // ****************************************************************************
+//  Method: avtXRayFilter::SetDebugRay
+//
+//  Purpose:
+//    Set the id for the debug ray.
+//
+//  Programmer: Eric Brugger
+//  Creation:   May 21, 2015
+//
+// ****************************************************************************
+
+void
+avtXRayFilter::SetDebugRay(int ray)
+{
+    debugRay = ray;
+}
+
+// ****************************************************************************
+//  Method: avtXRayFilter::SetOutputRayBounds
+//
+//  Purpose:
+//    Set the output ray bounds flag.
+//
+//  Programmer: Eric Brugger
+//  Creation:   June 4, 2015
+//
+// ****************************************************************************
+
+void
+avtXRayFilter::SetOutputRayBounds(bool flag)
+{
+    outputRayBounds = flag;
+}
+
+// ****************************************************************************
 //  Method: avtXRayFilter::Execute
 //
 //  Purpose:
@@ -545,6 +594,9 @@ avtXRayFilter::SetBackgroundIntensities(double *intensities, int nIntensities)
 //    I added the ability to output the cells intersected by a specified
 //    ray to a vtk file.
 //
+//    Eric Brugger, Wed May 27 10:10:28 PDT 2015
+//    I modified the filter to also output the path length field.
+//
 // ****************************************************************************
 
 void
@@ -582,7 +634,8 @@ avtXRayFilter::Execute(void)
     iFragment = 0;
     nImageFragments = numPasses;
     imageFragmentSizes = new int[nImageFragments];
-    imageFragments = new vtkDataArray *[nImageFragments];
+    intensityFragments = new vtkDataArray *[nImageFragments];
+    pathLengthFragments = new vtkDataArray *[nImageFragments];
 
     //
     // Get the input data tree to obtain the data sets.
@@ -641,7 +694,7 @@ avtXRayFilter::Execute(void)
     }
 
     //
-    // Collect all the images on the root processor.
+    // Collect all the fragments on the root processor.
     //
     int t1;
     if (PAR_Size() > 1)
@@ -650,58 +703,88 @@ avtXRayFilter::Execute(void)
         // Collect the images.
         //
         t1 = visitTimer->StartTimer();
-        vtkDataArray *image = NULL;
+        vtkDataArray *intensity = NULL;
+        vtkDataArray *pathLength = NULL;
         if (cellDataType == VTK_DOUBLE)
         {
-            CollectImages<double>(0, image);
+            CollectFragments<double>(0, nImageFragments, imageFragmentSizes,
+                                     intensityFragments, intensity);
+            CollectFragments<double>(0, nImageFragments, imageFragmentSizes,
+                                     pathLengthFragments, pathLength);
         }
         else
         {
-            CollectImages<float>(0, image);
+            CollectFragments<float>(0, nImageFragments, imageFragmentSizes,
+                                    intensityFragments, intensity);
+            CollectFragments<float>(0, nImageFragments, imageFragmentSizes,
+                                    pathLengthFragments, pathLength);
         }
-        visitTimer->StopTimer(t1, "avtXRayImageQuery::CollectImages");
+        visitTimer->StopTimer(t1, "avtXRayImageQuery::CollectFragments");
 
         //
-        // Swap out the current imageFragments and replace them with the
-        // unified one.
+        // Swap out the current fragments and replace them with the
+        // unified ones.
         //
         for (int i = 0; i < nImageFragments; i++)
-            imageFragments[i]->Delete();
+        {
+            intensityFragments[i]->Delete();
+            pathLengthFragments[i]->Delete();
+        }
         if (PAR_Rank() == 0)
             nImageFragments = 1;
         else
             nImageFragments = 0;
         imageFragmentSizes[0] = numPixels;
-        imageFragments[0] = image;
+        intensityFragments[0] = intensity;
+        pathLengthFragments[0] = pathLength;
     }
 
     //
-    // Merge all the images together.
+    // Merge all the fragments together.
     //
     if (PAR_Rank() == 0)
     {
-        vtkDataSet **pdarray = new vtkDataSet*[numBins];
-        int        *indarray = new int[numBins];
+        vtkDataSet **pdarray = new vtkDataSet*[2*numBins];
+        int        *indarray = new int[2*numBins];
 
+        //
+        // Add the intensities.
+        //
         for (int iBin = 0; iBin < numBins; iBin++)
         {
-            vtkDataArray *imageArray;
-            FillImageArray(iBin, imageArray);
-            imageArray->SetName("Image");
+            vtkDataArray *intensityArray;
+            MergeFragments(iBin, intensityFragments, intensityArray);
+            intensityArray->SetName("Intensity");
             vtkDataSet *outDataSet = vtkPolyData::New();
-            outDataSet->GetPointData()->AddArray(imageArray);
-            outDataSet->GetPointData()->CopyFieldOn("Image");
+            outDataSet->GetPointData()->AddArray(intensityArray);
+            outDataSet->GetPointData()->CopyFieldOn("Intensity");
 
             pdarray[iBin] = outDataSet;
             indarray[iBin] = iBin;
         }
 
         //
+        // Add the path lengths.
+        //
+        for (int iBin = 0; iBin < numBins; iBin++)
+        {
+            vtkDataArray *pathArray;
+            MergeFragments(iBin, pathLengthFragments, pathArray);
+            pathArray->SetName("PathLength");
+            vtkDataSet *outDataSet = vtkPolyData::New();
+            outDataSet->GetPointData()->AddArray(pathArray);
+            outDataSet->GetPointData()->CopyFieldOn("PathLength");
+
+            pdarray[numBins+iBin] = outDataSet;
+            indarray[numBins+iBin] = numBins+iBin;
+        }
+
+        //
         // Create an avtDataTree to return the results in.
         //
-        avtDataTree_p newtree = new avtDataTree(numBins, pdarray, indarray);
+        avtDataTree_p newtree = new avtDataTree(2*numBins, pdarray, indarray);
         SetOutputDataTree(newtree);
-        for (int iBin = 0; iBin < numBins; iBin++)
+        for (int iBin = 0; iBin < 2*numBins; iBin++)
         {
             pdarray[iBin]->Delete();
         }
@@ -719,9 +802,15 @@ avtXRayFilter::Execute(void)
     // Clean up temporary arrays.
     //
     for (int i = 0; i < nImageFragments; i++)
-        imageFragments[i]->Delete();
+    {
+        intensityFragments[i]->Delete();
+        pathLengthFragments[i]->Delete();
+    }
     delete [] imageFragmentSizes;
-    delete [] imageFragments;
+    delete [] intensityFragments;
+    delete [] pathLengthFragments;
+    intensityFragments = NULL;
+    pathLengthFragments = NULL;
 
     // Free the memory from the GetAllLeaves function call.
     delete [] dataSets;
@@ -2112,6 +2201,10 @@ avtXRayFilter::RedistributeLines(int nLeaves, int *nLinesPerDataset,
 //  Programmer: Eric Brugger
 //  Creation:   December 28, 2010
 //
+//  Modifications:
+//    Eric Brugger, Thu Jun  4 15:58:10 PDT 2015
+//    I added an option to enable outputting the ray bounds to a vtk file.
+//
 // ****************************************************************************
 
 void
@@ -2175,6 +2268,65 @@ avtXRayFilter::CalculateLines(void)
     farDx = (2. * farWidth)   / imageSize[0];
     farDy = (2. * farHeight)  / imageSize[1];
 
+    //
+    // If this is the first processor and the first group of lines
+    // then output the ray bounds if requested.
+    //
+    if (outputRayBounds && PAR_Rank() == 0 && lineOffset == 0)
+    {
+        double x[8], y[8], z[8];
+        double y2 = - (2. * imagePan[1] * imageZoom + 1) * nearHeight +
+                    nearDy / 2.;
+        double y3 = - (2. * imagePan[1] * imageZoom + 1) * farHeight +
+                    farDy / 2.;
+        int ii = 0;
+        for (int j = 0; j < 2; j++)
+        {
+            double x2 = - (2. * imagePan[0] * imageZoom + 1) * nearWidth +
+                        nearDx / 2.;
+            double x3 = - (2. * imagePan[0] * imageZoom + 1) * farWidth +
+                        farDx / 2.;
+            for (int i = 0; i < 2; i++)
+            {
+                x[ii] = nearOrigin[0] + x2 * viewSide[0] + y2 * viewUp[0];
+                y[ii] = nearOrigin[1] + x2 * viewSide[1] + y2 * viewUp[1];
+                z[ii] = nearOrigin[2] + x2 * viewSide[2] + y2 * viewUp[2];
+                ii++;
+                x[ii] = farOrigin[0]  + x3 * viewSide[0] + y3 * viewUp[0];
+                y[ii] = farOrigin[1]  + x3 * viewSide[1] + y3 * viewUp[1];
+                z[ii] = farOrigin[2]  + x3 * viewSide[2] + y3 * viewUp[2];
+                ii++;
+                x2 += (imageSize[0] - 1) * nearDx;
+                x3 += (imageSize[0] - 1) * farDx;
+            }
+            y2 += (imageSize[1] - 1) * nearDy;
+            y3 += (imageSize[1] - 1) * farDy;
+        }
+        FILE *f = fopen("ray_bounds.vtk", "w");
+        fprintf(f, "# vtk DataFile Version 3.0\n");
+        fprintf(f, "vtk output\n");
+        fprintf(f, "ASCII\n");
+        fprintf(f, "DATASET POLYDATA\n");
+        fprintf(f, "POINTS 8 float\n");
+        for (int i = 0; i < 8; i++)
+            fprintf(f, "%g %g %g\n", x[i], y[i], z[i]);
+        fprintf(f, "\n");
+        fprintf(f, "POLYGONS 12 36\n");
+            fprintf(f, "2 0 1\n");
+        fprintf(f, "2 2 3\n");
+        fprintf(f, "2 4 5\n");
+        fprintf(f, "2 6 7\n");
+        fprintf(f, "2 0 2\n");
+        fprintf(f, "2 2 6\n");
+        fprintf(f, "2 6 4\n");
+        fprintf(f, "2 4 0\n");
+        fprintf(f, "2 1 3\n");
+        fprintf(f, "2 3 7\n");
+        fprintf(f, "2 7 5\n");
+        fprintf(f, "2 5 1\n");
+        fclose(f);
+    }
+
     int jstart = lineOffset / imageSize[0];
     int jend = jstart + (linesForThisPass / imageSize[0]);
     double y2 = - (2. * imagePan[1] * imageZoom + 1) * nearHeight +
@@ -2415,6 +2567,12 @@ SortSegments(int nLines, int *lineId, double *dists)
 //    I added support for specifying background intensities on a per bin
 //    basis.
 //
+//    Eric Brugger, Thu May 21 12:21:25 PDT 2015
+//    I added support for debugging a ray.
+//
+//    Eric Brugger, Wed May 27 10:10:28 PDT 2015
+//    I modified the filter to also output the path length field.
+//
 // ****************************************************************************
 
 template <typename T>
@@ -2444,35 +2602,46 @@ avtXRayFilter::IntegrateLines(int pixelOffset, int nPts, int *lineId,
     //
     // Do the integration.
     //
-    if (radBins == NULL)
+    if (intensityBins == NULL)
     {
-        radBins = new double[numBins];
+        intensityBins = new double[numBins];
+        pathBins = new double[numBins];
     }
     for (int i = 0 ; i < numBins ; i++)
     {
-        radBins[i] = background[i];
+        intensityBins[i] = background[i];
+        pathBins[i] = 0.;
     }
 
     int prevLineId = -1;
     if (cellDataType == VTK_FLOAT)
-        imageFragments[iFragment] = vtkFloatArray::New();
+    {
+        intensityFragments[iFragment] = vtkFloatArray::New();
+        pathLengthFragments[iFragment] = vtkFloatArray::New();
+    }
     else
-        imageFragments[iFragment] = vtkDoubleArray::New();
+    {
+        intensityFragments[iFragment] = vtkDoubleArray::New();
+        pathLengthFragments[iFragment] = vtkDoubleArray::New();
+    }
 
-    imageFragments[iFragment]->SetNumberOfTuples(imageFragmentSizes[iFragment]*numBins);
+    intensityFragments[iFragment]->SetNumberOfTuples(imageFragmentSizes[iFragment]*numBins);
+    pathLengthFragments[iFragment]->SetNumberOfTuples(imageFragmentSizes[iFragment]*numBins);
 
-    avtDirectAccessor<T> currentImageFragment(imageFragments[iFragment]);
+    avtDirectAccessor<T> currentIntensityFragment(intensityFragments[iFragment]);
+    avtDirectAccessor<T> currentPathFragment(pathLengthFragments[iFragment]);
     for (int i = 0; i < imageFragmentSizes[iFragment]; i++)
     {
         for (int j = 0; j < numBins; j++)
-            currentImageFragment.SetTuple1(i*numBins+j, background[j]);
+            currentIntensityFragment.SetTuple1(i*numBins+j, background[j]);
+        for (int j = 0; j < numBins; j++)
+            currentPathFragment.SetTuple1(i*numBins+j, 0.);
     }
 
     iFragment++;
 
     for (int i = 0; i < nPts; i++)
     {
-
         int iPt = segmentOrder[i];
 
         if (lineId[iPt] != prevLineId)
@@ -2480,12 +2649,15 @@ avtXRayFilter::IntegrateLines(int pixelOffset, int nPts, int *lineId,
             if (prevLineId != -1)
             {
                 for (int j = 0; j < numBins; j++)
-                    currentImageFragment.SetTuple1((prevLineId-pixelOffset)*numBins+j, radBins[j]);
+                    currentIntensityFragment.SetTuple1((prevLineId-pixelOffset)*numBins+j, intensityBins[j]);
+                for (int j = 0; j < numBins; j++)
+                    currentPathFragment.SetTuple1((prevLineId-pixelOffset)*numBins+j, pathBins[j]);
             }
 
             for (int j = 0; j < numBins; j++)
             {
-                radBins[j] = background[j];
+                intensityBins[j] = background[j];
+                pathBins[j] = 0.;
             }
             prevLineId = lineId[iPt];
         }
@@ -2498,16 +2670,18 @@ avtXRayFilter::IntegrateLines(int pixelOffset, int nPts, int *lineId,
         {
             for (int j = 0 ; j < numBins ; j++)
             {
-                double tmp = exp(-a[j]*segLength);
-                radBins[j] = radBins[j] * tmp + (e[j] / a[j]) * (1.0 - tmp);
+                double tmp = exp(-a[j] * segLength);
+                intensityBins[j] = intensityBins[j] * tmp + (e[j] / a[j]) * (1.0 - tmp);
+                pathBins[j] = pathBins[j] + a[j] * segLength;
             }
         }
         else
         {
             for (int j = 0 ; j < numBins ; j++)
             {
-                double tmp = exp(-a[j]*segLength);
-                radBins[j] = radBins[j] * tmp + e[j] * (1.0 - tmp);
+                double tmp = exp(-a[j] * segLength);
+                intensityBins[j] = intensityBins[j] * tmp + e[j] * (1.0 - tmp);
+                pathBins[j] = pathBins[j] + a[j] * segLength;
             }
         }
     }
@@ -2515,7 +2689,62 @@ avtXRayFilter::IntegrateLines(int pixelOffset, int nPts, int *lineId,
     if (prevLineId != -1)
     {
         for (int j = 0; j < numBins; j++)
-            currentImageFragment.SetTuple1((prevLineId-pixelOffset)*numBins+j, radBins[j]);
+            currentIntensityFragment.SetTuple1((prevLineId-pixelOffset)*numBins+j, intensityBins[j]);
+        for (int j = 0; j < numBins; j++)
+            currentPathFragment.SetTuple1((prevLineId-pixelOffset)*numBins+j, pathBins[j]);
+    }
+
+    //
+    // Make another pass if ray debugging is set. We only trace the first
+    // bin with divideEmisByAbsorb off.
+    //
+    if (debugRay != -1)
+    {
+        double intensityBinZero;
+
+        prevLineId = -1;
+
+        FILE *f = NULL;
+        for (int i = 0; i < nPts; i++)
+        {
+            int iPt = segmentOrder[i];
+
+            if (lineId[iPt] != prevLineId)
+            {
+                if (lineOffset + lineId[iPt] == debugRay)
+                {
+                    char filename[80];
+                    SNPRINTF(filename, 80, "ray%d.csv", debugRay);
+                    f = fopen(filename, "w");
+                    fprintf(f, " dist1, dist2, tmp, segLength, a, e, intensityBinZero\n");
+                    intensityBinZero = background[0];
+                }
+                if (lineOffset + prevLineId == debugRay)
+                {
+                    fclose(f);
+                }
+                prevLineId = lineId[iPt];
+            }
+
+            if (lineOffset + lineId[iPt] == debugRay)
+            {
+                double segLength = dist[iPt*2+1] - dist[iPt*2];
+                T *a = &(absorbtivity[iPt*numBins]);
+                T *e = &(emissivity[iPt*numBins]);
+
+                // bin zero.
+                double tmp = exp(-a[0] * segLength);
+                intensityBinZero = intensityBinZero * tmp + e[0] * (1.0 - tmp);
+                fprintf(f, "%g, %g, %g, %g, %g, %g, %g\n",
+                        dist[iPt*2], dist[iPt*2+1], tmp, segLength,
+                        a[0], e[0], intensityBinZero);
+            }
+        }
+
+        if (prevLineId != -1 && lineOffset + prevLineId == debugRay)
+        {
+            fclose(f);
+        }
     }
 
     delete [] segmentOrder;
@@ -2524,10 +2753,10 @@ avtXRayFilter::IntegrateLines(int pixelOffset, int nPts, int *lineId,
 
 
 // ****************************************************************************
-//  Method: avtXRayFilter::CollectImages
+//  Method: avtXRayFilter::CollectFragments
 //
 //  Purpose:
-//    Collect the images on the first processor.
+//    Collect the fragments on the first processor.
 //
 //  Programmer: Eric Brugger
 //  Creation:   June 30, 2010
@@ -2542,11 +2771,15 @@ avtXRayFilter::IntegrateLines(int pixelOffset, int nPts, int *lineId,
 //    I modified the routine to only create the final image on processor
 //    zero. This didn't seem to cause any problems, but was wasteful.
 //
+//    Eric Brugger, Wed May 27 10:10:28 PDT 2015
+//    I modified the filter to also output the path length field.
+//
 // ****************************************************************************
 
 template <typename T>
 void
-avtXRayFilter::CollectImages(int root, vtkDataArray *&image)
+avtXRayFilter::CollectFragments(int root, int nFragments, int *fragmentSizes,
+    vtkDataArray **fragments, vtkDataArray *&collectedFragments)
 {
 #ifdef PARALLEL
     int nProcs = PAR_Size();
@@ -2555,17 +2788,17 @@ avtXRayFilter::CollectImages(int root, vtkDataArray *&image)
     // Set up the send information.
     //
     int sendCount = 0;
-    for (int i = 0; i < nImageFragments; i++)
-        sendCount += imageFragmentSizes[i]*numBins;
+    for (int i = 0; i < nFragments; i++)
+        sendCount += fragmentSizes[i]*numBins;
 
     T *sendBuf = new T[sendCount];
-    for (int i = 0, ndx = 0; i < nImageFragments; i++)
+    for (int i = 0, ndx = 0; i < nFragments; i++)
     {
-        avtDirectAccessor<T> currentImageFragment(imageFragments[i]);
-        while (currentImageFragment.Iterating())
+        avtDirectAccessor<T> currentFragment(fragments[i]);
+        while (currentFragment.Iterating())
         {
-            sendBuf[ndx] = currentImageFragment.GetTuple1();
-            currentImageFragment++;
+            sendBuf[ndx] = currentFragment.GetTuple1();
+            currentFragment++;
             ndx++;
         }
     }
@@ -2576,16 +2809,16 @@ avtXRayFilter::CollectImages(int root, vtkDataArray *&image)
     int *recvCounts = new int[nProcs];
     int *displs = new int[nProcs];
 
-    recvCounts[0] = ((nImageFragments - 1) * pixelsForFirstPassFirstProc +
+    recvCounts[0] = ((nFragments - 1) * pixelsForFirstPassFirstProc +
         pixelsForLastPassFirstProc) * numBins;
     displs[0] = 0;
     for (int i = 1; i < nProcs-1; i++)
     {
-        recvCounts[i] = ((nImageFragments - 1) * pixelsForFirstPassFirstProc +
+        recvCounts[i] = ((nFragments - 1) * pixelsForFirstPassFirstProc +
             pixelsForLastPassFirstProc) * numBins;
         displs[i] = displs[i-1] + recvCounts[i-1];
     }
-    recvCounts[nProcs-1] = ((nImageFragments - 1) * pixelsForFirstPassLastProc +
+    recvCounts[nProcs-1] = ((nFragments - 1) * pixelsForFirstPassLastProc +
         pixelsForLastPassLastProc) * numBins;
     displs[nProcs-1] = displs[nProcs-1-1] + recvCounts[nProcs-1-1];
 
@@ -2612,27 +2845,27 @@ avtXRayFilter::CollectImages(int root, vtkDataArray *&image)
         // Reorganize the receive buffer in the correct order.
         //
         if (cellDataType == VTK_FLOAT)
-            image = vtkFloatArray::New();
+            collectedFragments = vtkFloatArray::New();
         else
-            image = vtkDoubleArray::New();
-        image->SetNumberOfTuples(numPixels * numBins);
-        avtDirectAccessor<T> imageA(image);
-        for (int i = 0; i < nImageFragments-1; i++)
+            collectedFragments = vtkDoubleArray::New();
+        collectedFragments->SetNumberOfTuples(numPixels * numBins);
+        avtDirectAccessor<T> collectedFragmentsA(collectedFragments);
+        for (int i = 0; i < nFragments-1; i++)
         {
             for (int j = 0; j < nProcs-1; j++)
             {
                 for (int k = 0; k < pixelsForFirstPassFirstProc*numBins; k++)
                 {
-                    imageA.SetTuple1(recvBuf[displs[j]]);
-                    imageA++;
+                    collectedFragmentsA.SetTuple1(recvBuf[displs[j]]);
+                    collectedFragmentsA++;
                     displs[j]++;
                 }
             }
             int j = nProcs - 1;
             for (int k = 0; k < pixelsForFirstPassLastProc*numBins; k++)
             {
-                imageA.SetTuple1(recvBuf[displs[j]]);
-                imageA++;
+                collectedFragmentsA.SetTuple1(recvBuf[displs[j]]);
+                collectedFragmentsA++;
                 displs[j]++;
             }
         }
@@ -2640,16 +2873,16 @@ avtXRayFilter::CollectImages(int root, vtkDataArray *&image)
         {
             for (int k = 0; k < pixelsForLastPassFirstProc*numBins; k++)
             {
-                imageA.SetTuple1(recvBuf[displs[j]]);
-                imageA++;
+                collectedFragmentsA.SetTuple1(recvBuf[displs[j]]);
+                collectedFragmentsA++;
                 displs[j]++;
             }
         }
         int j = nProcs - 1;
         for (int k = 0; k < pixelsForLastPassLastProc*numBins; k++)
         {
-            imageA.SetTuple1(recvBuf[displs[j]]);
-            imageA++;
+            collectedFragmentsA.SetTuple1(recvBuf[displs[j]]);
+            collectedFragmentsA++;
             displs[j]++;
         }
 
@@ -2657,10 +2890,10 @@ avtXRayFilter::CollectImages(int root, vtkDataArray *&image)
     }
     else
     {
-        image = NULL ;
+        collectedFragments = NULL ;
     }
 #else
-    image = NULL;
+    collectedFragments = NULL;
 #endif
 }
 
@@ -2877,37 +3110,39 @@ IntersectLineWithRevolvedSegment(const double *line_pt,
 
 template <class Accessor>
 void
-FillImageArray_Impl(int iBin, int nB, int nIF, int *sizes, vtkDataArray **iF, vtkDataArray *&iA)
+MergeFragments_Impl(int iBin, int numBins, int nFragments, int *fragmentSizes,
+    vtkDataArray **fragments, vtkDataArray *&outputArray)
 {
-    Accessor ibuf(iA);
+    Accessor ibuf(outputArray);
     ibuf.InitTraversal();
-    for (int i = 0; i < nIF; ++i)
+    for (int i = 0; i < nFragments; ++i)
     {
-        Accessor currentImageFragment(iF[i]);
-        for (int j = 0; j < sizes[i]; ++j)
+        Accessor currentFragment(fragments[i]);
+        for (int j = 0; j < fragmentSizes[i]; ++j)
         {
-            ibuf.SetTuple1(currentImageFragment.GetTuple1(j*nB+iBin));
+            ibuf.SetTuple1(currentFragment.GetTuple1(j*numBins+iBin));
             ibuf++;
         }
     }
 }
 
 void
-avtXRayFilter::FillImageArray(int iBin,  vtkDataArray *&imageArray)
+avtXRayFilter::MergeFragments(int iBin, vtkDataArray **fragments,
+    vtkDataArray *&outputArray)
 {
     if (cellDataType == VTK_FLOAT)
     {
-        imageArray = vtkFloatArray::New();
-        imageArray->SetNumberOfTuples(imageSize[0]*imageSize[1]);
-        FillImageArray_Impl<avtDirectAccessor<float> >(iBin, numBins, 
-            nImageFragments, imageFragmentSizes, imageFragments, imageArray);
+        outputArray = vtkFloatArray::New();
+        outputArray->SetNumberOfTuples(imageSize[0]*imageSize[1]);
+        MergeFragments_Impl<avtDirectAccessor<float> >(iBin, numBins, 
+            nImageFragments, imageFragmentSizes, fragments, outputArray);
     }
     else // if (cellDataType == VTK_DOUBLE)
     {
-        imageArray = vtkDoubleArray::New();
-        imageArray->SetNumberOfTuples(imageSize[0]*imageSize[1]);
-        FillImageArray_Impl<avtDirectAccessor<double> >(iBin, numBins,
-            nImageFragments, imageFragmentSizes, imageFragments, imageArray);
+        outputArray = vtkDoubleArray::New();
+        outputArray->SetNumberOfTuples(imageSize[0]*imageSize[1]);
+        MergeFragments_Impl<avtDirectAccessor<double> >(iBin, numBins,
+            nImageFragments, imageFragmentSizes, fragments, outputArray);
     }
 }
 
@@ -2926,6 +3161,9 @@ avtXRayFilter::FillImageArray(int iBin,  vtkDataArray *&imageArray)
 //    only hexes.
 //
 //  Modifications:
+//    Eric Brugger, Thu May 21 12:21:25 PDT 2015
+//    I enhanced the routine to support structured as well as unstructured
+//    grids.
 //
 // ****************************************************************************
 
@@ -2935,6 +3173,14 @@ avtXRayFilter::DumpRayHexIntersections(int iProc, int iDataset,
     vtkDataSet *ds, vtkDataArray **dataArrays)
 {
     //
+    // We can only handle structured and unstructured grids. Return if
+    // this isn't the case.
+    //
+    if (ds->GetDataObjectType() != VTK_STRUCTURED_GRID &&
+        ds->GetDataObjectType() != VTK_UNSTRUCTURED_GRID)
+        return;
+
+    //
     // Determine the id within the current strip of the line. Return if
     // the line is outside of the current strip.
     //
@@ -2944,7 +3190,7 @@ avtXRayFilter::DumpRayHexIntersections(int iProc, int iDataset,
         return;
 
     //
-    // Determine the number of cells where the line ids match. Retrun if
+    // Determine the number of cells where the line ids match. Return if
     // if no cells intersect the line of interest.
     //
     int nCells = 0;
@@ -2959,7 +3205,8 @@ avtXRayFilter::DumpRayHexIntersections(int iProc, int iDataset,
     // Write the vtk file.
     //
     char filename[80];
-    SNPRINTF(filename, 80, "proc%02d_ds%02d.vtk", iProc, iDataset);
+    SNPRINTF(filename, 80, "ray%d_proc%02d_ds%02d.vtk",
+             debugRay, iProc, iDataset);
     FILE *f = fopen(filename, "w");
     fprintf(f, "# vtk DataFile Version 3.0\n");
     fprintf(f, "vtk output\n");
@@ -2967,31 +3214,91 @@ avtXRayFilter::DumpRayHexIntersections(int iProc, int iDataset,
     fprintf(f, "DATASET UNSTRUCTURED_GRID\n");
     fprintf(f, "POINTS %d float\n", nCells * 8);
 
-    vtkUnstructuredGrid *ugrid = (vtkUnstructuredGrid *) ds;
-    vtkPoints *points = ugrid->GetPoints();
+    if (ds->GetDataObjectType() == VTK_STRUCTURED_GRID)
+    {
+        vtkStructuredGrid *sgrid = (vtkStructuredGrid *) ds;
+        vtkPoints *points = sgrid->GetPoints();
+
+        int ndims[3];
+        sgrid->GetDimensions(ndims);
 
-    vtkIdTypeArray *cellLocations = ugrid->GetCellLocationsArray();
-    vtkCellArray *cells = ugrid->GetCells();
+        int zdims[3];
+        zdims[0] = ndims[0] - 1;
+        zdims[1] = ndims[1] - 1;
+        zdims[2] = ndims[2] - 1;
 
-    vtkIdType *nl = cells->GetPointer();
-    vtkIdType *cl = cellLocations->GetPointer(0);
+        int nx = ndims[0];
+        int ny = ndims[1];
+        int nxy = nx * ny;
 
-    double p0[3], p1[3], p2[3], p3[3], p4[3], p5[3], p6[3], p7[3];
-    for (size_t i = 0; i < cells_matched.size(); i++)
+        int nx2 = zdims[0];
+        int ny2 = zdims[1];
+        int nxy2 = nx2 * ny2;
+
+        double p0[3], p1[3], p2[3], p3[3], p4[3], p5[3], p6[3], p7[3];
+        for (size_t i = 0; i < cells_matched.size(); i++)
+        {
+            if (line_id[i] == strip_id)
+            {
+                int iCell = cells_matched[i];
+
+                int iZ = iCell / nxy2;
+                int iXY = iCell % nxy2;
+                int iY = iXY / nx2;
+                int iX = iXY % nx2;
+                int idx = iX+ iY*nx + iZ*nxy;
+
+                int ids[8];
+                ids[0] = idx;
+                ids[1] = idx + 1;
+                ids[2] = idx + 1 + nx;
+                ids[3] = idx + nx;
+                idx += nxy;
+                ids[4] = idx;
+                ids[5] = idx + 1;
+                ids[6] = idx + 1 + nx;
+                ids[7] = idx + nx;
+
+                avtXRayFilter_GetCellPointsMacro(8);
+                fprintf(f, "%g %g %g\n", p0[0], p0[1], p0[2]);
+                fprintf(f, "%g %g %g\n", p1[0], p1[1], p1[2]);
+                fprintf(f, "%g %g %g\n", p2[0], p2[1], p2[2]);
+                fprintf(f, "%g %g %g\n", p3[0], p3[1], p3[2]);
+                fprintf(f, "%g %g %g\n", p4[0], p4[1], p4[2]);
+                fprintf(f, "%g %g %g\n", p5[0], p5[1], p5[2]);
+                fprintf(f, "%g %g %g\n", p6[0], p6[1], p6[2]);
+                fprintf(f, "%g %g %g\n", p7[0], p7[1], p7[2]);
+            }
+        }
+    }
+    else if (ds->GetDataObjectType() == VTK_UNSTRUCTURED_GRID)
     {
-        if (line_id[i] == strip_id)
+        vtkUnstructuredGrid *ugrid = (vtkUnstructuredGrid *) ds;
+        vtkPoints *points = ugrid->GetPoints();
+
+        vtkIdTypeArray *cellLocations = ugrid->GetCellLocationsArray();
+        vtkCellArray *cells = ugrid->GetCells();
+
+        vtkIdType *nl = cells->GetPointer();
+        vtkIdType *cl = cellLocations->GetPointer(0);
+
+        double p0[3], p1[3], p2[3], p3[3], p4[3], p5[3], p6[3], p7[3];
+        for (size_t i = 0; i < cells_matched.size(); i++)
         {
-            int iCell = cells_matched[i];
-            vtkIdType *ids = &(nl[cl[iCell]+1]);
-            avtXRayFilter_GetCellPointsMacro(8);
-            fprintf(f, "%g %g %g\n", p0[0], p0[1], p0[2]);
-            fprintf(f, "%g %g %g\n", p1[0], p1[1], p1[2]);
-            fprintf(f, "%g %g %g\n", p2[0], p2[1], p2[2]);
-            fprintf(f, "%g %g %g\n", p3[0], p3[1], p3[2]);
-            fprintf(f, "%g %g %g\n", p4[0], p4[1], p4[2]);
-            fprintf(f, "%g %g %g\n", p5[0], p5[1], p5[2]);
-            fprintf(f, "%g %g %g\n", p6[0], p6[1], p6[2]);
-            fprintf(f, "%g %g %g\n", p7[0], p7[1], p7[2]);
+            if (line_id[i] == strip_id)
+            {
+                int iCell = cells_matched[i];
+                vtkIdType *ids = &(nl[cl[iCell]+1]);
+                avtXRayFilter_GetCellPointsMacro(8);
+                fprintf(f, "%g %g %g\n", p0[0], p0[1], p0[2]);
+                fprintf(f, "%g %g %g\n", p1[0], p1[1], p1[2]);
+                fprintf(f, "%g %g %g\n", p2[0], p2[1], p2[2]);
+                fprintf(f, "%g %g %g\n", p3[0], p3[1], p3[2]);
+                fprintf(f, "%g %g %g\n", p4[0], p4[1], p4[2]);
+                fprintf(f, "%g %g %g\n", p5[0], p5[1], p5[2]);
+                fprintf(f, "%g %g %g\n", p6[0], p6[1], p6[2]);
+                fprintf(f, "%g %g %g\n", p7[0], p7[1], p7[2]);
+            }
         }
     }
     fprintf(f, "\n");
diff --git a/src/avt/Filters/avtXRayFilter.h b/src/avt/Filters/avtXRayFilter.h
index 9f132ae..9714318 100644
--- a/src/avt/Filters/avtXRayFilter.h
+++ b/src/avt/Filters/avtXRayFilter.h
@@ -102,6 +102,15 @@
 //    I added support for specifying background intensities on a per bin
 //    basis.
 //
+//    Eric Brugger, Thu May 21 12:20:04 PDT 2015
+//    I added support for debugging a ray.
+//
+//    Eric Brugger, Wed May 27 10:04:57 PDT 2015
+//    I modified the filter to also output the path length field.
+//
+//    Eric Brugger, Thu Jun  4 15:56:25 PDT 2015
+//    I added an option to enable outputting the ray bounds to a vtk file.
+//
 // ****************************************************************************
 
 class AVTFILTERS_API avtXRayFilter : public avtDatasetToDatasetFilter
@@ -135,6 +144,8 @@ class AVTFILTERS_API avtXRayFilter : public avtDatasetToDatasetFilter
     void                            SetDivideEmisByAbsorb(bool);
     void                            SetBackgroundIntensity(double);
     void                            SetBackgroundIntensities(double *, int);
+    void                            SetDebugRay(int);
+    void                            SetOutputRayBounds(bool);
 
   protected:
     std::string                     absVarName;
@@ -164,7 +175,8 @@ class AVTFILTERS_API avtXRayFilter : public avtDatasetToDatasetFilter
     int                             numPixels;
     int                             numPixelsPerIteration;
 
-    double                         *radBins;
+    double                         *intensityBins;
+    double                         *pathBins;
 
     int                             numBins;    //Used for radiation bins.
                                                 //Number is obtained from the
@@ -173,7 +185,8 @@ class AVTFILTERS_API avtXRayFilter : public avtDatasetToDatasetFilter
     int                             iFragment;
     int                             nImageFragments;
     int                            *imageFragmentSizes;
-    vtkDataArray                  **imageFragments;
+    vtkDataArray                  **intensityFragments;
+    vtkDataArray                  **pathLengthFragments;
 
     int                             iPass;
     int                             numPasses;
@@ -187,6 +200,7 @@ class AVTFILTERS_API avtXRayFilter : public avtDatasetToDatasetFilter
     int                             pixelsForLastPassLastProc;
 
     int                             debugRay;
+    bool                            outputRayBounds;
 
     virtual void                    Execute(void);
 
@@ -221,9 +235,10 @@ class AVTFILTERS_API avtXRayFilter : public avtDatasetToDatasetFilter
     void                            IntegrateLines(int, int, int *, double *,
                                         T *, T *);
     template <typename T>
-    void                            CollectImages(int, vtkDataArray *&);
-    void                            FillImageArray(int iBin,  
-                                                   vtkDataArray *&imageArray);
+    void                            CollectFragments(int, int, int*,
+                                        vtkDataArray **, vtkDataArray *&);
+    void                            MergeFragments(int iBin, vtkDataArray **,
+                                        vtkDataArray *&imageArray);
 
     void                            DumpRayHexIntersections(int, int,
                                         std::vector<int> &, std::vector<int> &,
diff --git a/src/avt/Pipeline/Data/avtDataTree.C b/src/avt/Pipeline/Data/avtDataTree.C
index 7a32f3c..d02b3da 100644
--- a/src/avt/Pipeline/Data/avtDataTree.C
+++ b/src/avt/Pipeline/Data/avtDataTree.C
@@ -290,6 +290,43 @@ avtDataTree::avtDataTree(int n, vtkDataSet **ds, vector<int> &ind)
     dataRep = NULL;
 }
 
+
+// ****************************************************************************
+//  Method: avtDataTree constructor
+//
+//  Arguments:
+//    n       The number of children for this tree. 
+//    ds      The vtkDataSets that are this tree's leaves. 
+//    ind     The indices for each ds.
+//    lab     The labels for each ds.
+//
+//  Programmer: Kathleen Biagas 
+//  Creation:   June 8, 2015
+//
+// ****************************************************************************
+
+avtDataTree::avtDataTree(int n, vtkDataSet **ds, vector<int> &ind, vector<string> &lab)
+{
+    if (ds == NULL || ind.size() != (size_t)n || n == 0 || lab.size() != ind.size())
+    {
+        EXCEPTION0(NoInputException);
+    }
+    nChildren = n;
+    children = new avtDataTree_p [nChildren];
+    for (int i = 0; i < nChildren; i++)
+    {
+        if (ds[i] != NULL) 
+        {
+            children[i] = new avtDataTree(ds[i], ind[i], lab[i]);
+        }
+        else
+        {
+            children[i] = NULL;
+        }
+    }
+    dataRep = NULL;
+}
+
 // ****************************************************************************
 //  Method: avtDataTree constructor
 //
diff --git a/src/avt/Pipeline/Data/avtDataTree.h b/src/avt/Pipeline/Data/avtDataTree.h
index 454f451..b875c7f 100644
--- a/src/avt/Pipeline/Data/avtDataTree.h
+++ b/src/avt/Pipeline/Data/avtDataTree.h
@@ -138,6 +138,8 @@ class PIPELINE_API avtDataTree
                              avtDataTree(avtDataRepresentation *);
                              avtDataTree(int, vtkDataSet **, int *);
                              avtDataTree(int, vtkDataSet **,std::vector<int>&);
+                             avtDataTree(int, vtkDataSet **,std::vector<int>&,
+                                         std::vector<std::string>&);
                              avtDataTree(int, vtkDataSet **, int);
                              avtDataTree(int, vtkDataSet **, int,
                                          std::vector<std::string>&);
diff --git a/src/avt/Pipeline/Data/avtDataset.h b/src/avt/Pipeline/Data/avtDataset.h
index 0819f9c..3f53a29 100644
--- a/src/avt/Pipeline/Data/avtDataset.h
+++ b/src/avt/Pipeline/Data/avtDataset.h
@@ -165,6 +165,7 @@ class PIPELINE_API avtDataset : public avtDataObject
     friend                   class avtTimeIteratorExpression;
     friend                   class avtXRayImageQuery;
     friend                   class avtResampleExpression;
+    friend                   class avtIndexSelectFilter;
 #ifdef HAVE_LIB_R
     friend                   class  avtExtremeValueAnalysisFilter;
     friend                   class  avtPeaksOverThresholdFilter;
diff --git a/src/avt/Pipeline/Sinks/avtDatabaseWriter.C b/src/avt/Pipeline/Sinks/avtDatabaseWriter.C
index 19165b4..dc015e2 100644
--- a/src/avt/Pipeline/Sinks/avtDatabaseWriter.C
+++ b/src/avt/Pipeline/Sinks/avtDatabaseWriter.C
@@ -1137,6 +1137,8 @@ avtDatabaseWriter::CreateSinglePolyData(avtDataTree_p root)
 
     // Convert all datasets into polydata.
     std::vector<vtkPolyData *> pds = ConvertDatasetsIntoPolyData(ds, nds);
+    if(ds != NULL)
+        delete [] ds;
 
     // Send the polydatas to rank 0.
     std::vector<vtkPolyData *> allpds = SendPolyDataToRank0(pds);
diff --git a/src/avt/Queries/Queries/avtXRayImageQuery.C b/src/avt/Queries/Queries/avtXRayImageQuery.C
index ecc55f2..f02740c 100644
--- a/src/avt/Queries/Queries/avtXRayImageQuery.C
+++ b/src/avt/Queries/Queries/avtXRayImageQuery.C
@@ -66,6 +66,8 @@
 #include <string>
 #include <vector>
 
+int avtXRayImageQuery::iFileFamily = 0;
+
 // ****************************************************************************
 //  Method: avtXRayImageQuery::avtXRayImageQuery
 //
@@ -105,6 +107,12 @@
 //    I added support for specifying background intensities on a per bin
 //    basis.
 //
+//    Eric Brugger, Thu May 21 12:15:59 PDT 2015
+//    I added support for debugging a ray.
+//
+//    Eric Brugger, Wed May 27 14:37:36 PDT 2015
+//    I added an option to family output files.
+//
 // ****************************************************************************
 
 avtXRayImageQuery::avtXRayImageQuery():
@@ -115,6 +123,8 @@ avtXRayImageQuery::avtXRayImageQuery():
     backgroundIntensity = 0.0;
     backgroundIntensities = NULL;
     nBackgroundIntensities = 0;
+    debugRay = -1;
+    familyFiles = false;
     outputType = 2; // png
     useSpecifiedUpVector = true;
     useOldView = true;
@@ -212,6 +222,19 @@ avtXRayImageQuery::~avtXRayImageQuery()
 //    I added support for specifying background intensities on a per bin
 //    basis.
 //
+//    Eric Brugger, Thu May 21 12:15:59 PDT 2015
+//    I added support for debugging a ray.
+//
+//    Eric BBrugger, Tue May 26 11:47:12 PDT 2015
+//    I corrected a bug with the processing of image_pan, where the values
+//    were being interpreted as integers instead of doubles.
+//
+//    Eric Brugger, Wed May 27 14:37:36 PDT 2015
+//    I added an option to family output files.
+//
+//    Eric Brugger, Thu Jun  4 16:11:47 PDT 2015
+//    I added an option to enable outputting the ray bounds to a vtk file.
+//
 // ****************************************************************************
 
 void
@@ -240,6 +263,15 @@ avtXRayImageQuery::SetInputParams(const MapNode &params)
         SetBackgroundIntensities(v);
     }
 
+    if (params.HasNumericEntry("debug_ray"))
+        SetDebugRay(params.GetEntry("debug_ray")->AsInt());
+
+    if (params.HasNumericEntry("output_ray_bounds"))
+        SetOutputRayBounds(params.GetEntry("output_ray_bounds")->ToBool());
+
+    if (params.HasNumericEntry("family_files"))
+        SetFamilyFiles(params.GetEntry("family_files")->ToBool());
+
     if (params.HasEntry("output_type"))
     {
         if (params.GetEntry("output_type")->TypeName() == "int")
@@ -309,8 +341,8 @@ avtXRayImageQuery::SetInputParams(const MapNode &params)
 
     if (params.HasNumericVectorEntry("image_pan"))
     {
-        intVector v;
-        params.GetEntry("image_pan")->ToIntVector(v);
+        doubleVector v;
+        params.GetEntry("image_pan")->ToDoubleVector(v);
         if (v.size() != 2)
             EXCEPTION2(QueryArgumentException, "image_pan", 2);
         imagePan[0] = v[0]; imagePan[1] = v[1];
@@ -628,6 +660,57 @@ avtXRayImageQuery::SetBackgroundIntensities(const doubleVector &intensities)
 }
 
 // ****************************************************************************
+//  Method: avtXRayImageQuery::SetDebugRay
+//
+//  Purpose:
+//    Set the id of the debug ray.
+//
+//  Programmer: Eric Brugger
+//  Creation:   May 21, 2015
+//
+// ****************************************************************************
+
+void
+avtXRayImageQuery::SetDebugRay(const int &ray)
+{
+    debugRay = ray;
+}
+
+// ****************************************************************************
+//  Method: avtXRayImageQuery::SetOutputRayBounds
+//
+//  Purpose:
+//    Set the output ray bounds flag.
+//
+//  Programmer: Eric Brugger
+//  Creation:   June 4, 2015
+//
+// ****************************************************************************
+
+void
+avtXRayImageQuery::SetOutputRayBounds(const bool &flag)
+{
+    outputRayBounds = flag;
+}
+
+// ****************************************************************************
+//  Method: avtXRayImageQuery::SetFamilyFiles
+//
+//  Purpose:
+//    Set the family files flag.
+//
+//  Programmer: Eric Brugger
+//  Creation:   May 27, 2015
+//
+// ****************************************************************************
+
+void
+avtXRayImageQuery::SetFamilyFiles(const bool &flag)
+{
+    familyFiles = flag;
+}
+
+// ****************************************************************************
 //  Method: avtXRayImageQuery::SetOutputType
 //
 //  Purpose:
@@ -758,6 +841,19 @@ avtXRayImageQuery::GetSecondaryVars(std::vector<std::string> &outVars)
 //    I added support for specifying background intensities on a per bin
 //    basis.
 //
+//    Eric Brugger, Thu May 21 12:15:59 PDT 2015
+//    I added support for debugging a ray.
+//
+//    Eric Brugger, Wed May 27 10:47:29 PDT 2015
+//    I modified the query to also output the path length field when
+//    outputting in bof or bov format.
+//
+//    Eric Brugger, Wed May 27 14:37:36 PDT 2015
+//    I added an option to family output files.
+//
+//    Eric Brugger, Thu Jun  4 16:11:47 PDT 2015
+//    I added an option to enable outputting the ray bounds to a vtk file.
+//
 // ****************************************************************************
 
 void
@@ -816,6 +912,8 @@ avtXRayImageQuery::Execute(avtDataTree_p tree)
     filt->SetBackgroundIntensity(backgroundIntensity);
     filt->SetBackgroundIntensities(backgroundIntensities,
         nBackgroundIntensities);
+    filt->SetDebugRay(debugRay);
+    filt->SetOutputRayBounds(outputRayBounds);
     filt->SetVariableNames(absVarName, emisVarName);
     filt->SetInput(dob);
 
@@ -837,11 +935,11 @@ avtXRayImageQuery::Execute(avtDataTree_p tree)
         //
         avtDataTree_p tree = filt->GetTypedOutput()->GetDataTree();
 
-        int nLeaves;
+        int numLeaves;
         vtkDataSet **leaves;
-        leaves = tree->GetAllLeaves(nLeaves);
+        leaves = tree->GetAllLeaves(numLeaves);
 
-        if (nLeaves <= 0)
+        if (numLeaves <= 0)
         {
             // Free the memory from the GetAllLeaves function call.
             delete [] leaves;
@@ -851,54 +949,130 @@ avtXRayImageQuery::Execute(avtDataTree_p tree)
         }
 
         //
-        // Write out the image.
+        // Create the file base name.
+        //
+        const char *exts[6] = {"bmp", "jpeg", "png", "tif", "bof", "bov"};
+        char baseName[512];
+        bool keepTrying = true;
+        while (keepTrying)
+        {
+            keepTrying = false;
+            if (familyFiles)
+            {
+                //
+                // Create the file base name and increment the family number.
+                //
+                SNPRINTF(baseName, 512, "output%04d.", iFileFamily);
+                if (iFileFamily < 9999) iFileFamily++;
+
+                //
+                // Check if the first file created with the file base name
+                // exists. If it does and we aren't at the maximum, try
+                // the next file base name in the sequence.
+                //
+                char fileName[512];
+                SNPRINTF(fileName, 512, "%s00.%s", baseName, exts[outputType]);
+
+                ifstream ifile(fileName);
+                if (!ifile.fail() && iFileFamily < 9999)
+                {
+                    keepTrying = true;
+                }
+            }
+            else
+            {
+                SNPRINTF(baseName, 512, "output");
+            }
+        }
+
+        //
+        // Write out the intensity and path length. The path length is only
+        // put out when the output format is bof or bov.
         //
-        vtkDataArray *image;
+        int numBins = numLeaves / 2;
+
+        vtkDataArray *intensity;
+        vtkDataArray *pathLength;
         if (outputType >= 0 && outputType <=3)
         {
-            for (int i = 0; i < nLeaves; i++)
+            for (int i = 0; i < numBins; i++)
             {
-                image = leaves[i]->GetPointData()->GetArray("Image");
-                if (image->GetDataType() == VTK_FLOAT)
-                   WriteImage(i, numPixels, (float*) image->GetVoidPointer(0));
-                else if (image->GetDataType() == VTK_DOUBLE)
-                   WriteImage(i, numPixels, (double*) image->GetVoidPointer(0));
-                else if (image->GetDataType() == VTK_INT)
-                   WriteImage(i, numPixels, (int*) image->GetVoidPointer(0));
+                intensity= leaves[i]->GetPointData()->GetArray("Intensity");
+                if (intensity->GetDataType() == VTK_FLOAT)
+                    WriteImage(baseName, i, numPixels,
+                        (float*) intensity->GetVoidPointer(0));
+                else if (intensity->GetDataType() == VTK_DOUBLE)
+                    WriteImage(baseName, i, numPixels,
+                        (double*) intensity->GetVoidPointer(0));
+                else if (intensity->GetDataType() == VTK_INT)
+                    WriteImage(baseName, i, numPixels,
+                        (int*) intensity->GetVoidPointer(0));
             }
         }
         else if (outputType == 4)
         {
-            for (int i = 0; i < nLeaves; i++)
+            for (int i = 0; i < numBins; i++)
             {
-                image = leaves[i]->GetPointData()->GetArray("Image");
-                if (image->GetDataType() == VTK_FLOAT)
-                   WriteFloats(i, numPixels, (float*)image->GetVoidPointer(0));
-                else if (image->GetDataType() == VTK_DOUBLE)
-                   WriteFloats(i, numPixels, (double*)image->GetVoidPointer(0));
-                else if (image->GetDataType() == VTK_INT)
-                   WriteFloats(i, numPixels, (int*)image->GetVoidPointer(0));
+                intensity = leaves[i]->GetPointData()->GetArray("Intensity");
+                pathLength = leaves[numBins+i]->GetPointData()->GetArray("PathLength");
+                if (intensity->GetDataType() == VTK_FLOAT)
+                {
+                    WriteFloats(baseName, i, numPixels,
+                        (float*)intensity->GetVoidPointer(0));
+                    WriteFloats(baseName, numBins+i, numPixels,
+                        (float*)pathLength->GetVoidPointer(0));
+                }
+                else if (intensity->GetDataType() == VTK_DOUBLE)
+                {
+                    WriteFloats(baseName, i, numPixels,
+                        (double*)intensity->GetVoidPointer(0));
+                    WriteFloats(baseName, numBins+i, numPixels,
+                        (double*)pathLength->GetVoidPointer(0));
+                }
+                else if (intensity->GetDataType() == VTK_INT)
+                {
+                    WriteFloats(baseName, i, numPixels,
+                        (int*)intensity->GetVoidPointer(0));
+                    WriteFloats(baseName, numBins+i, numPixels,
+                        (int*)pathLength->GetVoidPointer(0));
+                }
             }
         }
         else if (outputType == 5)
         {
-            for (int i = 0; i < nLeaves; i++)
+            for (int i = 0; i < numBins; i++)
             {
-                image = leaves[i]->GetPointData()->GetArray("Image");
-                if (image->GetDataType() == VTK_FLOAT)
+                intensity = leaves[i]->GetPointData()->GetArray("Intensity");
+                pathLength = leaves[numBins+i]->GetPointData()->GetArray("PathLength");
+                if (intensity->GetDataType() == VTK_FLOAT)
                 {
-                   WriteFloats(i, numPixels, (float*)image->GetVoidPointer(0));
-                   WriteBOVHeader(i, nx, ny, "FLOAT");
+                    WriteFloats(baseName, i, numPixels,
+                        (float*)intensity->GetVoidPointer(0));
+                    WriteBOVHeader(baseName, "intensity", i, nx, ny, "FLOAT");
+                    WriteFloats(baseName, numBins+i, numPixels,
+                        (float*)pathLength->GetVoidPointer(0));
+                    WriteBOVHeader(baseName, "path_length", numBins+i,
+                        nx, ny, "FLOAT");
                 }
-                else if (image->GetDataType() == VTK_DOUBLE)
+                else if (intensity->GetDataType() == VTK_DOUBLE)
                 {
-                   WriteFloats(i, numPixels, (double*)image->GetVoidPointer(0));
-                   WriteBOVHeader(i, nx, ny, "DOUBLE");
+                    WriteFloats(baseName, i, numPixels,
+                        (double*)intensity->GetVoidPointer(0));
+                    WriteBOVHeader(baseName, "intensity", i, nx, ny, "DOUBLE");
+                    WriteFloats(baseName, numBins+i, numPixels,
+                        (double*)pathLength->GetVoidPointer(0));
+                    WriteBOVHeader(baseName, "path_length", numBins+i,
+                        nx, ny, "FLOAT");
                 }
-                else if (image->GetDataType() == VTK_INT)
+                else if (intensity->GetDataType() == VTK_INT)
                 {
-                   WriteFloats(i, numPixels, (int*)image->GetVoidPointer(0));
-                   WriteBOVHeader(i, nx, ny, "INT");
+                    WriteFloats(baseName, i, numPixels,
+                        (int*)intensity->GetVoidPointer(0));
+                    WriteBOVHeader(baseName, "intensity", i, nx, ny, "INT");
+                    WriteFloats(baseName, numBins+i, numPixels,
+                        (int*)pathLength->GetVoidPointer(0));
+                    WriteBOVHeader(baseName, "path_length", numBins+i,
+                        nx, ny, "FLOAT");
                 }
             }
         }
@@ -909,17 +1083,29 @@ avtXRayImageQuery::Execute(avtDataTree_p tree)
         if (outputType >=0 && outputType <= 5)
         {
             std::string msg = "";
-            const char *exts[6] = {"bmp", "jpeg", "png", "tif", "bof", "bov"};
             char buf[512];
     
-            if (nLeaves == 1)
+            if (numBins == 1 && outputType < 4)
+            {
                 SNPRINTF(buf, 512, "The x ray image query results were "
-                         "written to the file output00.%s\n",
+                         "written to the file %s00.%s\n", baseName,
                          exts[outputType]);
+            }
             else
-                SNPRINTF(buf, 512, "The x ray image query results were "
-                         "written to the files output00.%s - output%02d.%s\n",
-                         exts[outputType], nLeaves - 1, exts[outputType]);
+                if (outputType < 4)
+                {
+                    SNPRINTF(buf, 512, "The x ray image query results were "
+                        "written to the files %s00.%s - %s%02d.%s\n",
+                        baseName, exts[outputType], baseName, numBins - 1,
+                        exts[outputType]);
+                }
+                else
+                {
+                    SNPRINTF(buf, 512, "The x ray image query results were "
+                        "written to the files %s00.%s - %s%02d.%s\n",
+                        baseName, exts[outputType], baseName, 2*numBins - 1,
+                        exts[outputType]);
+                }
             msg += buf;
 
             SetResultMessage(msg);
@@ -954,11 +1140,15 @@ avtXRayImageQuery::Execute(avtDataTree_p tree)
 //    I moved all the logic for doing the ray integration and creating the
 //    image in chunks to avtXRayFilter.
 //
+//    Eric Brugger, Wed May 27 14:37:36 PDT 2015
+//    I added an option to family output files.
+//
 // ****************************************************************************
 
 template <typename T>
 void
-avtXRayImageQuery::WriteImage(int iImage, int nPixels, T *fbuf)
+avtXRayImageQuery::WriteImage(const char *baseName, int iImage, int nPixels,
+    T *fbuf)
 {
     //
     // Determine the range of the data excluding values less than zero.
@@ -1000,7 +1190,7 @@ avtXRayImageQuery::WriteImage(int iImage, int nPixels, T *fbuf)
     {
         vtkImageWriter *writer = vtkBMPWriter::New();
         char fileName[24];
-        sprintf(fileName, "output%02d.bmp", iImage);
+        sprintf(fileName, "%s%02d.bmp", baseName, iImage);
         writer->SetFileName(fileName);
         writer->SetInputData(image);
         writer->Write();
@@ -1010,7 +1200,7 @@ avtXRayImageQuery::WriteImage(int iImage, int nPixels, T *fbuf)
     {
         vtkImageWriter *writer = vtkJPEGWriter::New();
         char fileName[24];
-        sprintf(fileName, "output%02d.jpg", iImage);
+        sprintf(fileName, "%s%02d.jpg", baseName, iImage);
         writer->SetFileName(fileName);
         writer->SetInputData(image);
         writer->Write();
@@ -1020,7 +1210,7 @@ avtXRayImageQuery::WriteImage(int iImage, int nPixels, T *fbuf)
     {
         vtkImageWriter *writer = vtkPNGWriter::New();
         char fileName[24];
-        sprintf(fileName, "output%02d.png", iImage);
+        sprintf(fileName, "%s%02d.png", baseName, iImage);
         writer->SetFileName(fileName);
         writer->SetInputData(image);
         writer->Write();
@@ -1030,7 +1220,7 @@ avtXRayImageQuery::WriteImage(int iImage, int nPixels, T *fbuf)
     {
         vtkImageWriter *writer = vtkTIFFWriter::New();
         char fileName[24];
-        sprintf(fileName, "output%02d.tif", iImage);
+        sprintf(fileName, "%s%02d.tif", baseName, iImage);
         writer->SetFileName(fileName);
         writer->SetInputData(image);
         writer->Write();
@@ -1052,14 +1242,18 @@ avtXRayImageQuery::WriteImage(int iImage, int nPixels, T *fbuf)
 //    I moved all the logic for doing the ray integration and creating the
 //    image in chunks to avtXRayFilter.
 //
+//    Eric Brugger, Wed May 27 14:37:36 PDT 2015
+//    I added an option to family output files.
+//
 // ****************************************************************************
 
 template <typename T>
 void
-avtXRayImageQuery::WriteFloats(int iImage, int nPixels, T *fbuf)
+avtXRayImageQuery::WriteFloats(const char *baseName, int iImage, int nPixels,
+    T *fbuf)
 {
-    char fileName[24];
-    sprintf(fileName, "output%02d.bof", iImage);
+    char fileName[512];
+    sprintf(fileName, "%s%02d.bof", baseName, iImage);
     FILE *file = fopen(fileName, "w");
     fwrite(fbuf, sizeof(T), nPixels, file);
     fclose(file);
@@ -1074,19 +1268,28 @@ avtXRayImageQuery::WriteFloats(int iImage, int nPixels, T *fbuf)
 //  Programmer: Eric Brugger
 //  Creation:   May 14, 2012
 //
+//  Modifications:
+//    Eric Brugger, Wed May 27 10:47:29 PDT 2015
+//    I modified the query to also output the path length field when
+//    outputting in bof or bov format.
+//
+//    Eric Brugger, Wed May 27 14:37:36 PDT 2015
+//    I added an option to family output files.
+//
 // ****************************************************************************
 
 void
-avtXRayImageQuery::WriteBOVHeader(int iImage, int nx, int ny, const char *type)
+avtXRayImageQuery::WriteBOVHeader(const char *baseName, const char *varName,
+    int iBin, int nx, int ny, const char *type)
 {
     char fileName[24];
-    sprintf(fileName, "output%02d.bov", iImage);
+    sprintf(fileName, "%s%02d.bov", baseName, iBin);
     FILE *file = fopen(fileName, "w");
     fprintf(file, "TIME: 0\n");
-    fprintf(file, "DATA_FILE: output%02d.bof\n", iImage);
+    fprintf(file, "DATA_FILE: %s%02d.bof\n", baseName, iBin);
     fprintf(file, "DATA_SIZE: %d %d 1\n", nx, ny);
     fprintf(file, "DATA_FORMAT: %s\n", type);
-    fprintf(file, "VARIABLE: image\n");
+    fprintf(file, "VARIABLE: %s\n", varName);
     const int one = 1;
     unsigned char *ptr = (unsigned char *)&one;
     if (ptr[0] == 1)
@@ -1116,6 +1319,9 @@ avtXRayImageQuery::WriteBOVHeader(int iImage, int nx, int ny, const char *type)
 //    Added a new way to specify the view that matches the way the view is
 //    specified for plots.
 //
+//    Eric Brugger, Thu May 21 12:15:59 PDT 2015
+//    I added support for debugging a ray.
+//
 // ****************************************************************************
 
 void
@@ -1128,6 +1334,7 @@ avtXRayImageQuery::GetDefaultInputParams(MapNode &params)
 
     params["divide_emis_by_absorb"] = 0;
     params["background_intensity"] = 0.0;
+    params["debug_ray"] = -1;
     params["output_type"] = std::string("png");
 
     //
diff --git a/src/avt/Queries/Queries/avtXRayImageQuery.h b/src/avt/Queries/Queries/avtXRayImageQuery.h
index 8b7fa60..57b75b1 100644
--- a/src/avt/Queries/Queries/avtXRayImageQuery.h
+++ b/src/avt/Queries/Queries/avtXRayImageQuery.h
@@ -97,6 +97,18 @@
 //    I added support for specifying background intensities on a per bin
 //    basis.
 //
+//    Eric Brugger, Thu May 21 12:15:18 PDT 2015
+//    I added support for debugging a ray.
+//
+//    Eric Brugger, Wed May 27 10:45:28 PDT 2015
+//    I modified the query to also output the path length field when
+//    outputting in bof or bov format.
+//
+//    Eric Brugger, Wed May 27 13:19:12 PDT 2015
+//    I added an option to family output files.
+//
+//    Eric Brugger, Thu Jun  4 16:07:06 PDT 2015
+//    I added an option to enable outputting the ray bounds to a vtk file.
 //
 // ****************************************************************************
 
@@ -128,6 +140,9 @@ class QUERY_API avtXRayImageQuery : public avtDatasetQuery
     void                      SetBackgroundIntensity(const double &intensity);
     void                      SetBackgroundIntensities(
                                   const doubleVector &intensities);
+    void                      SetDebugRay(const int &ray);
+    void                      SetOutputRayBounds(const bool &flag);
+    void                      SetFamilyFiles(const bool &flag);
     void                      SetOutputType(int type);
     void                      SetOutputType(const std::string &type);
 
@@ -136,6 +151,10 @@ class QUERY_API avtXRayImageQuery : public avtDatasetQuery
     double                    backgroundIntensity;
     double                   *backgroundIntensities;
     int                       nBackgroundIntensities;
+    int                       debugRay;
+    bool                      outputRayBounds;
+    bool                      familyFiles;
+    static int                iFileFamily;
     int                       outputType;
     bool                      useSpecifiedUpVector;
     bool                      useOldView;
@@ -171,10 +190,11 @@ class QUERY_API avtXRayImageQuery : public avtDatasetQuery
     virtual void              Execute(avtDataTree_p);
 
     template <typename T>
-    void                      WriteImage(int, int, T*);
+    void                      WriteImage(const char *, int, int, T*);
     template <typename T>
-    void                      WriteFloats(int, int, T*);
-    void                      WriteBOVHeader(int, int, int, const char *);
+    void                      WriteFloats(const char *, int, int, T*);
+    void                      WriteBOVHeader(const char *, const char *,
+                                  int, int, int, const char *);
 
     void                      ConvertOldImagePropertiesToNew();
 };
diff --git a/src/bin/internallauncher b/src/bin/internallauncher
index 203f59d..fba7392 100755
--- a/src/bin/internallauncher
+++ b/src/bin/internallauncher
@@ -1151,6 +1151,32 @@ class DDTDebugger(Debugger):
         ddt_cmd = self.Executable() + ddt_args + args
         return ddt_cmd
 
+###############################################################################
+# Class: CudaDebugger
+#
+# Purpose:  Launch a CUDA-enabled VisIt component under the NVIDIA command-line
+#           profiler  
+#
+# Programmer: Kevin Griffin 
+# Date:       Wed May 20 18:33:04 PDT 2015
+#
+# Modifications:
+#
+###############################################################################
+
+class CudaDebugger(Debugger):
+    def __init__(self, launcher):
+        super(CudaDebugger, self).__init__(launcher)
+
+    def Executable(self):
+        return ["nvprof"]
+
+    def CreateCommand(self, args):
+        launcherargs, visitargs = self.SeparateArguments(args)
+        vgargs = self.DebuggerArguments()
+        if len(vgargs) == 0:
+            vgargs = ["--output-profile", "timeline_%h_%p.nvprof"]
+        return launcherargs + self.Executable() + vgargs + visitargs
 
 ###############################################################################
 # Class: ValgrindDebugger
@@ -2670,6 +2696,9 @@ VisIt does not recognize your terminal application so it will ignore the -newcon
     #   Cyrus Harrison, Fri Jul 25 15:59:02 PDT 2014
     #   Added lldb.
     #
+    #   Kevin Griffin, Wed May 20 18:33:04 PDT 2015
+    #   Added nvprof.
+    #
     ############################################################################
     def Debuggers(self):
         return ["gdb",
@@ -2679,7 +2708,8 @@ VisIt does not recognize your terminal application so it will ignore the -newcon
                 "apitrace",
                 "debug-malloc",
                 "ddt",
-                "lldb"]
+                "lldb",
+                "nvprof"]
 
     ############################################################################
     # Method: DebuggerFactory
@@ -2699,6 +2729,9 @@ VisIt does not recognize your terminal application so it will ignore the -newcon
     #   Cyrus Harrison, Fri Jul 25 15:59:02 PDT 2014
     #   Added lldb.
     #
+    #   Kevin Griffin,
+    #   Added nvprof.
+    #
     ############################################################################
 
     def DebuggerFactory(self, debugger):
@@ -2718,6 +2751,8 @@ VisIt does not recognize your terminal application so it will ignore the -newcon
             return DDTDebugger(self)
         elif debugger == "lldb":
             return LLDBDebugger(self)
+        elif debugger == "nvprof":
+            return CudaDebugger(self)
         # Return a debugger that does not do anything.
         return Debugger(self)
 
diff --git a/src/config-site/rzuseqlac2-compute.cmake b/src/config-site/rzuseqlac2-compute.cmake
index 5cc83a5..9c64cee 100644
--- a/src/config-site/rzuseqlac2-compute.cmake
+++ b/src/config-site/rzuseqlac2-compute.cmake
@@ -8,7 +8,7 @@
 ##
 ## Setup VISITHOME & VISITARCH variables.
 ##
-SET(VISITHOME /usr/gapps/visit/thirdparty_static/2.7.0)
+SET(VISITHOME /usr/gapps/visit/thirdparty_static/2.9.0)
 SET(VISITARCH linux-ppc64_gcc-4.4_BGQ)
 MESSAGE(status "************* compute node build")
 
@@ -70,7 +70,8 @@ VISIT_OPTION_DEFAULT(VISIT_MESA_DIR ${VISITHOME}/mesa/7.8.2/${VISITARCH})
 ##
 ## VTK
 ##
-VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk/5e3c539/${VISITARCH})
+SETUP_APP_VERSION(VTK 6.1.0)
+VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk/6.1.0/${VISITARCH})
 
 ##
 ## SZIP
@@ -80,13 +81,13 @@ VISIT_OPTION_DEFAULT(VISIT_SZIP_DIR ${VISITHOME}/szip/2.1/${VISITARCH})
 ##
 ## ZLIB
 ##
-VISIT_OPTION_DEFAULT(VISIT_ZLIB_DIR ${VISITHOME}/zlib/1.2.7/${VISITARCH})
+VISIT_OPTION_DEFAULT(VISIT_ZLIB_DIR ${VISITHOME}/zlib/1.2.8/${VISITARCH})
 
 ##
 ## HDF5
 ##
 VISIT_OPTION_DEFAULT(VISIT_HDF5_DIR ${VISITHOME}/hdf5/1.8.7/${VISITARCH})
-VISIT_OPTION_DEFAULT(VISIT_HDF5_LIBDEP ${VISITHOME}/szip/2.1/${VISITARCH}/lib sz ${VISITHOME}/zlib/1.2.7/${VISITARCH}/lib z TYPE STRING)
+VISIT_OPTION_DEFAULT(VISIT_HDF5_LIBDEP ${VISITHOME}/szip/2.1/${VISITARCH}/lib sz ${VISITHOME}/zlib/1.2.8/${VISITARCH}/lib z TYPE STRING)
 
 ##
 ## Ice-T
@@ -96,11 +97,11 @@ VISIT_OPTION_DEFAULT(VISIT_ICET_DIR ${VISITHOME}/icet/1.0.0/${VISITARCH})
 ##
 ## Mili
 ##
-VISIT_OPTION_DEFAULT(VISIT_MILI_DIR ${VISITHOME}/mili/1.11.1/${VISITARCH})
+#VISIT_OPTION_DEFAULT(VISIT_MILI_DIR ${VISITHOME}/mili/1.11.1/${VISITARCH})
 
 ##
 ## Silo
 ##
-VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo/4.9.1/${VISITARCH})
+VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo/4.10.1/${VISITARCH})
 VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING)
 
diff --git a/src/config-site/rzuseqlac2-login.cmake b/src/config-site/rzuseqlac2-login.cmake
index 5159add..7158ae0 100644
--- a/src/config-site/rzuseqlac2-login.cmake
+++ b/src/config-site/rzuseqlac2-login.cmake
@@ -1,4 +1,4 @@
-#/usr/gapps/visit/thirdparty_static/2.7.0/cmake/2.8.10.2/linux-ppc64_gcc-4.4/bin/cmake
+#/usr/gapps/visit/thirdparty_static/2.9.0/cmake/3.0.2/linux-ppc64_gcc-4.4/bin/cmake
 ##
 ## ./build_visit generated host.cmake
 ## created: Fri May 31 12:16:29 PDT 2013
@@ -8,7 +8,7 @@
 ##
 ## Setup VISITHOME & VISITARCH variables.
 ##
-SET(VISITHOME /usr/gapps/visit/thirdparty_static/2.7.0)
+SET(VISITHOME /usr/gapps/visit/thirdparty_static/2.9.0)
 SET(VISITARCH linux-ppc64_gcc-4.4)
 MESSAGE(status "************* login node build")
 ## Compiler flags.
@@ -40,12 +40,12 @@ VISIT_OPTION_DEFAULT(VISIT_SERVER_COMPONENTS_ONLY ON TYPE BOOL)
 ##
 ## Python
 ##
-VISIT_OPTION_DEFAULT(VISIT_PYTHON_DIR /usr/gapps/visit/thirdparty_static/2.7.0/python/2.7.3/linux-ppc64_gcc-4.4)
+VISIT_OPTION_DEFAULT(VISIT_PYTHON_DIR ${VISITHOME}/python/2.7.6/linux-ppc64_gcc-4.4)
 
 ##
 ## VTK
 ##
-SETUP_APP_VERSION(VTK 6.0.0)
+SETUP_APP_VERSION(VTK 6.1.0)
 VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk/${VTK_VERSION}/${VISITARCH})
 ##
 
@@ -63,11 +63,11 @@ VISIT_OPTION_DEFAULT(VISIT_HDF5_LIBDEP ${VISITHOME}/szip/2.1/${VISITARCH}/lib sz
 ##
 ## Mili
 ##
-VISIT_OPTION_DEFAULT(VISIT_MILI_DIR ${VISITHOME}/mili/1.11.1/${VISITARCH})
+#VISIT_OPTION_DEFAULT(VISIT_MILI_DIR ${VISITHOME}/mili/1.11.1/${VISITARCH})
 
 ##
 ## Silo
 ##
-VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo/4.9.1/${VISITARCH})
+VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo/4.10.1/${VISITARCH})
 VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING)
 
diff --git a/src/config-site/thembisa.cmake b/src/config-site/thembisa.cmake
index dc871f6..e9ba532 100644
--- a/src/config-site/thembisa.cmake
+++ b/src/config-site/thembisa.cmake
@@ -8,7 +8,7 @@
 ##
 ## Setup VISITHOME & VISITARCH variables.
 ##
-SET(VISITHOME /usr/gapps/visit/thirdparty_shared/2.8.1)
+SET(VISITHOME /usr/gapps/visit/thirdparty_shared/2.9.0)
 SET(VISITARCH linux-x86_64_gcc-4.4)
 VISIT_OPTION_DEFAULT(VISIT_SLIVR TRUE)
 
@@ -132,7 +132,7 @@ VISIT_OPTION_DEFAULT(VISIT_NETCDF_LIBDEP HDF5_LIBRARY_DIR hdf5_hl HDF5_LIBRARY_D
 ##
 ## MFEM 
 ##
-VISIT_OPTION_DEFAULT(VISIT_MFEM_DIR ${VISITHOME}/mfem/68e941f8fe/${VISITARCH})
+VISIT_OPTION_DEFAULT(VISIT_MFEM_DIR ${VISITHOME}/mfem/3.0.1/${VISITARCH})
 
 ##
 ## Mili
diff --git a/src/databases/CMakeLists.txt b/src/databases/CMakeLists.txt
index 6e2c995..c3e46bc 100644
--- a/src/databases/CMakeLists.txt
+++ b/src/databases/CMakeLists.txt
@@ -250,7 +250,7 @@ MACRO(CHECK_THIRDPARTY_SATISIFED dbplugin dep_libs)
                 SET(dep_lib_dir "${lib_check}_LIBRARY_DIR")
                 SET(dep_libs "${lib_check}_LIB")
                 IF(${dep_lib_dir})
-                    LIST(FIND TMP_THIRDPARTY_IO_LIB ${${dep_lib_dir}} findVar)
+                    LIST(FIND TMP_THIRDPARTY_IO_LIB "${${dep_lib_dir}}" findVar)
                     IF(findVar EQUAL -1)
                         LIST(APPEND TMP_THIRDPARTY_IO_LIBRARY_DIR
                                     ${${dep_lib_dir}})
@@ -263,7 +263,7 @@ MACRO(CHECK_THIRDPARTY_SATISIFED dbplugin dep_libs)
                             LIST(APPEND TMP_THIRDPARTY_IO_LIB ${dep_lib})
                         ENDIF()
                     ENDFOREACH(lib)
-                ENDIF(${libs})
+                ENDIF()
             ENDFOREACH()
         ENDIF(VISIT_STATIC)
     ELSE()
diff --git a/src/databases/Exodus/avtExodusFileFormat.C b/src/databases/Exodus/avtExodusFileFormat.C
index 4925a8a..fc2b1c8 100644
--- a/src/databases/Exodus/avtExodusFileFormat.C
+++ b/src/databases/Exodus/avtExodusFileFormat.C
@@ -2429,6 +2429,10 @@ avtExodusFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md,
 //
 //    Mark C. Miller, Thu Sep 26 12:01:01 PDT 2013
 //    Fixed assumption that length of connect variable was always dimension 0.
+//
+//    Mark C. Miller, Thu May  7 11:01:30 PDT 2015
+//    Bracket query for "elem_num_map" with TRY/CATCH. It isn't always in an
+//    exodus file.    
 // ****************************************************************************
 
 vtkDataSet *
@@ -2828,7 +2832,16 @@ avtExodusFileFormat::GetMesh(int ts, const char *mesh)
         // track element edges correctly
         if (contains_nonlinear_elems)
         {
-            vtkDataArray *gzoneIds = GetVar(ts, "elem_num_map");
+            vtkDataArray *gzoneIds = 0;
+            TRY
+            {
+                gzoneIds = GetVar(ts, "elem_num_map");
+            }
+            CATCH(InvalidVariableException)
+            {
+                ; // no-op
+            }
+            ENDTRY
             if (gzoneIds)
             {
                 vtkDataArray *domNums;
diff --git a/src/databases/FieldViewXDB/lib/Mac64/libVXDB_par.dylib b/src/databases/FieldViewXDB/lib/Mac64/libVXDB_par.dylib
index 58b1452..7d66902 100755
Binary files a/src/databases/FieldViewXDB/lib/Mac64/libVXDB_par.dylib and b/src/databases/FieldViewXDB/lib/Mac64/libVXDB_par.dylib differ
diff --git a/src/databases/FieldViewXDB/lib/Mac64/libVXDB_ser.dylib b/src/databases/FieldViewXDB/lib/Mac64/libVXDB_ser.dylib
index 6a82b84..1548c87 100755
Binary files a/src/databases/FieldViewXDB/lib/Mac64/libVXDB_ser.dylib and b/src/databases/FieldViewXDB/lib/Mac64/libVXDB_ser.dylib differ
diff --git a/src/databases/Miranda/avtMirandaFileFormat.C b/src/databases/Miranda/avtMirandaFileFormat.C
index 3e35fb4..5c19029 100644
--- a/src/databases/Miranda/avtMirandaFileFormat.C
+++ b/src/databases/Miranda/avtMirandaFileFormat.C
@@ -1,40 +1,40 @@
 /*****************************************************************************
-*
-* Copyright (c) 2000 - 2015, Lawrence Livermore National Security, LLC
-* Produced at the Lawrence Livermore National Laboratory
-* LLNL-CODE-442911
-* All rights reserved.
-*
-* This file is  part of VisIt. For  details, see https://visit.llnl.gov/.  The
-* full copyright notice is contained in the file COPYRIGHT located at the root
-* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
-*
-* Redistribution  and  use  in  source  and  binary  forms,  with  or  without
-* modification, are permitted provided that the following conditions are met:
-*
-*  - Redistributions of  source code must  retain the above  copyright notice,
-*    this list of conditions and the disclaimer below.
-*  - Redistributions in binary form must reproduce the above copyright notice,
-*    this  list of  conditions  and  the  disclaimer (as noted below)  in  the
-*    documentation and/or other materials provided with the distribution.
-*  - Neither the name of  the LLNS/LLNL nor the names of  its contributors may
-*    be used to endorse or promote products derived from this software without
-*    specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT  HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR  IMPLIED WARRANTIES, INCLUDING,  BUT NOT  LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND  FITNESS FOR A PARTICULAR  PURPOSE
-* ARE  DISCLAIMED. IN  NO EVENT  SHALL LAWRENCE  LIVERMORE NATIONAL  SECURITY,
-* LLC, THE  U.S.  DEPARTMENT OF  ENERGY  OR  CONTRIBUTORS BE  LIABLE  FOR  ANY
-* DIRECT,  INDIRECT,   INCIDENTAL,   SPECIAL,   EXEMPLARY,  OR   CONSEQUENTIAL
-* DAMAGES (INCLUDING, BUT NOT  LIMITED TO, PROCUREMENT OF  SUBSTITUTE GOODS OR
-* SERVICES; LOSS OF  USE, DATA, OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER
-* CAUSED  AND  ON  ANY  THEORY  OF  LIABILITY,  WHETHER  IN  CONTRACT,  STRICT
-* LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE)  ARISING IN ANY  WAY
-* OUT OF THE  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-* DAMAGE.
-*
-*****************************************************************************/
+ *
+ * Copyright (c) 2000 - 2015, Lawrence Livermore National Security, LLC
+ * Produced at the Lawrence Livermore National Laboratory
+ * LLNL-CODE-442911
+ * All rights reserved.
+ *
+ * This file is  part of VisIt. For  details, see https://visit.llnl.gov/.  The
+ * full copyright notice is contained in the file COPYRIGHT located at the root
+ * of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
+ *
+ * Redistribution  and  use  in  source  and  binary  forms,  with  or  without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  - Redistributions of  source code must  retain the above  copyright notice,
+ *    this list of conditions and the disclaimer below.
+ *  - Redistributions in binary form must reproduce the above copyright notice,
+ *    this  list of  conditions  and  the  disclaimer (as noted below)  in  the
+ *    documentation and/or other materials provided with the distribution.
+ *  - Neither the name of  the LLNS/LLNL nor the names of  its contributors may
+ *    be used to endorse or promote products derived from this software without
+ *    specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT  HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR  IMPLIED WARRANTIES, INCLUDING,  BUT NOT  LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND  FITNESS FOR A PARTICULAR  PURPOSE
+ * ARE  DISCLAIMED. IN  NO EVENT  SHALL LAWRENCE  LIVERMORE NATIONAL  SECURITY,
+ * LLC, THE  U.S.  DEPARTMENT OF  ENERGY  OR  CONTRIBUTORS BE  LIABLE  FOR  ANY
+ * DIRECT,  INDIRECT,   INCIDENTAL,   SPECIAL,   EXEMPLARY,  OR   CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT  LIMITED TO, PROCUREMENT OF  SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF  USE, DATA, OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED  AND  ON  ANY  THEORY  OF  LIABILITY,  WHETHER  IN  CONTRACT,  STRICT
+ * LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE)  ARISING IN ANY  WAY
+ * OUT OF THE  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ *****************************************************************************/
 
 // ************************************************************************* //
 //                            avtMirandaFileFormat.C                           //
@@ -125,6 +125,7 @@ string Vec2String(string name, T *vec, int numelems) {
   return s;
 } 
 
+
 // ****************************************************************************
 //  Method: Fix2DFileOrder
 //
@@ -151,29 +152,29 @@ string Vec2String(string name, T *vec, int numelems) {
 static void Fix2DFileOrder(int a, int b, int *fileOrder)
 {
   debug5 << "Fix2DFileOrder(" << a << ", "<< b << ", " << Vec2String("fileOrder",fileOrder,3) << ") " << endl; 
-    int posA = 0, posB = 0; ///TODO: check on fix for uninitialized values
+  int posA = 0, posB = 0; ///TODO: check on fix for uninitialized values
     int ii;
     /* set posA to the position in iFileOrder in which a appears.  
        set posB to the position in iFileOrder in which b appears.  
     */
     for (ii = 0; ii < 3; ii++)
-    {
+      {
         if (fileOrder[ii] == a)
-            posA = ii;
+          posA = ii;
         if (fileOrder[ii] == b)
-            posB = ii;
-    }
+          posB = ii;
+      }
 
     if (posA < posB) /* a came before b in iFileOrder */
-    {
+      {
         fileOrder[0] = 0;
         fileOrder[1] = 1;
-    }
+      }
     else /* b came before a in iFileOrder */
-    {
+      {
         fileOrder[0] = 1;
         fileOrder[1] = 0;
-    }
+      }
     debug5 << "After Fix2DFileOrder: "<<Vec2String("fileOrder",fileOrder,3) << endl;
 }
 
@@ -195,36 +196,36 @@ static void Fix2DFileOrder(int a, int b, int *fileOrder)
 class format
 {
 public:
-    format() : count(1), fmt() { }
-    format(const format &f) : count(f.count), fmt(f.fmt) { }
-    format(const std::string &f) : count(1), fmt(f) { }
-    format operator % (std::string value)
-    {
-        format retval(*this);
-        std::string f(currentFormat());
-        std::string::size_type n = fmt.find(f);
-        if(n != std::string::npos)
-            retval.fmt.replace(n, f.size(), value.c_str());
-        retval.count = count + 1;
-        return retval;
-    }
-    format operator % (int value)
-    {
-        char tmp[20];
-        sprintf(tmp, "%d", value);
-        return this->operator % (std::string(tmp));
-    }
-    operator std::string () {return fmt; }
+  format() : count(1), fmt() { }
+  format(const format &f) : count(f.count), fmt(f.fmt) { }
+  format(const std::string &f) : count(1), fmt(f) { }
+  format operator % (std::string value)
+  {
+    format retval(*this);
+    std::string f(currentFormat());
+    std::string::size_type n = fmt.find(f);
+    if(n != std::string::npos)
+      retval.fmt.replace(n, f.size(), value.c_str());
+    retval.count = count + 1;
+    return retval;
+  }
+  format operator % (int value)
+  {
+    char tmp[20];
+    sprintf(tmp, "%d", value);
+    return this->operator % (std::string(tmp));
+  }
+  operator std::string () {return fmt; }
 private:    
-    std::string currentFormat()
-    {
-        char tmp[20];
-        sprintf(tmp, "%%%d%%", count);
-        return std::string(tmp);
-    }
+  std::string currentFormat()
+  {
+    char tmp[20];
+    sprintf(tmp, "%%%d%%", count);
+    return std::string(tmp);
+  }
 
-    int         count;
-    std::string fmt;
+  int         count;
+  std::string fmt;
 };
 
 // ****************************************************************************
@@ -253,336 +254,343 @@ avtMirandaFileFormat::avtMirandaFileFormat(const char *filename, DBOptionsAttrib
   : avtMTMDFileFormat(filename)
 {
   string tag, buf1;
-    char buf[512];
-    ifstream  f(filename);
-    int ii, jj;
-
-    dim = 3;
-    flatDim = -1;
-    iFileOrder[0] = -1;
-    iFileOrder[1] = -1;
-    iFileOrder[2] = -1;
-    bCurvilinear = false;
-    bZonal = false;  // normally interpret rectilinear miranda data as zonal
-    string  isZonal = "default";
-    iInteriorSize[0] = iInteriorSize[1] = iInteriorSize[2] = -1; 
-    iBoundarySize[0] = iBoundarySize[1] = iBoundarySize[2] = -1; 
-    // Verify that the 'magic' and version number are right
-    f >> buf1 >> sFileVersion;
+  char buf[512];
+  ifstream  f(filename);
+  int ii, jj;
+
+  dim = 3;
+  flatDim = -1;
+  iFileOrder[0] = -1;
+  iFileOrder[1] = -1;
+  iFileOrder[2] = -1;
+  bCurvilinear = false;
+  bZonal = false;  // normally interpret rectilinear miranda data as zonal
+  string  isZonal = "default";
+  iInteriorSize[0] = iInteriorSize[1] = iInteriorSize[2] = -1; 
+  iBoundarySize[0] = iBoundarySize[1] = iBoundarySize[2] = -1; 
+  // Verify that the 'magic' and version number are right
+  f >> buf1 >> sFileVersion;
     
-    if (buf1 != "VERSION")
+  if (buf1 != "VERSION")
     {
-        EXCEPTION1(InvalidDBTypeException, "Not a raw miranda file." );
+      EXCEPTION1(InvalidDBTypeException, "Not a raw miranda file." );
     }
-    if (sFileVersion != "1.0" && sFileVersion != "1.1" && sFileVersion != "1.2" && sFileVersion != "2.0")
+  if (sFileVersion != "1.0" && sFileVersion != "1.1" && sFileVersion != "1.2" && sFileVersion != "2.0")
     {
-        EXCEPTION1(InvalidDBTypeException, 
-                   "Only raw miranda version 1.0, 1.1, 1.2 and 2.0 are supported." );
+      EXCEPTION1(InvalidDBTypeException, 
+                 "Only raw miranda version 1.0, 1.1, 1.2 and 2.0 are supported." );
     }
 
-    // Process a tag at a time until all lines have been read
-    while (f.good())
+  // Process a tag at a time until all lines have been read
+  while (f.good())
     {
-        f >> tag;
-        if (f.eof()) {
-            f.clear();
-            break;
-        }
+      f >> tag;
+      if (f.eof()) {
+        f.clear();
+        break;
+      }
 
-        if (tag[0] == '#')
+      if (tag[0] == '#')
         {
-            SkipToEndOfLine( f, false );
+          SkipToEndOfLine( f, false );
         }
-        else if (STREQUAL("gridfiles:", tag.c_str())==0)
+      else if (STREQUAL("gridfiles:", tag.c_str())==0)
         {
-            f >> gridTemplate;
-            SkipToEndOfLine( f );
+          f >> gridTemplate;
+          SkipToEndOfLine( f );
         }
-        else if (STREQUAL("datafiles:", tag.c_str())==0)
+      else if (STREQUAL("datafiles:", tag.c_str())==0)
         {
-            f >> fileTemplate;
-            SkipToEndOfLine( f );
+          f >> fileTemplate;
+          SkipToEndOfLine( f );
         }
-        else if (STREQUAL("domainsize:", tag.c_str())==0)
+      else if (STREQUAL("domainsize:", tag.c_str())==0)
         {
-            f >> iGlobalDim[0] >> iGlobalDim[1] >> iGlobalDim[2];
-            SkipToEndOfLine( f );
+          f >> iGlobalDim[0] >> iGlobalDim[1] >> iGlobalDim[2];
+          SkipToEndOfLine( f );
         }
-        else if (STREQUAL("blocksize:", tag.c_str())==0)
+      else if (STREQUAL("blocksize:", tag.c_str())==0)
         {
-            f >> iBlockSize[0] >> iBlockSize[1] >> iBlockSize[2];
-            SkipToEndOfLine( f );
+          f >> iBlockSize[0] >> iBlockSize[1] >> iBlockSize[2];
+          SkipToEndOfLine( f );
         }
-        else if (STREQUAL("interiorsize:", tag.c_str())==0)
+      else if (STREQUAL("interiorsize:", tag.c_str())==0)
         {
-            f >> iInteriorSize[0] >> iInteriorSize[1] >> iInteriorSize[2];
-            SkipToEndOfLine( f );
+          f >> iInteriorSize[0] >> iInteriorSize[1] >> iInteriorSize[2];
+          SkipToEndOfLine( f );
         }
-        else if (STREQUAL("bndrysize:", tag.c_str())==0)
+      else if (STREQUAL("bndrysize:", tag.c_str())==0)
         {
-            f >> iBoundarySize[0] >> iBoundarySize[1] >> iBoundarySize[2];
-            SkipToEndOfLine( f );
+          f >> iBoundarySize[0] >> iBoundarySize[1] >> iBoundarySize[2];
+          SkipToEndOfLine( f );
         }
-        else if (STREQUAL("origin:", tag.c_str())==0)
+      else if (STREQUAL("origin:", tag.c_str())==0)
         {
-            fOrigin[0] = GetFortranDouble(f);
-            fOrigin[1] = GetFortranDouble(f);
-            fOrigin[2] = GetFortranDouble(f);
-            SkipToEndOfLine( f );
+          fOrigin[0] = GetFortranDouble(f);
+          fOrigin[1] = GetFortranDouble(f);
+          fOrigin[2] = GetFortranDouble(f);
+          SkipToEndOfLine( f );
         }
-        else if (STREQUAL("spacing:", tag.c_str())==0)
+      else if (STREQUAL("spacing:", tag.c_str())==0)
         {
-            fStride[0] = GetFortranDouble(f);
-            fStride[1] = GetFortranDouble(f);
-            fStride[2] = GetFortranDouble(f);
-            SkipToEndOfLine( f );
+          fStride[0] = GetFortranDouble(f);
+          fStride[1] = GetFortranDouble(f);
+          fStride[2] = GetFortranDouble(f);
+          SkipToEndOfLine( f );
         }
-        else if (STREQUAL("variables:", tag.c_str())==0)
+      else if (STREQUAL("variables:", tag.c_str())==0)
         {
-            int nVars = 0;
-            f >> nVars;
-            SkipToEndOfLine( f );
+          int nVars = 0;
+          f >> nVars;
+          SkipToEndOfLine( f );
         
-            aVarNames.resize(nVars);
-            aVarNumComps.resize(nVars);
-            aVarMinMax.resize(nVars);
+          aVarNames.resize(nVars);
+          aVarNumComps.resize(nVars);
+          aVarMinMax.resize(nVars);
         
-            for (ii = 0 ; ii < nVars ; ii++)
+          for (ii = 0 ; ii < nVars ; ii++)
             {
-                f >> aVarNames[ii] >> aVarNumComps[ii];
-                aVarMinMax[ii].resize( 2*aVarNumComps[ii] );
+              f >> aVarNames[ii] >> aVarNumComps[ii];
+              aVarMinMax[ii].resize( 2*aVarNumComps[ii] );
                 
-                for (jj = 0 ; jj < aVarNumComps[ii] ; jj++)
+              for (jj = 0 ; jj < aVarNumComps[ii] ; jj++)
                 {
-                    aVarMinMax[ii][jj*2] = GetFortranDouble(f);
-                    aVarMinMax[ii][jj*2+1] = GetFortranDouble(f);
+                  aVarMinMax[ii][jj*2] = GetFortranDouble(f);
+                  aVarMinMax[ii][jj*2+1] = GetFortranDouble(f);
                 }
-                SkipToEndOfLine( f );
+              SkipToEndOfLine( f );
             }
         }
-        else if (STREQUAL("materials:", tag.c_str())==0)
+      else if (STREQUAL("materials:", tag.c_str())==0)
         {
-            int nMats = 0;
-            f >> nMats;
-            SkipToEndOfLine( f );
+          int nMats = 0;
+          f >> nMats;
+          SkipToEndOfLine( f );
             
-            aMatNames.resize(nMats);
-            for (ii = 0 ; ii < nMats ; ii++)
+          aMatNames.resize(nMats);
+          for (ii = 0 ; ii < nMats ; ii++)
             {
-                f >> aMatNames[ii];
-                SkipToEndOfLine( f, false );
+              f >> aMatNames[ii];
+              SkipToEndOfLine( f, false );
             }
         }
-        else if (STREQUAL("timesteps:", tag.c_str())==0)
+      else if (STREQUAL("timesteps:", tag.c_str())==0)
         {
-            int nDumps = 0;
-            f >> nDumps;
-            SkipToEndOfLine( f );
+          int nDumps = 0;
+          f >> nDumps;
+          SkipToEndOfLine( f );
             
-            aCycles.resize(nDumps);
-            aSimTimes.resize(nDumps);
+          aCycles.resize(nDumps);
+          aSimTimes.resize(nDumps);
             
-            for (ii = 0 ; ii < nDumps ; ii++)
+          for (ii = 0 ; ii < nDumps ; ii++)
             {
-                f >> aCycles[ii];
-                aSimTimes[ii] = GetFortranDouble(f);
-                SkipToEndOfLine( f );
+              f >> aCycles[ii];
+              aSimTimes[ii] = GetFortranDouble(f);
+              SkipToEndOfLine( f );
             }
         }
-        else if (STREQUAL("fileorder:", tag.c_str())==0)
+      else if (STREQUAL("fileorder:", tag.c_str())==0)
         {
-            //order will be some permutation of xyz or XYZ, or YZ, xy, etc.
-            string  order;
-            f >> order;
-            if (order.size() != 2 && order.size() != 3)
-                EXCEPTION1(InvalidDBTypeException, "Error parsing file.  "
-                    "fileorder: should be followed by a permutation of XYZ");
-
-            for (ii = 0 ; ii < (int)order.size() ; ii++)
+          //order will be some permutation of xyz or XYZ, or YZ, xy, etc.
+          string  order;
+          f >> order;
+          if (order.size() != 2 && order.size() != 3)
+            EXCEPTION1(InvalidDBTypeException, "Error parsing file.  "
+                       "fileorder: should be followed by a permutation of XYZ");
+
+          for (ii = 0 ; ii < (int)order.size() ; ii++)
             {
-                if ('x' <= order[ii] && order[ii] <= 'z')
-                    iFileOrder[ii] = order[ii] - 'x';
-                else if ('X' <= order[ii] && order[ii] <= 'Z')
-                    iFileOrder[ii] = order[ii] - 'X';
-                else
-                    EXCEPTION1(InvalidDBTypeException, "Error parsing file.  "
-                        "fileorder: should be followed by a permutation of XYZ");
+              if ('x' <= order[ii] && order[ii] <= 'z')
+                iFileOrder[ii] = order[ii] - 'x';
+              else if ('X' <= order[ii] && order[ii] <= 'Z')
+                iFileOrder[ii] = order[ii] - 'X';
+              else
+                EXCEPTION1(InvalidDBTypeException, "Error parsing file.  "
+                           "fileorder: should be followed by a permutation of XYZ");
             }
-            if (order.size()==2)
-                iFileOrder[2] = 3 - (iFileOrder[0]+iFileOrder[1]);
+          if (order.size()==2)
+            iFileOrder[2] = 3 - (iFileOrder[0]+iFileOrder[1]);
         }
-        else if (STREQUAL("curvilinear:", tag.c_str())==0)
+      else if (STREQUAL("curvilinear:", tag.c_str())==0)
         {
-            string  isCurved;
-            f >> isCurved;
+          string  isCurved;
+          f >> isCurved;
 
-            if (isCurved == "yes")
-                bCurvilinear = true;
+          if (isCurved == "yes")
+            bCurvilinear = true;
         }
-        else if (tag == "zonal:")
+      else if (tag == "zonal:")
         {
-            f >> isZonal;
+          f >> isZonal;
 
-            if (isZonal == "yes")               
-                bZonal = true;
+          if (isZonal == "yes")               
+            bZonal = true;
         }
-        else
+      else
         {
-            sprintf(buf, "Error parsing file.  Unknown tag %s", tag.c_str());
-            EXCEPTION1(InvalidDBTypeException, buf);
+          sprintf(buf, "Error parsing file.  Unknown tag %s", tag.c_str());
+          EXCEPTION1(InvalidDBTypeException, buf);
         }
     }
 
-    if (f.fail())
+  if (f.fail())
     {
-        sprintf(buf, "Error parsing file at tag '%s'", tag.c_str());
-        EXCEPTION1(InvalidDBTypeException, buf);
+      sprintf(buf, "Error parsing file at tag '%s'", tag.c_str());
+      EXCEPTION1(InvalidDBTypeException, buf);
     }
-    // revert to old behavior: 
-    if (isZonal == "default") {     
-      if (sFileVersion != "2.0" && !bCurvilinear) {
-        bZonal = true;
-      } else {
-        bZonal = false;
-      }
+  // revert to old behavior: 
+  if (isZonal == "default") {     
+    if (sFileVersion != "2.0" && !bCurvilinear) {
+      bZonal = true;
+    } else {
+      bZonal = false;
     }
-    debug5 << "bZonal is " << bZonal << endl; 
+  }
+  debug5 << "bZonal is " << bZonal << endl; 
     
-    // make the file template into an absolute path
-    for (ii = (int)strlen(filename)-1 ; ii >= 0 ; ii--)
+  // make the file template into an absolute path
+  for (ii = (int)strlen(filename)-1 ; ii >= 0 ; ii--)
     {
-        if (filename[ii] == '/' || filename[ii] == '\\')
+      if (filename[ii] == '/' || filename[ii] == '\\')
         {
-            fileTemplate.insert(0, filename, ii+1);
-            gridTemplate.insert(0, filename, ii+1);
-            break;
+          fileTemplate.insert(0, filename, ii+1);
+          gridTemplate.insert(0, filename, ii+1);
+          break;
         }
     }
-    if (ii == -1)
+  if (ii == -1)
     {
 #ifdef _WIN32
-        _getcwd(buf, 512);
+      _getcwd(buf, 512);
 #else
-        char* res = getcwd(buf, 512); (void) res;
+      char* res = getcwd(buf, 512); (void) res;
 #endif
-        strcat(buf, "/");
-        fileTemplate.insert(0, buf, strlen(buf));
-        gridTemplate.insert(0, buf, strlen(buf));
+      strcat(buf, "/");
+      fileTemplate.insert(0, buf, strlen(buf));
+      gridTemplate.insert(0, buf, strlen(buf));
     }
 
 #ifdef _WIN32
-    for (ii = 0 ; ii < fileTemplate.size() ; ii++)
+  for (ii = 0 ; ii < fileTemplate.size() ; ii++)
     {
-        if (fileTemplate[ii] == '/')
-            fileTemplate[ii] = '\\';
+      if (fileTemplate[ii] == '/')
+        fileTemplate[ii] = '\\';
     }
-    for (ii = 0 ; ii < gridTemplate.size() ; ii++)
+  for (ii = 0 ; ii < gridTemplate.size() ; ii++)
     {
-        if (gridTemplate[ii] == '/')
-            gridTemplate[ii] = '\\';
+      if (gridTemplate[ii] == '/')
+        gridTemplate[ii] = '\\';
     }
 #endif
 
-    if  (sFileVersion != "2.0") {
-      for (ii = 0; ii < 3; ii++) {
-        iInteriorSize[ii] = iBlockSize[ii] + 1; 
-        iBoundarySize[ii] = iBlockSize[ii]; 
-      } 
+  if  (sFileVersion != "2.0") {
+    for (ii = 0; ii < 3; ii++) {
+      iInteriorSize[ii] = iBlockSize[ii] + 1; 
+      iBoundarySize[ii] = iBlockSize[ii]; 
     }
+  }
     
-      
-    iNumBlocks[0] = iGlobalDim[0] / iBlockSize[0];
-    iNumBlocks[1] = iGlobalDim[1] / iBlockSize[1];
-    iNumBlocks[2] = iGlobalDim[2] / iBlockSize[2];
-    
-   //domainMap is only used if the file order is unspecified
-    if (iFileOrder[0] == -1) {
-      /* don't use domainMaps any more 
-        domainMap.resize( iNumBlocks[0]*iNumBlocks[1]*iNumBlocks[2]*3, -1 );
-      */ 
-      iFileOrder[0] = 2; 
-      iFileOrder[1] = 1; 
-      iFileOrder[2] = 0;       
+  for (int i=0; i<3; i++) {
+    if (iGlobalDim[i] == iBlockSize[i]) {
+      iNumBlocks[i] = 1; 
+    } else {
+      if (sFileVersion == "2.0" && bCurvilinear && bZonal) {
+        iNumBlocks[i] = (iGlobalDim[i]-1) / (iBlockSize[i]-1);
+      } else {
+        iNumBlocks[i] = iGlobalDim[i] / iBlockSize[i];
+      }
     }
+  }
+    
+  //domainMap is only used if the file order is unspecified
+  if (iFileOrder[0] == -1) {
+    /* don't use domainMaps any more 
+       domainMap.resize( iNumBlocks[0]*iNumBlocks[1]*iNumBlocks[2]*3, -1 );
+    */ 
+    iFileOrder[0] = 2; 
+    iFileOrder[1] = 1; 
+    iFileOrder[2] = 0;       
+  }
 
-    // Rearrange data if it is flat in one dimension
-    if (iGlobalDim[2] == 1)
+  // Rearrange data if it is flat in one dimension
+  if (iGlobalDim[2] == 1)
     {
-        dim = 2;
-        flatDim = 2;
+      dim = 2;
+      flatDim = 2;
 
-        Fix2DFileOrder(0, 1, iFileOrder);  
+      Fix2DFileOrder(0, 1, iFileOrder);  
     }
-    else if (iGlobalDim[1] == 1)
+  else if (iGlobalDim[1] == 1)
     {
-        dim = 2;
-        flatDim = 1;
+      dim = 2;
+      flatDim = 1;
         
-        double tmpOrigin = fOrigin[1];
-        double tmpStride = fStride[1];
-        double tmpInterior = iInteriorSize[1];
-        double tmpBoundary = iBoundarySize[1];
-
-        fOrigin[1] = fOrigin[2];
-        fStride[1] = fStride[2];
-        iNumBlocks[1] = iNumBlocks[2];
-        iBlockSize[1] = iBlockSize[2];
-        // version 2.0
-        iInteriorSize[1] = iInteriorSize[2];
-        iBoundarySize[1] = iBoundarySize[2];
-
-        fOrigin[2] = tmpOrigin;
-        fStride[2] = tmpStride;
-        // version 2.0
-        iInteriorSize[2] = tmpInterior; 
-        iBoundarySize[2] = tmpBoundary;
-
-        iNumBlocks[2] = 1;
-        iBlockSize[2] = 1;
-
-        Fix2DFileOrder(0, 2, iFileOrder);
+      double tmpOrigin = fOrigin[1];
+      double tmpStride = fStride[1];
+      double tmpInterior = iInteriorSize[1];
+      double tmpBoundary = iBoundarySize[1];
+
+      fOrigin[1] = fOrigin[2];
+      fStride[1] = fStride[2];
+      iNumBlocks[1] = iNumBlocks[2];
+      iBlockSize[1] = iBlockSize[2];
+      // version 2.0
+      iInteriorSize[1] = iInteriorSize[2];
+      iBoundarySize[1] = iBoundarySize[2];
+
+      fOrigin[2] = tmpOrigin;
+      fStride[2] = tmpStride;
+      // version 2.0
+      iInteriorSize[2] = tmpInterior; 
+      iBoundarySize[2] = tmpBoundary;
+
+      iNumBlocks[2] = 1;
+      iBlockSize[2] = 1;
+
+      Fix2DFileOrder(0, 2, iFileOrder);
     }
-    else if (iGlobalDim[0] == 1)
-      {
-        dim = 2;
-        flatDim = 0;
+  else if (iGlobalDim[0] == 1)
+    {
+      dim = 2;
+      flatDim = 0;
         
-        double tmpOrigin = fOrigin[0];
-        double tmpStride = fStride[0];
-        double tmpInterior = iInteriorSize[0];
-        double tmpBoundary = iBoundarySize[0];
+      double tmpOrigin = fOrigin[0];
+      double tmpStride = fStride[0];
+      double tmpInterior = iInteriorSize[0];
+      double tmpBoundary = iBoundarySize[0];
         
-        fOrigin[0] = fOrigin[1];
-        fStride[0] = fStride[1];
-        iNumBlocks[0] = iNumBlocks[1];
-        iBlockSize[0] = iBlockSize[1];
-        // version 2.0
-        iInteriorSize[0] = iInteriorSize[1];
-        iBoundarySize[0] = iBoundarySize[1];
+      fOrigin[0] = fOrigin[1];
+      fStride[0] = fStride[1];
+      iNumBlocks[0] = iNumBlocks[1];
+      iBlockSize[0] = iBlockSize[1];
+      // version 2.0
+      iInteriorSize[0] = iInteriorSize[1];
+      iBoundarySize[0] = iBoundarySize[1];
         
-        fOrigin[1] = fOrigin[2];
-        fStride[1] = fStride[2];
-        iNumBlocks[1] = iNumBlocks[2];
-        iBlockSize[1] = iBlockSize[2];
-        // version 2.0
-        iInteriorSize[1] = iInteriorSize[2];
-        iBoundarySize[1] = iBoundarySize[2];
+      fOrigin[1] = fOrigin[2];
+      fStride[1] = fStride[2];
+      iNumBlocks[1] = iNumBlocks[2];
+      iBlockSize[1] = iBlockSize[2];
+      // version 2.0
+      iInteriorSize[1] = iInteriorSize[2];
+      iBoundarySize[1] = iBoundarySize[2];
    
-        fOrigin[2] = tmpOrigin;
-        fStride[2] = tmpStride;
-        iInteriorSize[2] = tmpInterior; 
-        iBoundarySize[2] = tmpBoundary;
+      fOrigin[2] = tmpOrigin;
+      fStride[2] = tmpStride;
+      iInteriorSize[2] = tmpInterior; 
+      iBoundarySize[2] = tmpBoundary;
 
-        iNumBlocks[2] = 1;
-        iBlockSize[2] = 1;
+      iNumBlocks[2] = 1;
+      iBlockSize[2] = 1;
 
-        Fix2DFileOrder(1, 2, iFileOrder);
+      Fix2DFileOrder(1, 2, iFileOrder);
     }
-     debug5 << Vec2String("iGlobalDim",iGlobalDim,3) << endl; 
+  debug5 << Vec2String("iGlobalDim",iGlobalDim,3) << endl; 
 
-    if (bCurvilinear && iFileOrder[0] == -1)
-        EXCEPTION1(InvalidDBTypeException, 
-                   "A curvilinear mesh must set the fileorder" );
+  if (bCurvilinear && iFileOrder[0] == -1)
+    EXCEPTION1(InvalidDBTypeException, 
+               "A curvilinear mesh must set the fileorder" );
 
 
 }
@@ -604,28 +612,28 @@ avtMirandaFileFormat::avtMirandaFileFormat(const char *filename, DBOptionsAttrib
 void 
 avtMirandaFileFormat::SkipToEndOfLine( ifstream &f, bool bCheckForBadTokens )
 {
-    char buf[512];
-    f.getline(buf, 512);
+  char buf[512];
+  f.getline(buf, 512);
 
-    int len = strlen(buf);
-    if (len >= 511)
+  int len = strlen(buf);
+  if (len >= 511)
     {
-        EXCEPTION1(InvalidDBTypeException, "Error parsing file." );
+      EXCEPTION1(InvalidDBTypeException, "Error parsing file." );
     }
 
-    if (bCheckForBadTokens)
+  if (bCheckForBadTokens)
     {
-        int ii;
-        for (ii = 0 ; ii < len ; ii++)
+      int ii;
+      for (ii = 0 ; ii < len ; ii++)
         {
-            if (buf[ii] == '#')
+          if (buf[ii] == '#')
             {
-                //The rest of the line is comments.  We're done
-                break;
+              //The rest of the line is comments.  We're done
+              break;
             }
-            if ((buf[ii] != ' ') && (buf[ii] != '\t') && (buf[ii] != '\n'))
+          if ((buf[ii] != ' ') && (buf[ii] != '\t') && (buf[ii] != '\n'))
             {
-                EXCEPTION1(InvalidDBTypeException, "Error parsing file." );
+              EXCEPTION1(InvalidDBTypeException, "Error parsing file." );
             }
         }
     }
@@ -648,19 +656,19 @@ avtMirandaFileFormat::SkipToEndOfLine( ifstream &f, bool bCheckForBadTokens )
 double
 avtMirandaFileFormat::GetFortranDouble( ifstream &f )
 {
-    std::string s;
-    f >> s;
+  std::string s;
+  f >> s;
 
-    size_t ii;
-    for (ii = 0 ; ii < s.size() ; ii++)
+  size_t ii;
+  for (ii = 0 ; ii < s.size() ; ii++)
     {
-        if (s[ii] == 'd' || s[ii] == 'D')
+      if (s[ii] == 'd' || s[ii] == 'D')
         {
-            s[ii] = 'e';
+          s[ii] = 'e';
         }
     }
-    double r = atof(s.c_str());
-    return r;
+  double r = atof(s.c_str());
+  return r;
 }
 
 
@@ -716,136 +724,141 @@ avtMirandaFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md,
                                                int /*timeState*/)
 {
   debug5 << "PopulateDatabaseMetaData called" << endl; 
-    // Add the mesh
-    std::string meshname("mesh");
-    int nblocks = iNumBlocks[0] * iNumBlocks[1] * iNumBlocks[2];
-
-    avtMeshMetaData *mesh = new avtMeshMetaData;
-    mesh->name = meshname;
-    mesh->numBlocks = nblocks;
-    mesh->cellOrigin = 1;
-    mesh->spatialDimension = dim;
-    mesh->topologicalDimension = dim;
-    mesh->blockTitle = "blocks";
-    mesh->blockPieceName = "p%06d";
-    mesh->groupPieceName = "global_index";
-
-    debug5 << Vec2String("fOrigin",fOrigin,3) << endl; 
-    debug5 << Vec2String("fStride",fStride,3) << endl; 
-    debug5 << Vec2String("iBlockSize",iBlockSize,3) << endl; 
-    debug5 << Vec2String("iBoundarySize",iBoundarySize,3) << endl; 
-    debug5 << Vec2String("iInteriorSize",iInteriorSize,3) << endl; 
-    if (!bCurvilinear)    
-      {
-        /* The extents of the mesh are from node to node, not zone centered */ 
-        debug5 << "mesh->meshType = AVT_RECTILINEAR_MESH" << endl; 
-        mesh->meshType = AVT_RECTILINEAR_MESH;
-        double extents[6]; 
-        for (int i=0; i< dim; i++) {
-          if (bZonal) {  
-            extents[2*i] = fOrigin[i] - 0.5*fStride[i]; 
-            extents[2*i+1 ] =  extents[2*i] + (iNumBlocks[i]*iBlockSize[i])*fStride[i]; 
-          } else {
-            extents[2*i] = fOrigin[i];
-            extents[2*i+1] =  fOrigin[i] + ((iNumBlocks[i]-1)*iBlockSize[i] + iBoundarySize[i] - 1)*fStride[i];
-          }
+  // Add the mesh
+  std::string meshname("mesh");
+  int nblocks = iNumBlocks[0] * iNumBlocks[1] * iNumBlocks[2];
+
+  avtMeshMetaData *mesh = new avtMeshMetaData;
+  mesh->name = meshname;
+  mesh->numBlocks = nblocks;
+  mesh->cellOrigin = 1;
+  mesh->spatialDimension = dim;
+  mesh->topologicalDimension = dim;
+  mesh->blockTitle = "blocks";
+  mesh->blockPieceName = "p%06d";
+  mesh->groupPieceName = "global_index";
+
+  debug5 << Vec2String("fOrigin",fOrigin,3) << endl; 
+  debug5 << Vec2String("fStride",fStride,3) << endl; 
+  debug5 << Vec2String("iBlockSize",iBlockSize,3) << endl; 
+  debug5 << Vec2String("iBoundarySize",iBoundarySize,3) << endl; 
+  debug5 << Vec2String("iInteriorSize",iInteriorSize,3) << endl; 
+  if (!bCurvilinear)    
+    {
+      /* The extents of the mesh are from node to node, not zone centered */ 
+      debug5 << "mesh->meshType = AVT_RECTILINEAR_MESH" << endl; 
+      mesh->meshType = AVT_RECTILINEAR_MESH;
+      double extents[6]; 
+      for (int i=0; i< dim; i++) {
+        if (bZonal) {  
+          extents[2*i] = fOrigin[i] - 0.5*fStride[i]; 
+          extents[2*i+1 ] =  extents[2*i] + (iNumBlocks[i]*iBlockSize[i])*fStride[i]; 
+        } else {
+          extents[2*i] = fOrigin[i];
+          extents[2*i+1] =  fOrigin[i] + ((iNumBlocks[i]-1)*iBlockSize[i] + iBoundarySize[i] - 1)*fStride[i];
         }
-        
-        debug5 << "Set " << Vec2String("extents",extents,2*dim) << endl; 
-        mesh->SetExtents(extents);      
-        mesh->hasSpatialExtents = true;
-      }
-    else  
-      {
-        debug5 << "mesh->meshType = AVT_CURVILINEAR_MESH" << endl; 
-        mesh->meshType = AVT_CURVILINEAR_MESH;
-        mesh->hasSpatialExtents = false;
       }
+        
+      debug5 << "Set " << Vec2String("extents",extents,2*dim) << endl; 
+      mesh->SetExtents(extents);      
+      mesh->hasSpatialExtents = true;
+    }
+  else  
+    {
+      debug5 << "mesh->meshType = AVT_CURVILINEAR_MESH" << endl; 
+      mesh->meshType = AVT_CURVILINEAR_MESH;
+      mesh->hasSpatialExtents = false;
+    }
     
     
-    if (dim == 2)
-      {
-        if (flatDim == 0)
-          {
-            mesh->xLabel = "Y";
-            mesh->yLabel = "Z";
-            mesh->zLabel = "";
-          }
-        if (flatDim == 1)
-          {
-            mesh->xLabel = "X";
-            mesh->yLabel = "Z";
-            mesh->zLabel = "";
-          }
-      }
+  if (dim == 2)
+    {
+      if (flatDim == 0)
+        {
+          mesh->xLabel = "Y";
+          mesh->yLabel = "Z";
+          mesh->zLabel = "";
+        }
+      if (flatDim == 1)
+        {
+          mesh->xLabel = "X";
+          mesh->yLabel = "Z";
+          mesh->zLabel = "";
+        }
+    }
     
     
-    md->Add(mesh);
+  md->Add(mesh);
     
-    // Add the variables    
-    enum avtCentering centering = (bZonal) ? AVT_ZONECENT : AVT_NODECENT;
-    // enum avtCentering centering = AVT_NODECENT;
-    if (bZonal) 
-      debug5 << "centering is zonal"<<endl;
-    else 
-      debug5 << "centering is nodal"<<endl;
-
-    size_t ii;
-    for (ii = 0 ; ii < aVarNames.size() ; ii++)
-      {
-        if (aVarNumComps[ii] == 1)
+  // Add the variables    
+  enum avtCentering centering = (bZonal) ? AVT_ZONECENT : AVT_NODECENT;
+  // enum avtCentering centering = AVT_NODECENT;
+  if (bZonal) 
+    debug5 << "centering is zonal"<<endl;
+  else 
+    debug5 << "centering is nodal"<<endl;
+
+  size_t ii;
+  for (ii = 0 ; ii < aVarNames.size() ; ii++)
+    {
+      if (aVarNumComps[ii] == 1)
         {
-            AddScalarVarToMetaData(md, aVarNames[ii], meshname, centering);
+          AddScalarVarToMetaData(md, aVarNames[ii], meshname, centering);
         }
-        else
+      else
         {
-            AddVectorVarToMetaData(md, aVarNames[ii], meshname, 
-                                   centering, aVarNumComps[ii]);
+          AddVectorVarToMetaData(md, aVarNames[ii], meshname, 
+                                 centering, aVarNumComps[ii]);
         }
-      }
-
-    if (aMatNames.size() > 0) {
-      // Add material set components as scalar vars as well as a material set
-      for (ii = 0 ; ii < aMatNames.size() ; ii++)
-        {
-          AddScalarVarToMetaData(md, aMatNames[ii], meshname, centering);
-        }
-      avtMaterialMetaData *matmd = new avtMaterialMetaData;
-      matmd->name = "materialset";
-      matmd->meshName = meshname;
-      matmd->numMaterials = (int)aMatNames.size();
-      matmd->materialNames = aMatNames;
-      md->Add(matmd);
     }
-    debug5 << Vec2String("iNumBlocks", iNumBlocks, 3) << endl; 
 
-    // Find domain boundaries
-    if (!avtDatabase::OnlyServeUpMetaData() && nblocks > 1)
-    {
-        avtStructuredDomainBoundaries *rdb;
-        if (bCurvilinear)
-            rdb = new avtCurvilinearDomainBoundaries(true);
-        else
-            rdb = new avtRectilinearDomainBoundaries(true);
+  if (aMatNames.size() > 0) {
+    // Add material set components as scalar vars as well as a material set
+    for (ii = 0 ; ii < aMatNames.size() ; ii++)
+      {
+        AddScalarVarToMetaData(md, aMatNames[ii], meshname, centering);
+      }
+    avtMaterialMetaData *matmd = new avtMaterialMetaData;
+    matmd->name = "materialset";
+    matmd->meshName = meshname;
+    matmd->numMaterials = (int)aMatNames.size();
+    matmd->materialNames = aMatNames;
+    md->Add(matmd);
+  }
+  debug5 << Vec2String("iNumBlocks", iNumBlocks, 3) << endl; 
 
-        rdb->SetNumDomains(nblocks);
-        int bbox[6];
-        for (ii = 0 ; ii < (size_t)nblocks ; ii++)
+  // Find logical domain boundaries
+  if (!avtDatabase::OnlyServeUpMetaData() && nblocks > 1)
+    {
+      avtStructuredDomainBoundaries *rdb;
+      if (bCurvilinear)
+        rdb = new avtCurvilinearDomainBoundaries(true);
+      else
+        rdb = new avtRectilinearDomainBoundaries(true);
+
+      rdb->SetNumDomains(nblocks);
+      int bbox[6];
+      for (ii = 0 ; ii < (size_t)nblocks ; ii++)
         {
           int iBlockIJK[3];           
           DomainToIJK( ii, iBlockIJK[0], iBlockIJK[1],  iBlockIJK[2]);
-          // int iBlockX, iBlockY, iBlockZ;
-          // DomainToIJK( ii, iBlockX, iBlockY, iBlockZ );
           for (int ijk=0; ijk < 3; ijk++) {
-            /* set lower bounds */ 
-            bbox[ijk*2] = iBlockIJK[ijk] * iBlockSize[ijk];
- 
-            /* set upper bound */ 
-            if (iBlockIJK[ijk] == iNumBlocks[ijk]-1) {
-              bbox[2*ijk+1] = bbox[2*ijk] + iBoundarySize[ijk] - 1; 
+            if (sFileVersion == "2.0" && bCurvilinear && bZonal) {
+              // in this particular instance, the block sizes are all like boundaries
+              /* set lower bounds */ 
+              bbox[2*ijk] = iBlockIJK[ijk] * (iBlockSize[ijk]-1); 
+              /* set upper bound */ 
+              bbox[2*ijk+1] = bbox[2*ijk] + iBlockSize[ijk] - 1; // parentheses are correct
             } else {
-              bbox[2*ijk+1] = bbox[2*ijk] + iInteriorSize[ijk] - 1; 
-            }            
+              /* set lower bounds */ 
+              bbox[ijk*2] = iBlockIJK[ijk] * iBlockSize[ijk];
+              /* set upper bound */ 
+              if (iBlockIJK[ijk] == iNumBlocks[ijk]-1) {
+                bbox[2*ijk+1] = bbox[2*ijk] + iBoundarySize[ijk] - 1; 
+              } else {
+                bbox[2*ijk+1] = bbox[2*ijk] + iInteriorSize[ijk] - 1; 
+              }
+            }
           }
 
           // VisIt expects the 2d case to have flat logical z extent (0,0).
@@ -854,15 +867,15 @@ avtMirandaFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md,
               bbox[4] = 0;
               bbox[5] = 0;
             }
-          debug5 << "For domain "<< ii <<Vec2String("iBlockIJK",iBlockIJK,3)<<", "<<Vec2String("bounds",bbox,6) << endl; 
+          debug5 << "For domain "<< ii <<", "<<Vec2String("iBlockIJK",iBlockIJK,3)<<", "<<Vec2String("bounds",bbox,6) << endl; 
           rdb->SetIndicesForRectGrid(ii, bbox);
         }
-        rdb->CalculateBoundaries();
+      rdb->CalculateBoundaries();
 
-        void_ref_ptr vr = void_ref_ptr(rdb,
-                                   avtStructuredDomainBoundaries::Destruct);
-        cache->CacheVoidRef("any_mesh",
-                       AUXILIARY_DATA_DOMAIN_BOUNDARY_INFORMATION, -1, -1, vr);
+      void_ref_ptr vr = void_ref_ptr(rdb,
+                                     avtStructuredDomainBoundaries::Destruct);
+      cache->CacheVoidRef("any_mesh",
+                          AUXILIARY_DATA_DOMAIN_BOUNDARY_INFORMATION, -1, -1, vr);
     }
 
    
@@ -889,94 +902,94 @@ void
 avtMirandaFileFormat::DomainToIJK(int domain, int &i, int &j, int &k)
 {
 
-    if (iFileOrder[0] != -1)
+  if (iFileOrder[0] != -1)
     {
-        int out[3];
+      int out[3];
 
-        if (dim == 3)
+      if (dim == 3)
         {
-            out[iFileOrder[0]] = domain % iNumBlocks[iFileOrder[0]];
-            out[iFileOrder[1]] = (domain / iNumBlocks[iFileOrder[0]]) % iNumBlocks[iFileOrder[1]];
-            out[iFileOrder[2]] = domain / (iNumBlocks[iFileOrder[0]] * iNumBlocks[iFileOrder[1]]);
-            i = out[0];
-            j = out[1];
-            k = out[2];
+          out[iFileOrder[0]] = domain % iNumBlocks[iFileOrder[0]];
+          out[iFileOrder[1]] = (domain / iNumBlocks[iFileOrder[0]]) % iNumBlocks[iFileOrder[1]];
+          out[iFileOrder[2]] = domain / (iNumBlocks[iFileOrder[0]] * iNumBlocks[iFileOrder[1]]);
+          i = out[0];
+          j = out[1];
+          k = out[2];
         }
-        else
+      else
         {
-            int lenInFastDir = iNumBlocks[iFileOrder[0]];
+          int lenInFastDir = iNumBlocks[iFileOrder[0]];
 
-            out[iFileOrder[0]] = domain % lenInFastDir;
-            out[iFileOrder[1]] = domain / lenInFastDir;
-            i = out[0];
-            j = out[1];
-            k = 0;
+          out[iFileOrder[0]] = domain % lenInFastDir;
+          out[iFileOrder[1]] = domain / lenInFastDir;
+          i = out[0];
+          j = out[1];
+          k = 0;
         }
-        /* This is only true if blocks come in ZYX order, which is normally
-        true, but not guaranteed.
-        k = domain % iNumBlocks[2];
-        j = (domain / iNumBlocks[2]) % iNumBlocks[1];
-        i = domain / (iNumBlocks[1] * iNumBlocks[2]);
-        */
+      /* This is only true if blocks come in ZYX order, which is normally
+         true, but not guaranteed.
+         k = domain % iNumBlocks[2];
+         j = (domain / iNumBlocks[2]) % iNumBlocks[1];
+         i = domain / (iNumBlocks[1] * iNumBlocks[2]);
+      */
     }
-    else
+  else
     {
       char buf[512] = "domainMaps are no longer supported"; 
       
       EXCEPTION1(InvalidFilesException, buf);
       /*
-       if (domainMap[domain*3] == -1)
+        if (domainMap[domain*3] == -1)
         {
-            char filename[512];
-            string tok;
-            double blockOrigin[3];
-            int ii;
+        char filename[512];
+        string tok;
+        double blockOrigin[3];
+        int ii;
             
-            sprintf(filename, gridTemplate.c_str(), domain);
-            ifstream  f(filename);
-            if (!f.good())
-            {
-                EXCEPTION1(InvalidFilesException, filename);
-            }
+        sprintf(filename, gridTemplate.c_str(), domain);
+        ifstream  f(filename);
+        if (!f.good())
+        {
+        EXCEPTION1(InvalidFilesException, filename);
+        }
             
-            f >> tok;
-            if (tok != "origin:")
-            {
-                EXCEPTION1(InvalidFilesException, filename);        
-            }
-            blockOrigin[0] = GetFortranDouble( f );
-            blockOrigin[1] = GetFortranDouble( f );
-            blockOrigin[2] = GetFortranDouble( f );
-            f.close();
+        f >> tok;
+        if (tok != "origin:")
+        {
+        EXCEPTION1(InvalidFilesException, filename);        
+        }
+        blockOrigin[0] = GetFortranDouble( f );
+        blockOrigin[1] = GetFortranDouble( f );
+        blockOrigin[2] = GetFortranDouble( f );
+        f.close();
     
-            if (dim == 3)
-            {
-                for (ii = 0 ; ii < 3 ; ii++)
-                {
-                    double dIndex = (blockOrigin[ii] - fOrigin[ii]) / 
-                                    (fStride[ii]*iBlockSize[ii]);
-                    domainMap[domain*3 + ii] = (int)floor(0.5 + dIndex);
-                }
-            }
-            else
-            {
-                if (flatDim == 0)
-                {
-                    blockOrigin[0] = blockOrigin[1];
-                    blockOrigin[1] = blockOrigin[2];
-                }
-                else if (flatDim == 1)
-                {
-                    blockOrigin[1] = blockOrigin[2];
-                }
-                for (ii = 0 ; ii < 2 ; ii++)
-                {
-                    double dIndex = (blockOrigin[ii] - fOrigin[ii]) / 
-                                    (fStride[ii]*iBlockSize[ii]);
-                    domainMap[domain*3 + ii] = (int)floor(0.5 + dIndex);
-                }
-                domainMap[domain*3 + 2] = 0;
-            }
+        if (dim == 3)
+        {
+        for (ii = 0 ; ii < 3 ; ii++)
+        {
+        double dIndex = (blockOrigin[ii] - fOrigin[ii]) / 
+        (fStride[ii]*iBlockSize[ii]);
+        domainMap[domain*3 + ii] = (int)floor(0.5 + dIndex);
+        }
+        }
+        else
+        {
+        if (flatDim == 0)
+        {
+        blockOrigin[0] = blockOrigin[1];
+        blockOrigin[1] = blockOrigin[2];
+        }
+        else if (flatDim == 1)
+        {
+        blockOrigin[1] = blockOrigin[2];
+        }
+        for (ii = 0 ; ii < 2 ; ii++)
+        {
+        double dIndex = (blockOrigin[ii] - fOrigin[ii]) / 
+        (fStride[ii]*iBlockSize[ii]);
+        domainMap[domain*3 + ii] = (int)floor(0.5 + dIndex);
+        }
+        domainMap[domain*3 + 2] = 0;
+        }
         }
         i = domainMap[domain*3 + 0];
         j = domainMap[domain*3 + 1];
@@ -1014,10 +1027,10 @@ avtMirandaFileFormat::DomainToIJK(int domain, int &i, int &j, int &k)
 vtkDataSet *
 avtMirandaFileFormat::GetMesh(int /*timestate*/, int domain, const char * /*meshname*/)
 {
-    if (bCurvilinear)
-        return GetCurvilinearMesh(domain);
-    else
-        return GetRectilinearMesh(domain);
+  if (bCurvilinear)
+    return GetCurvilinearMesh(domain);
+  else
+    return GetRectilinearMesh(domain);
 }
 
 // ****************************************************************************
@@ -1086,7 +1099,6 @@ avtMirandaFileFormat::GetCurvilinearMesh2(int domain) {
   
   int domainsize[3]; 
   GetBlockDims(domain, domainsize); 
-
   int nSrcTuples = domainsize[0]*domainsize[1]*domainsize[2];
   vtkFloatArray *array = vtkFloatArray::New();
   array->SetNumberOfComponents(3);
@@ -1097,25 +1109,27 @@ avtMirandaFileFormat::GetCurvilinearMesh2(int domain) {
   vector<float> v(nSrcTuples*3,0); // allocate and set to zero -- no delete needed
   float *bufp = &v[0];
   TRY
-  {
+    {
       int comp = 0, bufcomp = 0; 
       for (comp=0; comp < 3; comp++)
-      {
+        {
           if (dim == 2 && comp == flatDim) 
-              continue;    
-          ReadRawScalar(fd, comp, bufp + bufcomp*nSrcTuples, filename, domain); 
+            continue;    
+          ReadRawScalar(fd, comp, bufp, filename, domain, nSrcTuples); 
+          debug5 << Vec2String("First five elements", bufp, 5) << endl; 
+          bufp += nSrcTuples; 
           bufcomp++; 
-      }
+        }
       fclose(fd); 
-  }
+    }
   CATCHALL
-  {
+    {
       fclose(fd);
       RETHROW;
-  }
+    }
   ENDTRY
 
-  InterleaveData((float *)(array->GetVoidPointer(0)), bufp, domainsize, 3);
+    InterleaveData((float *)(array->GetVoidPointer(0)), &v[0], domainsize, 3);
 
   vtkPoints *p = vtkPoints::New();
   p->SetData(array);
@@ -1165,76 +1179,76 @@ avtMirandaFileFormat::GetCurvilinearMesh(int domain)
   TIMERSTART(); 
   debug4 << "GetCurvilinearMesh("<<domain<<")"<< endl; 
 
-    vtkStructuredGrid *sgrid = vtkStructuredGrid::New();
+  vtkStructuredGrid *sgrid = vtkStructuredGrid::New();
 
-    int neighbors[8], realdim[3], ii, jj;
-    float *aRawBlocks[8] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
+  int neighbors[8], realdim[3], ii, jj;
+  float *aRawBlocks[8] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
 
-    FindNeighborDomains(domain, neighbors, realdim);
+  FindNeighborDomains(domain, neighbors, realdim);
 
-    sgrid->SetDimensions(realdim);
-    int nSrcTuples = iBlockSize[0]*iBlockSize[1]*iBlockSize[2];
+  sgrid->SetDimensions(realdim);
+  int nSrcTuples = iBlockSize[0]*iBlockSize[1]*iBlockSize[2];
 
-    // vectors provide auto initialization and scoping for garbage collection
-    vector<vector<float> > floatvectors(8); 
-    for (ii = 0; ii < 8; ii++)
+  // vectors provide auto initialization and scoping for garbage collection
+  vector<vector<float> > floatvectors(8); 
+  for (ii = 0; ii < 8; ii++)
     {
-        if (neighbors[ii] == -1)
-            continue;
+      if (neighbors[ii] == -1)
+        continue;
 
-        char filename[512];
-        if (SNPRINTF(filename, 512, gridTemplate.c_str(), neighbors[ii]) < 0)
-            EXCEPTION1(InvalidFilesException, "");
+      char filename[512];
+      if (SNPRINTF(filename, 512, gridTemplate.c_str(), neighbors[ii]) < 0)
+        EXCEPTION1(InvalidFilesException, "");
 
-        FILE *fd = fopen(filename, "rb");
-        if (fd == NULL)
-            EXCEPTION1(InvalidFilesException, filename);
+      FILE *fd = fopen(filename, "rb");
+      if (fd == NULL)
+        EXCEPTION1(InvalidFilesException, filename);
         
-        floatvectors[ii].resize(nSrcTuples*3);
-        aRawBlocks[ii] = &floatvectors[ii][0];
+      floatvectors[ii].resize(nSrcTuples*3);
+      aRawBlocks[ii] = &floatvectors[ii][0];
 
-        int iDst = 0;
-        for (jj = 0; jj < 3; jj++)
+      int iDst = 0;
+      for (jj = 0; jj < 3; jj++)
         {
-            if (dim == 2 && jj == flatDim)
-                continue;
+          if (dim == 2 && jj == flatDim)
+            continue;
 
-            ReadRawScalar(fd, jj, aRawBlocks[ii] + iDst*nSrcTuples, filename, domain);
-            iDst++;
+          ReadRawScalar(fd, jj, aRawBlocks[ii] + iDst*nSrcTuples, filename, domain, nSrcTuples);
+          iDst++;
         }
 
-        // this is redundant -- vector initialized already
-        /* if (dim == 2)
-            memset(aRawBlocks[ii] + 2*nSrcTuples, 0, nSrcTuples*sizeof(float));
-        */
-        fclose(fd);
+      // this is redundant -- vector initialized already
+      /* if (dim == 2)
+         memset(aRawBlocks[ii] + 2*nSrcTuples, 0, nSrcTuples*sizeof(float));
+      */
+      fclose(fd);
     }
 
-    vtkFloatArray *array = vtkFloatArray::New();
-    array->SetNumberOfComponents(3);
-    array->SetNumberOfTuples(realdim[0]*realdim[1]*realdim[2]);
+  vtkFloatArray *array = vtkFloatArray::New();
+  array->SetNumberOfComponents(3);
+  array->SetNumberOfTuples(realdim[0]*realdim[1]*realdim[2]);
 
-    PackData( (float *)(array->GetVoidPointer(0)), aRawBlocks, realdim, 3, true);
+  PackData( (float *)(array->GetVoidPointer(0)), aRawBlocks, realdim, 3, true);
     
-    vtkPoints *p = vtkPoints::New();
-    p->SetData(array);
-    array->Delete();
-
-    sgrid->SetPoints(p);
-
-    int iBlockX, iBlockY, iBlockZ;
-    DomainToIJK( domain, iBlockX, iBlockY, iBlockZ );
-    vtkIntArray *arr = vtkIntArray::New();
-    arr->SetNumberOfTuples(3);
-    arr->SetValue(0, iBlockX*iBlockSize[0]+1);
-    arr->SetValue(1, iBlockY*iBlockSize[1]+1);
-    arr->SetValue(2, iBlockZ*iBlockSize[2]+1);
-    arr->SetName("base_index");
-    sgrid->GetFieldData()->AddArray(arr);
-    arr->Delete();
-    TIMERSTOP(str(format("GetCurvilinearMesh(%1%)")%domain)); 
-
-    return sgrid;
+  vtkPoints *p = vtkPoints::New();
+  p->SetData(array);
+  array->Delete();
+
+  sgrid->SetPoints(p);
+
+  int iBlockX, iBlockY, iBlockZ;
+  DomainToIJK( domain, iBlockX, iBlockY, iBlockZ );
+  vtkIntArray *arr = vtkIntArray::New();
+  arr->SetNumberOfTuples(3);
+  arr->SetValue(0, iBlockX*iBlockSize[0]+1);
+  arr->SetValue(1, iBlockY*iBlockSize[1]+1);
+  arr->SetValue(2, iBlockZ*iBlockSize[2]+1);
+  arr->SetName("base_index");
+  sgrid->GetFieldData()->AddArray(arr);
+  arr->Delete();
+  TIMERSTOP(str(format("GetCurvilinearMesh(%1%)")%domain)); 
+
+  return sgrid;
 }
 
 
@@ -1255,74 +1269,74 @@ avtMirandaFileFormat::GetCurvilinearMesh(int domain)
 vtkDataSet *
 avtMirandaFileFormat::GetRectilinearMesh(int domain)
 {
-    vtkRectilinearGrid *rgrid = vtkRectilinearGrid::New();
-    debug4 << "GetRectilinearMesh("<<domain<<")"<< endl; 
-    debug5 << "bZonal is " << bZonal << endl; 
+  vtkRectilinearGrid *rgrid = vtkRectilinearGrid::New();
+  debug4 << "GetRectilinearMesh("<<domain<<")"<< endl; 
+  debug5 << "bZonal is " << bZonal << endl; 
 
-    int ii;    
-    int iBlockIJK[3]; 
-    DomainToIJK( domain, iBlockIJK[0], iBlockIJK[1], iBlockIJK[2] );
+  int ii;    
+  int iBlockIJK[3]; 
+  DomainToIJK( domain, iBlockIJK[0], iBlockIJK[1], iBlockIJK[2] );
  
-    int gridsize[3] = { iBlockSize[0]+1, iBlockSize[1]+1, iBlockSize[2]+1 }; 
-    if (bZonal) {
-      if (dim == 2) {
-        gridsize[2] = 1; 
-      }
-    }
-    else {   
-      GetBlockDims(domain, gridsize); 
+  int gridsize[3] = { iBlockSize[0]+1, iBlockSize[1]+1, iBlockSize[2]+1 }; 
+  if (bZonal) {
+    if (dim == 2) {
+      gridsize[2] = 1; 
     }
-    rgrid->SetDimensions(gridsize); 
-    debug5 << "GetRectilinearMesh: " << Vec2String("gridsize",gridsize,3) << endl;
+  }
+  else {   
+    GetBlockDims(domain, gridsize); 
+  }
+  rgrid->SetDimensions(gridsize); 
+  debug5 << "GetRectilinearMesh: " << Vec2String("gridsize",gridsize,3) << endl;
     
-    rgrid->SetDimensions(gridsize);    
+  rgrid->SetDimensions(gridsize);    
 
-    vtkFloatArray *x = vtkFloatArray::New();
-    vtkFloatArray *y = vtkFloatArray::New();
-    vtkFloatArray *z = vtkFloatArray::New();
+  vtkFloatArray *x = vtkFloatArray::New();
+  vtkFloatArray *y = vtkFloatArray::New();
+  vtkFloatArray *z = vtkFloatArray::New();
      
-    x->SetNumberOfTuples(gridsize[0]);
-    y->SetNumberOfTuples(gridsize[1]);
-    z->SetNumberOfTuples(gridsize[2]);
+  x->SetNumberOfTuples(gridsize[0]);
+  y->SetNumberOfTuples(gridsize[1]);
+  z->SetNumberOfTuples(gridsize[2]);
  
-    int extraElement = bZonal?1:0; 
-    double zonalOffset[3] = {extraElement*0.5*fStride[0], extraElement*0.5*fStride[1], extraElement*0.5*fStride[2]};
-    vtkFloatArray *array = NULL; 
-    for (int ijk = 0; ijk<dim; ijk++) {
-      if (ijk == 0) array = x; 
-      else if (ijk == 1) array = y; 
-      else if (ijk == 2) array = z; 
-      double first, location;
-      for (ii = 0 ; ii < gridsize[ijk] ; ii++) {
-        location = fOrigin[ijk] + (iBlockIJK[ijk]*iBlockSize[ijk]+ii)*fStride[ijk] - zonalOffset[ijk];
-        array->SetTuple1(ii, location);
-        if (!ii) first = location; 
-      }
-      debug5 << "GetRectilinearMesh(domain="<<domain<<"): "<<ijk<<" direction has " << gridsize[ijk] << " samples and limits are "<<first << " to " << location << endl;  
-    }
-    if (dim == 2) {
-      z->SetTuple1(0, 0.);
-      debug5 << "GetRectilinearMesh("<<domain<<"): Z limits are 0 to 0" << endl; 
+  int extraElement = bZonal?1:0; 
+  double zonalOffset[3] = {extraElement*0.5*fStride[0], extraElement*0.5*fStride[1], extraElement*0.5*fStride[2]};
+  vtkFloatArray *array = NULL; 
+  for (int ijk = 0; ijk<dim; ijk++) {
+    if (ijk == 0) array = x; 
+    else if (ijk == 1) array = y; 
+    else if (ijk == 2) array = z; 
+    double first, location;
+    for (ii = 0 ; ii < gridsize[ijk] ; ii++) {
+      location = fOrigin[ijk] + (iBlockIJK[ijk]*iBlockSize[ijk]+ii)*fStride[ijk] - zonalOffset[ijk];
+      array->SetTuple1(ii, location);
+      if (!ii) first = location; 
     }
+    debug5 << "GetRectilinearMesh(domain="<<domain<<"): "<<ijk<<" direction has " << gridsize[ijk] << " samples and limits are "<<first << " to " << location << endl;  
+  }
+  if (dim == 2) {
+    z->SetTuple1(0, 0.);
+    debug5 << "GetRectilinearMesh("<<domain<<"): Z limits are 0 to 0" << endl; 
+  }
 
-    rgrid->SetXCoordinates(x);
-    rgrid->SetYCoordinates(y);
-    rgrid->SetZCoordinates(z);
+  rgrid->SetXCoordinates(x);
+  rgrid->SetYCoordinates(y);
+  rgrid->SetZCoordinates(z);
 
-    x->Delete();
-    y->Delete();
-    z->Delete();
+  x->Delete();
+  y->Delete();
+  z->Delete();
 
-    vtkIntArray *arr = vtkIntArray::New();
-    arr->SetNumberOfTuples(3);
-    for (ii=0; ii<3; ii++) {
-      arr->SetValue(ii, iBlockIJK[ii]*iBlockSize[ii]); // always true, no boundary considerations
-    }
-    arr->SetName("base_index");
-    rgrid->GetFieldData()->AddArray(arr);
-    arr->Delete();
+  vtkIntArray *arr = vtkIntArray::New();
+  arr->SetNumberOfTuples(3);
+  for (ii=0; ii<3; ii++) {
+    arr->SetValue(ii, iBlockIJK[ii]*iBlockSize[ii]); // always true, no boundary considerations
+  }
+  arr->SetName("base_index");
+  rgrid->GetFieldData()->AddArray(arr);
+  arr->Delete();
 
-    return rgrid;
+  return rgrid;
 }
 
 
@@ -1330,10 +1344,10 @@ avtMirandaFileFormat::GetRectilinearMesh(int domain)
 static void
 ByteSwap32(void *val)
 {
-    char *v = (char *)val;
-    char tmp;
-    tmp = v[0]; v[0] = v[3]; v[3] = tmp;
-    tmp = v[1]; v[1] = v[2]; v[2] = tmp;
+  char *v = (char *)val;
+  char tmp;
+  tmp = v[0]; v[0] = v[3]; v[3] = tmp;
+  tmp = v[1]; v[1] = v[2]; v[2] = tmp;
 }
 
 
@@ -1375,92 +1389,98 @@ avtMirandaFileFormat::GetVar(int timestate, int domain, const char *varname)
   debug4 << "GetVar(timestate="<<timestate<<", domain="<<domain<<", var="<<varname<<")"<< endl; 
   TIMERSTART(); 
 
-    int ii, iVar = -1, nPrevComp = 0;
+  int ii, iVar = -1, nPrevComp = 0;
 
-    for (ii = 0 ; ii < (int)aVarNames.size() ; ii++) 
+  for (ii = 0 ; ii < (int)aVarNames.size() ; ii++) 
     {
-        if (aVarNames[ii] == varname)
+      if (aVarNames[ii] == varname)
         {
-            iVar = ii;
-            break;
+          iVar = ii;
+          break;
         }
-        nPrevComp += aVarNumComps[ii];
+      nPrevComp += aVarNumComps[ii];
     }
-    // Search the materials if varname is not a regular variable
-    if (iVar == -1)
+  // Search the materials if varname is not a regular variable
+  if (iVar == -1)
     {
-        for (ii = 0 ; ii < (int)aMatNames.size() ; ii++) 
+      for (ii = 0 ; ii < (int)aMatNames.size() ; ii++) 
         {
-            if (aMatNames[ii] == varname)
+          if (aMatNames[ii] == varname)
             {
-                iVar = ii;
-                break;
+              iVar = ii;
+              break;
             }
-            nPrevComp += 1;
+          nPrevComp += 1;
         }
     }
-    if (iVar == -1)
+  if (iVar == -1)
     {
-        EXCEPTION1(InvalidVariableException, varname);
+      EXCEPTION1(InvalidVariableException, varname);
     }
 
-    vtkFloatArray *var = vtkFloatArray::New();
-    if (sFileVersion == "2.0") {
-      char filename[512];
-      if (SNPRINTF(filename, 512, fileTemplate.c_str(), aCycles[timestate], domain) < 0)
-        EXCEPTION1(InvalidFilesException, "");
+  vtkFloatArray *var = vtkFloatArray::New();
+  if (sFileVersion == "2.0") {
+    char filename[512];
+    if (SNPRINTF(filename, 512, fileTemplate.c_str(), aCycles[timestate], domain) < 0)
+      EXCEPTION1(InvalidFilesException, "");
       
-      FILE *fd = fopen(filename, "rb");
-      if (fd == NULL)
-        EXCEPTION1(InvalidFilesException, filename);
+    FILE *fd = fopen(filename, "rb");
+    if (fd == NULL)
+      EXCEPTION1(InvalidFilesException, filename);
       
-      int dims[3]; 
-      GetBlockDims(domain, dims); 
-      int nTuples = dims[0]*dims[1]*dims[2];
-      var->SetNumberOfTuples( nTuples );
+    int dims[3]; 
+    GetBlockDims(domain, dims); 
+    if (bZonal) {
+      for (int i=0; i<3; i++) {
+        if (dims[i] > 1) dims[i]--;
+      }
+    }
+    int nTuples = dims[0]*dims[1]*dims[2];
+    var->SetNumberOfTuples( nTuples );
       
-      float *buf = (float *)(var->GetVoidPointer(0));
-      ReadRawScalar(fd, nPrevComp, buf, filename, domain); 
-      debug5 << "(2.0): Read "<< nTuples << " elements from " << filename << " for domain " << domain << endl;
-      fclose(fd); 
-    } else {
-      int neighbors[8], realdim[3];
-      float *aRawBlocks[8] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
-      vector<vector<float> > floatvectors(8); 
+    float *buf = (float *)(var->GetVoidPointer(0));
+    ReadRawScalar(fd, nPrevComp, buf, filename, domain, nTuples); 
+    debug5 << "(2.0): Read "<< nTuples << " elements from " << filename << " for domain " << domain << endl;
+    debug5 << Vec2String("First five elements", buf, 5) << endl; 
+    fclose(fd); 
+  } else {
+    int neighbors[8], realdim[3];
+    float *aRawBlocks[8] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
+    vector<vector<float> > floatvectors(8); 
 
-      FindNeighborDomains(domain, neighbors, realdim);
-      debug5 << "GetVar: For domain " << domain<<", "<<Vec2String("neighbors",neighbors,8)<<endl; 
-      for (ii = 0; ii < 8; ii++)
-        {
-          if (neighbors[ii] == -1)
-            continue;
+    FindNeighborDomains(domain, neighbors, realdim);
+    debug5 << "GetVar: For domain " << domain<<", "<<Vec2String("neighbors",neighbors,8)<<endl; 
+    for (ii = 0; ii < 8; ii++)
+      {
+        if (neighbors[ii] == -1)
+          continue;
           
-          char filename[512];
-          if (SNPRINTF(filename, 512, fileTemplate.c_str(), aCycles[timestate], neighbors[ii]) < 0)
-            EXCEPTION1(InvalidFilesException, "");
-          FILE *fd = fopen(filename, "rb");
-          if (fd == NULL)
-            EXCEPTION1(InvalidFilesException, filename);
-          vector<vector<float> >::size_type numfloats =
-                       iBlockSize[0]*iBlockSize[1]*iBlockSize[2]; 
-          floatvectors[ii].resize(numfloats); 
-          aRawBlocks[ii] = &floatvectors[ii][0];
-          ReadRawScalar(fd, nPrevComp, aRawBlocks[ii], filename, domain);
-          debug5 << "Read "<<numfloats<< " elements from " << filename << " for neighbor " << ii << " of domain " << domain << endl;
+        char filename[512];
+        if (SNPRINTF(filename, 512, fileTemplate.c_str(), aCycles[timestate], neighbors[ii]) < 0)
+          EXCEPTION1(InvalidFilesException, "");
+        FILE *fd = fopen(filename, "rb");
+        if (fd == NULL)
+          EXCEPTION1(InvalidFilesException, filename);
+        vector<vector<float> >::size_type numfloats =
+          iBlockSize[0]*iBlockSize[1]*iBlockSize[2]; 
+        floatvectors[ii].resize(numfloats); 
+        aRawBlocks[ii] = &floatvectors[ii][0];
+        ReadRawScalar(fd, nPrevComp, aRawBlocks[ii], filename, domain, numfloats);
+        debug5 << "Read "<<numfloats<< " elements from " << filename << " for neighbor " << ii << " of domain " << domain << endl;
           
-          fclose(fd);
-        }
+        fclose(fd);
+      }
       
-      int nTuples = realdim[0]*realdim[1]*realdim[2];
-      debug5 << "GetVar: nTuples = " << nTuples << endl; 
-      var->SetNumberOfTuples( nTuples );
+    int nTuples = realdim[0]*realdim[1]*realdim[2];
+    debug5 << "GetVar: nTuples = " << nTuples << endl; 
+    var->SetNumberOfTuples( nTuples );
       
-      PackData( (float *)(var->GetVoidPointer(0)), aRawBlocks, realdim, 1, false );
+    PackData( (float *)(var->GetVoidPointer(0)), aRawBlocks, realdim, 1, false );
       
-    }
-    TIMERSTOP(str(format("GetVar(%1%, %2%, %3%)")%timestate%domain%varname));
+  }
+  TIMERSTOP(str(format("GetVar(%1%, %2%, %3%)")%timestate%domain%varname));
 
-    return var;
+  return var;
 }
 
 
@@ -1504,124 +1524,128 @@ avtMirandaFileFormat::GetVectorVar(int timestate, int domain, const char *varnam
   debug4 << "GetVectorVar("<<timestate<<", "<<domain<<", "<<varname<<")"<< endl; 
   TIMERSTART(); 
 
-   int ii, jj, iVar = -1, nPrevComp = 0;
+  int ii, jj, iVar = -1, nPrevComp = 0;
 
-    for (ii = 0 ; ii < (int)aVarNames.size() ; ii++) 
+  for (ii = 0 ; ii < (int)aVarNames.size() ; ii++) 
     {
-        if (aVarNames[ii] == varname)
+      if (aVarNames[ii] == varname)
         {
-            iVar = ii;
-            break;
+          iVar = ii;
+          break;
         }
-        nPrevComp += aVarNumComps[ii];
+      nPrevComp += aVarNumComps[ii];
     }
-    if (iVar == -1 || aVarNumComps[iVar] <= 1)
+  if (iVar == -1 || aVarNumComps[iVar] <= 1)
     {
-        EXCEPTION1(InvalidVariableException, varname);
+      EXCEPTION1(InvalidVariableException, varname);
     }
 
-    int nComps = aVarNumComps[iVar];
+  int nComps = aVarNumComps[iVar];
 
-    bool bFlattenVec = false;
-    if (aVarNumComps[iVar] == 3 && dim == 2 && 
-        aVarMinMax[iVar][flatDim*2] == 0.0f &&
-        aVarMinMax[iVar][flatDim*2+1] == 0.0f)
+  bool bFlattenVec = false;
+  if (aVarNumComps[iVar] == 3 && dim == 2 && 
+      aVarMinMax[iVar][flatDim*2] == 0.0f &&
+      aVarMinMax[iVar][flatDim*2+1] == 0.0f)
     {
-        bFlattenVec = true;
+      bFlattenVec = true;
     }
 
-    vtkFloatArray *var = vtkFloatArray::New();
-    var->SetNumberOfComponents( nComps );
+  vtkFloatArray *var = vtkFloatArray::New();
+  var->SetNumberOfComponents( nComps );
 
-    if (sFileVersion == "2.0") {
-      int dims[3]; 
-      GetBlockDims(domain, dims); 
-      int nTuples = dims[0]*dims[1]*dims[2];
-      var->SetNumberOfTuples( nTuples );
+  if (sFileVersion == "2.0") {
+    int dims[3]; 
+    GetBlockDims(domain, dims); 
+    if (bZonal) {
+      // zonal variables are always one less than mesh dimensions for version 2.0 data
+      for (int i=0; i<3; i++) {
+        if (dims[i] > 1) {
+          dims[i]--; 
+        }
+      }
+    }
+    int nTuples = dims[0]*dims[1]*dims[2];
+    var->SetNumberOfTuples( nTuples );
 
-      char filename[512];
-      if (SNPRINTF(filename, 512, fileTemplate.c_str(), aCycles[timestate], domain) < 0)
-        EXCEPTION1(InvalidFilesException, "");
+    char filename[512];
+    if (SNPRINTF(filename, 512, fileTemplate.c_str(), aCycles[timestate], domain) < 0)
+      EXCEPTION1(InvalidFilesException, "");
       
-      FILE *fd = fopen(filename, "rb");
-      if (fd == NULL)
-        EXCEPTION1(InvalidFilesException, filename);
-      vector<float> v(nTuples*nComps); // initialized to 0 by std
-      float *bufp = &v[0];
-      TRY
+    FILE *fd = fopen(filename, "rb");
+    if (fd == NULL)
+      EXCEPTION1(InvalidFilesException, filename);
+    vector<float> v(nTuples*nComps); // initialized to 0 by std
+    float *bufp = &v[0];
+    TRY
       {
-          int iCurrComp = 0;
-          for (jj = 0; jj < nComps; jj++)
+        int iCurrComp = 0;
+        for (jj = 0; jj < nComps; jj++)
           {
-              if (bFlattenVec && jj==flatDim)
-                  continue;
+            if (bFlattenVec && jj==flatDim)
+              continue;
           
-              ReadRawScalar(fd, nPrevComp+jj, bufp + iCurrComp*nTuples, filename, domain);
+            ReadRawScalar(fd, nPrevComp+jj, bufp + iCurrComp*nTuples, filename, domain, nTuples);
           
-              iCurrComp++;
+            iCurrComp++;
           }
       }
-      CATCHALL
+    CATCHALL
       {
-          fclose(fd);
-          RETHROW;
+        fclose(fd);
+        RETHROW;
       }
-      ENDTRY
+    ENDTRY
 
       if (bFlattenVec)
         memset(bufp + 2*nTuples, 0, nTuples*sizeof(float));
       
-      InterleaveData( (float *)(var->GetVoidPointer(0)), bufp, dims, nComps );      
+    InterleaveData( (float *)(var->GetVoidPointer(0)), bufp, dims, nComps );      
          
-      fclose(fd); 
-    } else {
-      int neighbors[8], realdim[3];
-      float *aRawBlocks[8] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
-      vector<vector<float> > floatvectors(8); 
+    fclose(fd); 
+  } else {
+    int neighbors[8], realdim[3];
+    float *aRawBlocks[8] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
+    vector<vector<float> > floatvectors(8); 
 
-      FindNeighborDomains(domain, neighbors, realdim);
+    FindNeighborDomains(domain, neighbors, realdim);
       
-      int nDstTuples = realdim[0]*realdim[1]*realdim[2];
-      int nSrcTuples = iBlockSize[0]*iBlockSize[1]*iBlockSize[2];
+    int nDstTuples = realdim[0]*realdim[1]*realdim[2];
+    int nSrcTuples = iBlockSize[0]*iBlockSize[1]*iBlockSize[2];
       
-      var->SetNumberOfTuples( nDstTuples );
+    var->SetNumberOfTuples( nDstTuples );
       
-      for (ii = 0; ii < 8; ii++)
-        {
-          if (neighbors[ii] == -1)
-            continue;
+    for (ii = 0; ii < 8; ii++)
+      {
+        if (neighbors[ii] == -1)
+          continue;
           
-          char filename[512];
-          if (SNPRINTF(filename, 512, fileTemplate.c_str(), aCycles[timestate], neighbors[ii]) < 0)
-            EXCEPTION1(InvalidFilesException, "");
+        char filename[512];
+        if (SNPRINTF(filename, 512, fileTemplate.c_str(), aCycles[timestate], neighbors[ii]) < 0)
+          EXCEPTION1(InvalidFilesException, "");
           
-          FILE *fd = fopen(filename, "rb");
-          if (fd == NULL)
-            EXCEPTION1(InvalidFilesException, filename);
-          floatvectors[ii].resize(nSrcTuples*nComps); 
-          aRawBlocks[ii] = &floatvectors[ii][0];
+        FILE *fd = fopen(filename, "rb");
+        if (fd == NULL)
+          EXCEPTION1(InvalidFilesException, filename);
+        floatvectors[ii].resize(nSrcTuples*nComps); 
+        aRawBlocks[ii] = &floatvectors[ii][0];
           
-          int iCurrComp = 0;
-          for (jj = 0; jj < nComps; jj++)
-            {
-              if (bFlattenVec && jj==flatDim)
-                continue;
+        int iCurrComp = 0;
+        for (jj = 0; jj < nComps; jj++)
+          {
+            if (bFlattenVec && jj==flatDim)
+              continue;
               
-              ReadRawScalar(fd, nPrevComp+jj, aRawBlocks[ii] + iCurrComp*nSrcTuples, filename, domain);
+            ReadRawScalar(fd, nPrevComp+jj, aRawBlocks[ii] + iCurrComp*nSrcTuples, filename, domain, nSrcTuples);
               
-              iCurrComp++;
-            }
-          /* redundant -- do not do this
-          if (bFlattenVec)
-            memset(aRawBlocks[ii] + 2*nSrcTuples, 0, nSrcTuples*sizeof(float));
-          */ 
-          fclose(fd);
-        }
-      PackData( (float *)(var->GetVoidPointer(0)), aRawBlocks, realdim, nComps, true );
+            iCurrComp++;
+          }
+        fclose(fd);
+      }
+    PackData( (float *)(var->GetVoidPointer(0)), aRawBlocks, realdim, nComps, true );
       
-    }
-    TIMERSTOP(str(format("GetVectorVar(%1%, %2%, %3%)")%timestate%domain%varname));
-    return var;    
+  }
+  TIMERSTOP(str(format("GetVectorVar(%1%, %2%, %3%)")%timestate%domain%varname));
+  return var;    
 }
 // ****************************************************************************
 //  Method: avtMirandaFileFormat::GetAuxiliaryData
@@ -1650,19 +1674,19 @@ avtMirandaFileFormat::GetAuxiliaryData(const char *var, int timestate,
                                        DestructorFunction &df)
 {
   debug4 << "GetAuxiliaryData("<<var<<", timestate="<<timestate<<", domain="<<domain<<", type="<<type<<")"<< endl; 
-    void *rv = NULL;
-    int   nbricks = iNumBlocks[0] * iNumBlocks[1] * iNumBlocks[2];
-    int   ii, jj, kk, mm;
-    TIMERSTART(); 
- 
-    if (strcmp(type, AUXILIARY_DATA_SPATIAL_EXTENTS) == 0 && !bCurvilinear)
+  void *rv = NULL;
+  int   nbricks = iNumBlocks[0] * iNumBlocks[1] * iNumBlocks[2];
+  int   ii, jj, kk, mm;
+  TIMERSTART(); 
+  
+  if (strcmp(type, AUXILIARY_DATA_SPATIAL_EXTENTS) == 0 && !bCurvilinear)
     {
-        if (strcmp(var, "mesh") != 0)
+      if (strcmp(var, "mesh") != 0)
         {
-            EXCEPTION1(InvalidVariableException, var);
+          EXCEPTION1(InvalidVariableException, var);
         }
-        avtIntervalTree *itree = new avtIntervalTree(nbricks, 3);
-        for (ii = 0 ; ii < nbricks ; ii++)
+      avtIntervalTree *itree = new avtIntervalTree(nbricks, 3);
+      for (ii = 0 ; ii < nbricks ; ii++)
         {
           int iBlockX, iBlockY, iBlockZ;
           DomainToIJK( ii, iBlockX, iBlockY, iBlockZ );
@@ -1689,191 +1713,207 @@ avtMirandaFileFormat::GetAuxiliaryData(const char *var, int timestate,
           if (iBlockZ != iNumBlocks[2]-1) {
             //bounds[5] = bounds[4] + fStride[4]*iInteriorSize[4];
             bounds[5] = bounds[4] + fStride[1]*iInteriorSize[1]; ///TODO: FIXME fStride & iInteriorSize are outside bounds size is only 3 I am setting it to 1 which is probably incorrect FIXME
-          } else {
+              } else {
             //bounds[5] = bounds[4] + fStride[4]*iBoundarySize[4];
             bounds[5] = bounds[4] + fStride[1]*iBoundarySize[1]; ///TODO: FIXME fStride & iBoundarySize are outside bounds size is only 3 I am setting to 1 which is probably incorrect FIXME
-          }        
+              }        
           bounds[5] -= fStride[2]; 
           debug5 << "For domain "<<ii<<", "<<Vec2String("bounds", bounds, 6)<< endl;
           itree->AddElement(ii, bounds);
         }
-        itree->Calculate(true);
-
-        rv = (void *) itree;
-        df = avtIntervalTree::Destruct;
+      itree->Calculate(true);
+      
+      rv = (void *) itree;
+      df = avtIntervalTree::Destruct;
     }
-    else if (strcmp(type, AUXILIARY_DATA_MATERIAL) == 0)
+  else if (strcmp(type, AUXILIARY_DATA_MATERIAL) == 0)
     {
-        int     nMats    = aMatNames.size();
-        
-        int    *matNums  = new int[nMats];
-        char  **matNames = new char*[nMats];  //ewww.  
-        float **volFracs = new float*[nMats];
-        char    domainName[32];
+      int     nMats    = aMatNames.size();
+      
+      int    *matNums  = new int[nMats];
+      char  **matNames = new char*[nMats];  //ewww.  
+      float **volFracs = new float*[nMats];
+      char    domainName[32];
+      
+      sprintf(domainName, "domain %d", domain);
+      
+      int iFirstComp = 0;
+      for (ii = 0 ; ii < (int)aVarNumComps.size() ; ii++)
+        iFirstComp += aVarNumComps[ii];
+      
+      
+      int nDstTuples, nSrcTuples, nodaldims[3], zonaldims[3];
+      int neighbors[8];
+      float *aRawBlocks[8] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
+      vector<vector<float> > floatvectors(8); 
+      
+      if (sFileVersion == "2.0") {
+        GetBlockDims(domain, nodaldims); 
+      } else {
+        // file format < 2.0 ; data is nodal    
+        FindNeighborDomains(domain, neighbors, nodaldims);
+      }
+      for (int i=0; i<3; i++) {
+        zonaldims[i] = nodaldims[i]; 
+        if (zonaldims[i] > 1) {
+          zonaldims[i]--; 
+        }
+      }
 
-        sprintf(domainName, "domain %d", domain);
         
-        int iFirstComp = 0;
-        for (ii = 0 ; ii < (int)aVarNumComps.size() ; ii++)
-            iFirstComp += aVarNumComps[ii];
-        
-        
-        int nDstTuples, nSrcTuples, realdim[3];
-        int neighbors[8];
-        float *aRawBlocks[8] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
-        vector<vector<float> > floatvectors(8); 
-
-        if (sFileVersion == "2.0") {
-          GetBlockDims(domain, realdim); 
-          nSrcTuples = nDstTuples = realdim[0]*realdim[1]*realdim[2];
-        } else {
-          // file format < 2.0       
-          FindNeighborDomains(domain, neighbors, realdim);
+      if (sFileVersion == "2.0") {
+        if (bZonal) {
+          nDstTuples = nSrcTuples = zonaldims[0]*zonaldims[1]*zonaldims[2];
+        }            
+        else {
+          nDstTuples = nSrcTuples = nodaldims[0]*nodaldims[1]*nodaldims[2];
+        }
+      } else {
+        // file format < 2.0 ; data is nodal    
           
-          nSrcTuples = iBlockSize[0]*iBlockSize[1]*iBlockSize[2];
-          nDstTuples = realdim[0]*realdim[1]*realdim[2];
+        nSrcTuples = iBlockSize[0]*iBlockSize[1]*iBlockSize[2];
+        nDstTuples = nodaldims[0]*nodaldims[1]*nodaldims[2];
           
-        }
-        vector<float> dstv(nDstTuples * nMats); 
-        float *dst = &dstv[0];  
+      }
+
+      vector<float> dstv(nDstTuples * nMats); 
+      float *dst = &dstv[0];  
 
-        if (sFileVersion == "2.0") {
+      if (sFileVersion == "2.0") {
           
-          char filename[512];
-          if (SNPRINTF(filename, 512, fileTemplate.c_str(), aCycles[timestate], domain) < 0)
-            EXCEPTION1(InvalidFilesException, "");
+        char filename[512];
+        if (SNPRINTF(filename, 512, fileTemplate.c_str(), aCycles[timestate], domain) < 0)
+          EXCEPTION1(InvalidFilesException, "");
           
-          FILE *fd = fopen(filename, "rb");
-          if (fd == NULL)
-            EXCEPTION1(InvalidFilesException, filename);
+        FILE *fd = fopen(filename, "rb");
+        if (fd == NULL)
+          EXCEPTION1(InvalidFilesException, filename);
           
-          for (jj = 0; jj < nMats; jj++)
-            {
-              ReadRawScalar(fd, iFirstComp+jj, dst + jj*nDstTuples, filename, domain);
-            }
-          fclose(fd);
+        for (jj = 0; jj < nMats; jj++)
+          {
+            ReadRawScalar(fd, iFirstComp+jj, dst + jj*nDstTuples, filename, domain, nDstTuples);
+            debug5 << "(2.0): Read "<< nDstTuples << " elements from " << filename << " for domain " << domain << endl;
+            debug5 << Vec2String("First five elements", dst + jj*nDstTuples, 5) << endl; 
+          }
+        fclose(fd);
 
-          // CHECK THIS:  for material data, I don't think we need PackData.  Just read into the actual array. 
+        // CHECK THIS:  for material data, I don't think we need PackData.  Just read into the actual array. 
 
-        }
-        else {
-          // file format < 2.0       
-          for (ii = 0; ii < 8; ii++)
-            {
-              if (neighbors[ii] == -1)
-                continue;
+      }
+      else {
+        // file format < 2.0       
+        for (ii = 0; ii < 8; ii++)
+          {
+            if (neighbors[ii] == -1)
+              continue;
               
-              char filename[512];
-              if (SNPRINTF(filename, 512, fileTemplate.c_str(), aCycles[timestate], neighbors[ii]) < 0)
-                EXCEPTION1(InvalidFilesException, "");
+            char filename[512];
+            if (SNPRINTF(filename, 512, fileTemplate.c_str(), aCycles[timestate], neighbors[ii]) < 0)
+              EXCEPTION1(InvalidFilesException, "");
               
-              FILE *fd = fopen(filename, "rb");
-              if (fd == NULL)
-                EXCEPTION1(InvalidFilesException, filename);
+            FILE *fd = fopen(filename, "rb");
+            if (fd == NULL)
+              EXCEPTION1(InvalidFilesException, filename);
               
-              floatvectors[ii].resize(nSrcTuples*nMats); 
-              aRawBlocks[ii] = &floatvectors[ii][0];
+            floatvectors[ii].resize(nSrcTuples*nMats); 
+            aRawBlocks[ii] = &floatvectors[ii][0];
               
-              for (jj = 0; jj < nMats; jj++)
-                {
-                  ReadRawScalar(fd, iFirstComp+jj, aRawBlocks[ii] + jj*nSrcTuples, filename, domain);
-                }
-              fclose(fd);
-            }
-          PackData(dst, aRawBlocks, realdim, nMats, false);
-        }
+            for (jj = 0; jj < nMats; jj++)
+              {
+                ReadRawScalar(fd, iFirstComp+jj, aRawBlocks[ii] + jj*nSrcTuples, filename, domain, nSrcTuples);
+              }
+            fclose(fd);
+          }
+        PackData(dst, aRawBlocks, nodaldims, nMats, false);
+      }
          
-        for (jj = 0; jj < nMats; jj++)
-          {
-            matNums[jj] = jj;
-            matNames[jj] = strdup( aMatNames[jj].c_str() );
+      for (jj = 0; jj < nMats; jj++)
+        {
+          matNums[jj] = jj;
+          matNames[jj] = strdup( aMatNames[jj].c_str() );
             
-            volFracs[jj] = dst + jj*nDstTuples;
-          }
+          volFracs[jj] = dst + jj*nDstTuples;
+        }
             
 
-        /* For debugging, I'm going to clean up the data so that it
-           can be processed.  I have zones with material fractions
-           that range from -epsilon to 1+epsilon.  DJB */
+      /* For debugging, I'm going to clean up the data so that it
+         can be processed.  I have zones with material fractions
+         that range from -epsilon to 1+epsilon.  DJB */
         
-        for (ii = 0 ; ii < nDstTuples ; ii++)
-          {
-            double sum = 0.00f;
-            for (jj = 0 ; jj < nMats ; jj++)
-              {
-                if (volFracs[jj][ii] > 1.0 - 1e-5)
-                  volFracs[jj][ii] = 1.0f;
+      for (ii = 0 ; ii < nDstTuples ; ii++)
+        {
+          double sum = 0.00f;
+          for (jj = 0 ; jj < nMats ; jj++)
+            {
+              if (volFracs[jj][ii] > 1.0 - 1e-5)
+                volFracs[jj][ii] = 1.0f;
                 
-                if (volFracs[jj][ii] < 1e-5)   
-                  volFracs[jj][ii] = 0.0f;
+              if (volFracs[jj][ii] < 1e-5)   
+                volFracs[jj][ii] = 0.0f;
                 
-                sum += volFracs[jj][ii];
-              }
-            for (jj = 0 ; jj < nMats ; jj++)
-              {
-                volFracs[jj][ii] /= sum;
-              }
-          }
-        
-        if (bCurvilinear)
-          {
-            //In this case, we have node-centered material fractions 
-            //that need to be averaged onto the zones.
-            
-            int numZIterations = (dim == 3) ? realdim[2]-1 : 1;
-            
-            for (mm = 0; mm < nMats; mm++)
-              {
-                int tt = 0;
-                float *f = volFracs[mm];
-                for (kk = 0; kk < numZIterations; kk++)
-                  for (jj = 0; jj < realdim[1]-1; jj++)
-                    for (ii = 0; ii < realdim[0]-1; ii++, tt++)
-                      {
-                        if (dim == 3)
-                          f[tt] = 
-                            (f[ii   + jj*realdim[0]     + kk*realdim[0]*realdim[1]] +
-                             f[ii+1 + jj*realdim[0]     + kk*realdim[0]*realdim[1]] +
-                             f[ii   + (jj+1)*realdim[0] + kk*realdim[0]*realdim[1]] +
-                             f[ii+1 + (jj+1)*realdim[0] + kk*realdim[0]*realdim[1]] +
-                             f[ii   + jj*realdim[0]     + (kk+1)*realdim[0]*realdim[1]] +
-                             f[ii+1 + jj*realdim[0]     + (kk+1)*realdim[0]*realdim[1]] +
-                             f[ii   + (jj+1)*realdim[0] + (kk+1)*realdim[0]*realdim[1]] +
-                             f[ii+1 + (jj+1)*realdim[0] + (kk+1)*realdim[0]*realdim[1]]) / 8.0;
-                        else //dim == 2
-                          f[tt] = 
-                            (f[ii   + jj*realdim[0]     + kk*realdim[0]*realdim[1]] +
-                             f[ii+1 + jj*realdim[0]     + kk*realdim[0]*realdim[1]] +
-                             f[ii   + (jj+1)*realdim[0] + kk*realdim[0]*realdim[1]] +
-                             f[ii+1 + (jj+1)*realdim[0] + kk*realdim[0]*realdim[1]]) / 4.0;
-                      }
-              }
-            realdim[0]--;
-            realdim[1]--;
-            if (dim == 3)
-              realdim[2]--;
-          }
+              sum += volFracs[jj][ii];
+            }
+          for (jj = 0 ; jj < nMats ; jj++)
+            {
+              volFracs[jj][ii] /= sum;
+            }
+        }
         
-        rv = (void *)new avtMaterial( nMats,
-                                      matNums,
-                                      matNames,
-                                      dim, 
-                                      realdim,
-                                      0 /*major_order*/,
-                                      volFracs,
-                                      domainName);
-        df = avtMaterial::Destruct;
+      if (bCurvilinear && ! bZonal) {
+        //In this case, we have node-centered material fractions 
+        //that need to be averaged onto the zones.
+        int numZIterations = (dim == 3) ? nodaldims[2]-1 : 1;
         
-        for (ii = 0 ; ii < nMats ; ii++)
-          {
-            free(matNames[ii]);
-          }
-        delete[] matNums;
-        delete[] matNames;
-        delete[] volFracs;
+        for (mm = 0; mm < nMats; mm++) {
+          int tt = 0;
+          float *f = volFracs[mm];
+          for (kk = 0; kk < numZIterations; kk++) {
+            for (jj = 0; jj < nodaldims[1]-1; jj++) {
+              for (ii = 0; ii < nodaldims[0]-1; ii++, tt++) {
+                if (dim == 3) {
+                  f[tt] = 
+                    (f[ii   + jj*nodaldims[0]     + kk*nodaldims[0]*nodaldims[1]] +
+                     f[ii+1 + jj*nodaldims[0]     + kk*nodaldims[0]*nodaldims[1]] +
+                     f[ii   + (jj+1)*nodaldims[0] + kk*nodaldims[0]*nodaldims[1]] +
+                     f[ii+1 + (jj+1)*nodaldims[0] + kk*nodaldims[0]*nodaldims[1]] +
+                     f[ii   + jj*nodaldims[0]     + (kk+1)*nodaldims[0]*nodaldims[1]] +
+                     f[ii+1 + jj*nodaldims[0]     + (kk+1)*nodaldims[0]*nodaldims[1]] +
+                     f[ii   + (jj+1)*nodaldims[0] + (kk+1)*nodaldims[0]*nodaldims[1]] +
+                     f[ii+1 + (jj+1)*nodaldims[0] + (kk+1)*nodaldims[0]*nodaldims[1]]) / 8.0;
+                }
+                else {
+                  //dim == 2
+                  f[tt] = 
+                    (f[ii   + jj*nodaldims[0]     + kk*nodaldims[0]*nodaldims[1]] +
+                     f[ii+1 + jj*nodaldims[0]     + kk*nodaldims[0]*nodaldims[1]] +
+                     f[ii   + (jj+1)*nodaldims[0] + kk*nodaldims[0]*nodaldims[1]] +
+                     f[ii+1 + (jj+1)*nodaldims[0] + kk*nodaldims[0]*nodaldims[1]]) / 4.0;
+                }
+              } /* end loop over ii */   
+            } /* end loop over jj */   
+          } /* end loop over numZIterations */   
+        } /* end loop over nMats */                            
+      } /* end of zonal averaging from nodes for nodal curvilinear case */ 
+      rv = (void *)new avtMaterial( nMats,
+                                    matNums,
+                                    matNames,
+                                    dim, 
+                                    zonaldims,
+                                    0 /*major_order*/,
+                                    volFracs,
+                                    domainName);
+      df = avtMaterial::Destruct;
+      
+      for (ii = 0 ; ii < nMats ; ii++)
+        {
+          free(matNames[ii]);
+        }
+      delete[] matNums;
+      delete[] matNames;
+      delete[] volFracs;
     }
-    TIMERSTOP(str(format("GetAuxiliaryData(%1%, %2%, %3%, %4%)")%var%timestate%domain%type));
-    return rv;
+  TIMERSTOP(str(format("GetAuxiliaryData(%1%, %2%, %3%, %4%)")%var%timestate%domain%type));
+  return rv;
 }
 
 
@@ -1900,59 +1940,55 @@ void
 avtMirandaFileFormat::FindNeighborDomains(int domain, int *neighbors, 
                                           int *realdim)
 {
-    int ii, jj, kk;
-    for (ii = 0; ii < 3; ii++)
-        realdim[ii] = iBlockSize[ii];
+  int ii, jj, kk;
+  for (ii = 0; ii < 3; ii++)
+    realdim[ii] = iBlockSize[ii];
 
 
-    if (bZonal)
-    {
-        // don't need to read any neighbors for zonal case 
-        neighbors[0] = domain;
-        for (ii = 1; ii < 8; ii++)
-            neighbors[ii] = -1;
-    }
-    else
-    {
-        int di, dj, dk;
-        int incr[3];
-        DomainToIJK(domain, di, dj, dk);
-
-        if (di < iNumBlocks[0]-1)
-            realdim[0]++;
-
-        if (dj < iNumBlocks[1]-1)
-            realdim[1]++;
-
-        if (dk < iNumBlocks[2]-1)
-            realdim[2]++;
-
-        //fileorder flag must be set for curvilinear meshes
-        if (iFileOrder[0] == -1)
-            EXCEPTION1(InvalidFilesException, "");
-
-        incr[iFileOrder[0]] = 1;
-        incr[iFileOrder[1]] = iNumBlocks[iFileOrder[0]];
-        incr[iFileOrder[2]] = iNumBlocks[iFileOrder[0]] * iNumBlocks[iFileOrder[1]];
-        int *curr = neighbors;
-        for (kk = 0; kk < 2; kk++)
-        {
-            for (jj = 0; jj < 2; jj++)
-            {
-                for (ii = 0; ii < 2; ii++)
-                {
-                    if ( di + ii >= iNumBlocks[0] ||
-                         dj + jj >= iNumBlocks[1] ||
-                         dk + kk >= iNumBlocks[2] )
-                        *curr = -1;
-                    else
-                        *curr = domain + ii*incr[0] + jj*incr[1] + kk*incr[2];
-
-                    curr++;
-                }
-            }
+  if (bZonal) {
+    // don't need to read any neighbors for zonal case 
+    neighbors[0] = domain;
+    for (ii = 1; ii < 8; ii++)
+      neighbors[ii] = -1;
+  }
+  else {
+    int di, dj, dk;
+    int incr[3];
+    DomainToIJK(domain, di, dj, dk);
+    
+    if (di < iNumBlocks[0]-1)
+      realdim[0]++;
+    
+    if (dj < iNumBlocks[1]-1)
+      realdim[1]++;
+    
+    if (dk < iNumBlocks[2]-1)
+      realdim[2]++;
+
+    //fileorder flag must be set for curvilinear meshes
+    if (iFileOrder[0] == -1)
+      EXCEPTION1(InvalidFilesException, "");
+
+    incr[iFileOrder[0]] = 1;
+    incr[iFileOrder[1]] = iNumBlocks[iFileOrder[0]];
+    incr[iFileOrder[2]] = iNumBlocks[iFileOrder[0]] * iNumBlocks[iFileOrder[1]];
+    int *curr = neighbors;
+    for (kk = 0; kk < 2; kk++) {
+      for (jj = 0; jj < 2; jj++)  {
+        for (ii = 0; ii < 2; ii++) {
+          if ( di + ii >= iNumBlocks[0] ||
+               dj + jj >= iNumBlocks[1] ||
+               dk + kk >= iNumBlocks[2] ) {
+            *curr = -1;
+          }
+          else {
+            *curr = domain + ii*incr[0] + jj*incr[1] + kk*incr[2];
+          }
+          curr++;
         }
+      }
     }
+  }
 }
 
 // ****************************************************************************
@@ -2029,54 +2065,49 @@ avtMirandaFileFormat::PackData(float *__restrict dst, const  float *  const * __
   debug4 << "PackData(<"<<dstDim[0]<<", "<<dstDim[1]<<", "<<dstDim[2]<<">, "<<nComp<<")" << endl;
   TIMERSTART(); 
   int bb, ii, jj, kk, cc;
-    int srcDim[8][3] = {{iBlockSize[0], iBlockSize[1], iBlockSize[2]},
-                        {1,             iBlockSize[1], iBlockSize[2]},
-                        {iBlockSize[0], 1,             iBlockSize[2]},
-                        {1,             1,             iBlockSize[2]},
-                        {iBlockSize[0], iBlockSize[1], 1},
-                        {1,             iBlockSize[1], 1},
-                        {iBlockSize[0], 1,             1},
-                        {1,             1,             1}};
-
-    int dstOffset[8][3] = {{0,             0,             0},
-                           {iBlockSize[0], 0,             0},
-                           {0,             iBlockSize[1], 0},
-                           {iBlockSize[0], iBlockSize[1], 0},
-                           {0,             0,             iBlockSize[2]},
-                           {iBlockSize[0], 0,             iBlockSize[2]},
-                           {0,             iBlockSize[1], iBlockSize[2]},
-                           {iBlockSize[0], iBlockSize[1], iBlockSize[2]} };
-
-    for (bb = 0; bb < 8; bb++)
-    {
-        if (src[bb] == NULL)
-            continue;
-
-        for (kk = 0; kk < srcDim[bb][2]; kk++)
-        {
-            for (jj = 0; jj < srcDim[bb][1]; jj++)
-            {
-                for (ii = 0; ii < srcDim[bb][0]; ii++)
-                {
-                    int iCurrDstTuple = ii + dstOffset[bb][0] + 
-                                        (jj + dstOffset[bb][1]) * dstDim[0] +
-                                        (kk + dstOffset[bb][2]) * dstDim[0] * dstDim[1];
-
-                    for (cc = 0; cc < nComp; cc++)
-                    {
-                        float s = src[bb][ii + 
-                                          jj*iBlockSize[0] + 
-                                          kk*iBlockSize[0]*iBlockSize[1] + 
-                                          cc*iBlockSize[0]*iBlockSize[1]*iBlockSize[2]];
-                        if (interleave)
-                            dst[iCurrDstTuple*nComp + cc] = s;
-                        else
-                            dst[iCurrDstTuple + cc*dstDim[0]*dstDim[1]*dstDim[2]] = s;
-                    }
-                }
-            }
+  int srcDim[8][3] = {{iBlockSize[0], iBlockSize[1], iBlockSize[2]},
+                      {1,             iBlockSize[1], iBlockSize[2]},
+                      {iBlockSize[0], 1,             iBlockSize[2]},
+                      {1,             1,             iBlockSize[2]},
+                      {iBlockSize[0], iBlockSize[1], 1},
+                      {1,             iBlockSize[1], 1},
+                      {iBlockSize[0], 1,             1},
+                      {1,             1,             1}};
+
+  int dstOffset[8][3] = {{0,             0,             0},
+                         {iBlockSize[0], 0,             0},
+                         {0,             iBlockSize[1], 0},
+                         {iBlockSize[0], iBlockSize[1], 0},
+                         {0,             0,             iBlockSize[2]},
+                         {iBlockSize[0], 0,             iBlockSize[2]},
+                         {0,             iBlockSize[1], iBlockSize[2]},
+                         {iBlockSize[0], iBlockSize[1], iBlockSize[2]} };
+
+  for (bb = 0; bb < 8; bb++) {
+    if (src[bb] == NULL)
+      continue;
+    
+    for (kk = 0; kk < srcDim[bb][2]; kk++) {
+      for (jj = 0; jj < srcDim[bb][1]; jj++) {
+        for (ii = 0; ii < srcDim[bb][0]; ii++) {
+          int iCurrDstTuple = ii + dstOffset[bb][0] + 
+            (jj + dstOffset[bb][1]) * dstDim[0] +
+            (kk + dstOffset[bb][2]) * dstDim[0] * dstDim[1];
+          
+          for (cc = 0; cc < nComp; cc++)  {
+            float s = src[bb][ii + 
+                              jj*iBlockSize[0] + 
+                              kk*iBlockSize[0]*iBlockSize[1] + 
+                              cc*iBlockSize[0]*iBlockSize[1]*iBlockSize[2]];
+            if (interleave)
+              dst[iCurrDstTuple*nComp + cc] = s;
+            else
+              dst[iCurrDstTuple + cc*dstDim[0]*dstDim[1]*dstDim[2]] = s;
+          }
         }
+      }
     }
+  }
   TIMERSTOP(str(format("PackData(<%1%, %2%, %3%>, %4%)")%dstDim[0]%dstDim[1]%dstDim[2]%nComp));
 }
 
@@ -2098,43 +2129,36 @@ avtMirandaFileFormat::PackData(float *__restrict dst, const  float *  const * __
 //
 // ****************************************************************************
 void
-avtMirandaFileFormat::ReadRawScalar(FILE *fd, int iComp, float *out, const char *filename, int domain)
+avtMirandaFileFormat::ReadRawScalar(FILE *fd, int iComp, float *out, const char *filename, int domain, int nPoints)
 {
-  debug4 << "ReadRawScalar("<<iComp<<", "<<filename<<", "<<domain<<")"<< endl; 
+  debug4 << "ReadRawScalar("<<iComp<<", "<<filename<<", "<<domain<<", "<<nPoints<<")"<< endl; 
   TIMERSTART(); 
-  int nPoints = iBlockSize[0]*iBlockSize[1]*iBlockSize[2];
-    if (sFileVersion == "2.0") {
-      int dims[3]; 
-      GetBlockDims(domain, dims); 
-      nPoints = dims[0]*dims[1]*dims[2]; 
-    }
-      
-    int header, nItemsRead, ii;
-    int err;
-
-    err = fseek(fd, iComp*(nPoints*sizeof(float) + 2*sizeof(int)), SEEK_SET);
-    if (err)
-        EXCEPTION1(InvalidFilesException, filename);
-
-    // Fortran records have a 32 bit int that tells their length.  
-    // We read that here to test endianism. 
-    size_t res = fread(&header, sizeof(int), 1, fd); (void) res;
-    nItemsRead = (int)fread(out, sizeof(float), nPoints, fd);
-    if (nItemsRead != nPoints)
-        EXCEPTION1(InvalidFilesException, filename);
-
+  
+  int header, nItemsRead, ii;
+  int err;
+  
+  err = fseek(fd, iComp*(nPoints*sizeof(float) + 2*sizeof(int)), SEEK_SET);
+  if (err)
+    EXCEPTION1(InvalidFilesException, filename);
+  
+  // Fortran records have a 32 bit int that tells their length.  
+  // We read that here to test endianism. 
+  size_t res = fread(&header, sizeof(int), 1, fd); (void) res;
+  nItemsRead = (int)fread(out, sizeof(float), nPoints, fd);
+  if (nItemsRead != nPoints)
+    EXCEPTION1(InvalidFilesException, filename);
+  
+  if ((size_t)header != nPoints*sizeof(float)) {
+    //If this is true, we need to swap endian
+    ByteSwap32(&header);
     if ((size_t)header != nPoints*sizeof(float))
-    {
-        //If this is true, we need to swap endian
-        ByteSwap32(&header);
-        if ((size_t)header != nPoints*sizeof(float))
-            EXCEPTION1(InvalidFilesException, filename);
-
-        float *f = out;
-        for (ii = 0 ; ii < (size_t)nPoints ; ii++, f++) {
-            ByteSwap32(f);
-        }
+      EXCEPTION1(InvalidFilesException, filename);
+    
+    float *f = out;
+    for (ii = 0 ; ii < (size_t)nPoints ; ii++, f++) {
+      ByteSwap32(f);
     }
-    TIMERSTOP(str(format("ReadRawScalar(%1%, %2%, %3%)")%iComp% filename % domain));
+  }
+  TIMERSTOP(str(format("ReadRawScalar(%1%, %2%, %3%)")%iComp% filename % domain));
 }
 
diff --git a/src/databases/Miranda/avtMirandaFileFormat.h b/src/databases/Miranda/avtMirandaFileFormat.h
index 06a385e..1f83c47 100644
--- a/src/databases/Miranda/avtMirandaFileFormat.h
+++ b/src/databases/Miranda/avtMirandaFileFormat.h
@@ -148,7 +148,7 @@ class avtMirandaFileFormat : public avtMTMDFileFormat
      void                   InterleaveData(float *__restrict dst, float *__restrict src, int *dstDim, int nComp);
     virtual void           PackData(float *__restrict dst, const  float * const  *__restrict src, 
                                     const int *dstDim, int nComp, bool interleave);
-    virtual void           ReadRawScalar(FILE *fd, int iComp, float *out, const char *filename, int domain);
+    virtual void           ReadRawScalar(FILE *fd, int iComp, float *out, const char *filename, int domain, int numelems);
     virtual void           FindNeighborDomains(int domain, int *neighbors, int *realdim);
 
     static  void           SkipToEndOfLine( ifstream &f, bool bCheckForBadTokens = true );
diff --git a/src/databases/NETCDF/avtBasicNETCDFReader.C b/src/databases/NETCDF/avtBasicNETCDFReader.C
index 9e80aae..a05728b 100644
--- a/src/databases/NETCDF/avtBasicNETCDFReader.C
+++ b/src/databases/NETCDF/avtBasicNETCDFReader.C
@@ -735,6 +735,9 @@ avtBasicNETCDFReader::ReturnDimStartsAndCounts(int timeState, const intVector &d
 //   when it's a different length than the variable (y-axis values). In
 //   that case id values are used instead.
 //
+//   Kathleen Biagas, Thu Jun 4 18:18:42 MST 2015
+//   Create base_index FieldData array.
+//
 // ****************************************************************************
 
 vtkDataSet *
@@ -952,6 +955,15 @@ avtBasicNETCDFReader::GetMesh(int timeState, const char *var)
             rgrid->SetZCoordinates(coords[2]);
             coords[2]->Delete();
 
+            vtkIntArray *arr = vtkIntArray::New();
+            arr->SetNumberOfTuples(3);
+            arr->SetValue(0, dimStarts[0]);
+            arr->SetValue(1, dimStarts[1]);
+            arr->SetValue(2, (dimStarts.size() > 2 ? dimStarts[2] : 0));
+            arr->SetName("base_index");
+            rgrid->GetFieldData()->AddArray(arr);
+            arr->Delete();
+
             retval = rgrid;
         }
     }
diff --git a/src/databases/Tecplot/avtTecplotFileFormat.C b/src/databases/Tecplot/avtTecplotFileFormat.C
index a125a82..63af12e 100644
--- a/src/databases/Tecplot/avtTecplotFileFormat.C
+++ b/src/databases/Tecplot/avtTecplotFileFormat.C
@@ -621,6 +621,8 @@ avtTecplotFileFormat::ParseArraysBlock(int numNodes, int numElements)
 //    Added a couple "FE" variants that were missing.
 //    Added support for comments.
 //
+//    Mark C. Miller, Thu Jun  4 11:47:02 PDT 2015
+//    Added support for FELINESEG elem type
 // ****************************************************************************
 vtkUnstructuredGrid *
 avtTecplotFileFormat::ParseElements(int numElements, const string &elemType)
@@ -654,6 +656,12 @@ avtTecplotFileFormat::ParseElements(int numElements, const string &elemType)
         idtype = VTK_TETRA;
         topologicalDimension = MAX(topologicalDimension, 3);
     }
+    else if (elemType == "LINESEG" || elemType == "FELINESEG")
+    {
+        nelempts = 2;
+        idtype = VTK_LINE;
+        topologicalDimension = MAX(topologicalDimension, 1);
+    }
     else if (elemType == "POINT" || elemType == "FEPOINT" || elemType == "")
     {
         nelempts = 1;
@@ -750,6 +758,8 @@ avtTecplotFileFormat::ParseElements(int numElements, const string &elemType)
 //    Added support for copying connectivity from earlier ZONE instead
 //    of having explicit arrays on disk.
 //
+//    Mark C. Miller, Thu Jun  4 11:47:43 PDT 2015
+//    Adjusted logic for detecting curves defined on FELINESEG elem types
 // ****************************************************************************
 void
 avtTecplotFileFormat::ParseFEBLOCK(int numNodes, int numElements,
@@ -775,7 +785,7 @@ avtTecplotFileFormat::ParseFEBLOCK(int numNodes, int numElements,
     points->Delete();
 
     if ((topologicalDimension == 2 || topologicalDimension == 3) ||
-        (topologicalDimension == 0 && spatialDimension > 1))
+        (topologicalDimension <= 1 && spatialDimension > 1))
     {
         meshes.push_back(ugrid);
     }
@@ -815,6 +825,8 @@ avtTecplotFileFormat::ParseFEBLOCK(int numNodes, int numElements,
 //    Added support for copying connectivity from earlier ZONE instead
 //    of having explicit arrays on disk.
 //
+//    Mark C. Miller, Thu Jun  4 11:47:43 PDT 2015
+//    Adjusted logic for detecting curves defined on FELINESEG elem types
 // ****************************************************************************
 void
 avtTecplotFileFormat::ParseFEPOINT(int numNodes, int numElements,
@@ -840,7 +852,7 @@ avtTecplotFileFormat::ParseFEPOINT(int numNodes, int numElements,
     points->Delete();
 
     if ((topologicalDimension == 2 || topologicalDimension == 3) ||
-        (topologicalDimension == 0 && spatialDimension > 1))
+        (topologicalDimension <= 1 && spatialDimension > 1))
     {
         meshes.push_back(ugrid);
     }
@@ -877,6 +889,8 @@ avtTecplotFileFormat::ParseFEPOINT(int numNodes, int numElements,
 //    Added support for cell-centered vars (through VARLOCATION).
 //    Renamed ParseNodes* to ParseArrays* to reflect this capability.
 //
+//    Mark C. Miller, Thu Jun  4 11:47:43 PDT 2015
+//    Adjusted logic for detecting curves defined on FELINESEG elem types
 // ****************************************************************************
 void
 avtTecplotFileFormat::ParseBLOCK(int numI, int numJ, int numK)
@@ -904,7 +918,7 @@ avtTecplotFileFormat::ParseBLOCK(int numI, int numJ, int numK)
     sgrid->SetDimensions(dims);
 
     if ((topologicalDimension == 2 || topologicalDimension == 3) ||
-        (topologicalDimension == 0 && spatialDimension > 1))
+        (topologicalDimension <= 1 && spatialDimension > 1))
     {
         meshes.push_back(sgrid);
     }
@@ -951,6 +965,8 @@ avtTecplotFileFormat::ParseBLOCK(int numI, int numJ, int numK)
 //    perfectly valid, but extra support may need to be added to VisIt
 //    proper to handle them correctly.
 //
+//    Mark C. Miller, Thu Jun  4 11:47:43 PDT 2015
+//    Adjusted logic for detecting curves defined on FELINESEG elem types
 // ****************************************************************************
 void
 avtTecplotFileFormat::ParsePOINT(int numI, int numJ, int numK)
@@ -990,7 +1006,7 @@ avtTecplotFileFormat::ParsePOINT(int numI, int numJ, int numK)
         sgrid->SetDimensions(dims);
 
         if ((topologicalDimension == 2 || topologicalDimension == 3) ||
-            (topologicalDimension == 0 && spatialDimension > 1))
+            (topologicalDimension <= 1 && spatialDimension > 1))
         {
             meshes.push_back(sgrid);
         }
@@ -1946,6 +1962,8 @@ avtMeshType avtTecplotFileFormat::DetermineAVTMeshType() const
 //    Jeremy Meredith, Thu May 19 10:46:22 EDT 2011
 //    Make point mesh variables on a separate namespace from the normal mesh.
 //
+//    Mark C. Miller, Thu Jun  4 11:47:43 PDT 2015
+//    Adjusted logic for detecting curves defined on FELINESEG elem types
 // ****************************************************************************
 
 void
@@ -1985,7 +2003,7 @@ avtTecplotFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
 
     // and now do either curves or a real grid, depending....
     if ((topologicalDimension==2 || topologicalDimension==3) ||
-        (topologicalDimension==0 && spatialDimension > 1))
+        (topologicalDimension<=1 && spatialDimension > 1))
     {
         avtMeshMetaData *mesh = new avtMeshMetaData;
         mesh->name = "mesh";
@@ -2095,6 +2113,8 @@ avtTecplotFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
 //    Make point mesh variables on a separate namespace from the normal mesh.
 //    Also, fixed a bug with point mesh Z coordinates.
 //
+//    Mark C. Miller, Thu Jun  4 11:47:43 PDT 2015
+//    Adjusted logic for detecting curves defined on FELINESEG elem types
 // ****************************************************************************
 
 vtkDataSet *
@@ -2140,7 +2160,7 @@ avtTecplotFileFormat::GetMesh(int domain, const char *meshname)
 
     // otherwise, what they get depends on the file contents
     if ((topologicalDimension == 2 || topologicalDimension == 3) ||
-        (topologicalDimension == 0 && spatialDimension > 1))
+        (topologicalDimension <= 1 && spatialDimension > 1))
     {
         meshes[domain]->Register(NULL);
         return meshes[domain];
diff --git a/src/gui/QvisGUIApplication.C b/src/gui/QvisGUIApplication.C
index 8f5fe96..9ad59ee 100644
--- a/src/gui/QvisGUIApplication.C
+++ b/src/gui/QvisGUIApplication.C
@@ -1636,7 +1636,12 @@ QvisGUIApplication::ClientMethodCallback(Subject *s, void *data)
 //   work around a Qt/Glib init problem in linux.
 //
 //   David Camp, Thu Aug  8 08:50:06 PDT 2013
-//   Added the restore from last session feature. 
+//   Added the restore from last session feature.
+//
+//   Kevin Griffin, Fri Jun 5 11:49:34 PDT 2015
+//   No longer starting CLI on existence of visitrc file.
+//   CLI is started on-demand when needed by the user
+//   (i.e. user selects Macro... menuitem) - see Bug #2264
 //
 // ****************************************************************************
 
@@ -1709,10 +1714,7 @@ QvisGUIApplication::FinalInitialization()
         visitTimer->StopTimer(timeid, "stage 4 - Hiding splashscreen");
         break;
     case 5:
-        // If the visitrc file exists then make sure that we load the CLI.
-        if(QFile(GetSystemVisItRCFile().c_str()).exists() ||
-           QFile(GetUserVisItRCFile().c_str()).exists())
-            Interpret("");
+        // No longer starting the CLI on existence of visitrc - see Bug #2264ß
         visitTimer->StopTimer(timeid, "stage 5 - Check for visitrc file.");
         break;
     case 6:
@@ -3719,6 +3721,10 @@ QvisGUIApplication::WindowFactory(int i)
 //   Brad Whitlock, Wed Apr  9 10:24:27 PDT 2008
 //   Changed windowNames to a string list.
 //
+//   Kevin Griffin, Fri Jun 5 11:49:34 PDT 2015
+//   Added logic to start the CLI if the Macro window is visible or posted
+//   and the CLI is not running.
+//
 // ****************************************************************************
 
 void
@@ -3800,6 +3806,12 @@ QvisGUIApplication::CreateInitiallyVisibleWindows(DataNode *node)
                     //it is embedded in another interface..
                     if(embeddedGUI) GetInitializedWindowPointer(i)->hide();
                 }
+                
+                // If the macro window is visible or posted start the CLI if not already running
+                if(WINDOW_MACRO == i)
+                {
+                    Interpret("");
+                }
             }
         }
     }
@@ -6326,6 +6338,9 @@ QvisGUIApplication::LoadFile(QualifiedFilename &f, bool addDefaultPlots)
 //   Brad Whitlock, Tue Mar 10 09:25:27 PDT 2009
 //   Quit instead of rethrowing the exception into Qt.
 //
+//   Kathleen Biagas, Thu May  7 09:14:34 PDT 2015
+//   Update the link for the FAQ.
+//
 // ****************************************************************************
 
 void
@@ -6343,7 +6358,7 @@ QvisGUIApplication::ReadFromViewer(int)
             cerr << "VisIt's viewer exited abnormally! Aborting the Graphical "
                  << "User Interface. VisIt's developers may be reached via "
                  << "the visit-users mailing list.  Please see:" << std::endl
-                 << "        http://visit.llnl.gov/FAQ.html#1"
+                 << "        https://wci.llnl.gov/simulation/computer-codes/visit/faqs/faq01"
                  << endl;
             viewerIsAlive = false;
 
@@ -8893,7 +8908,7 @@ void QvisGUIApplication::showInteractorWindow()      { GetInitializedWindowPoint
 void QvisGUIApplication::showSimulationWindow()      { GetInitializedWindowPointer(WINDOW_SIMULATION)->show(); }
 void QvisGUIApplication::showExportDBWindow()        { GetInitializedWindowPointer(WINDOW_EXPORT_DB)->show(); }
 void QvisGUIApplication::showMeshManagementWindow()  { GetInitializedWindowPointer(WINDOW_MESH_MANAGEMENT)->show(); }
-void QvisGUIApplication::showMacroWindow()           { GetInitializedWindowPointer(WINDOW_MACRO)->show(); }
+void QvisGUIApplication::showMacroWindow()           { Interpret(""); GetInitializedWindowPointer(WINDOW_MACRO)->show(); }
 void QvisGUIApplication::showSelectionsWindow()      { GetInitializedWindowPointer(WINDOW_SELECTIONS)->show(); }
 
 void
diff --git a/src/gui/QvisXRayImageQueryWidget.C b/src/gui/QvisXRayImageQueryWidget.C
index 468b053..0158940 100644
--- a/src/gui/QvisXRayImageQueryWidget.C
+++ b/src/gui/QvisXRayImageQueryWidget.C
@@ -70,6 +70,16 @@
 //   Kathleen Biagas, Wed Oct 17 12:12:29 PDT 2012
 //   Added upVector.
 //
+//   Eric Brugger, Fri May 22 15:52:32 PDT 2015
+//   I updated the window to use the new view description and support the
+//   recently added background intensity parameter.
+//
+//   Eric Brugger, Wed May 27 17:30:15 PDT 2015
+//   I added an option to family output files.
+//
+//   Eric Brugger, Thu Jun  4 17:26:57 PDT 2015
+//   I added an option to enable outputting the ray bounds to a vtk file.
+//
 // ****************************************************************************
 
 QvisXRayImageQueryWidget::QvisXRayImageQueryWidget(QWidget *parent,
@@ -96,65 +106,121 @@ QvisXRayImageQueryWidget::QvisXRayImageQueryWidget(QWidget *parent,
     imageFormat->setCurrentIndex(2);
     topLayout->addWidget(imageFormat, 0, 1);
 
+    //
+    // Divide emissivity by absorptivity
+    //
     divideFlag = new QCheckBox(tr("Divide Emis by Absorb"));
     divideFlag->setChecked(0);
     topLayout->addWidget(divideFlag, 1, 0, 1, 2);
 
     // 
-    // origin
+    // Background intensities
+    // 
+    topLayout->addWidget(new QLabel(tr("background intensities")), 2, 0);
+    backgroundIntensities = new QLineEdit();
+    backgroundIntensities->setText("0");
+    topLayout->addWidget(backgroundIntensities, 2, 1);
+
+    // 
+    // Normal
+    // 
+    topLayout->addWidget(new QLabel(tr("Normal")), 3, 0);
+    normal = new QLineEdit();
+    normal->setText("0 0 1");
+    topLayout->addWidget(normal, 3, 1);
+
+    // 
+    // Focus
     // 
-    topLayout->addWidget(new QLabel(tr("Origin")), 2, 0);
-    origin = new QLineEdit();
-    origin->setText("0 0 0");
-    topLayout->addWidget(origin, 2, 1);
+    topLayout->addWidget(new QLabel(tr("Focus")), 4, 0);
+    focus = new QLineEdit();
+    focus->setText("0 0 0");
+    topLayout->addWidget(focus, 4, 1);
 
     // 
-    // upVector
+    // View up
     // 
-    topLayout->addWidget(new QLabel(tr("Up Vector")), 3, 0);
-    upVector = new QLineEdit();
-    upVector->setText("0 1 0");
-    topLayout->addWidget(upVector, 3, 1);
+    topLayout->addWidget(new QLabel(tr("View up")), 5, 0);
+    viewUp = new QLineEdit();
+    viewUp->setText("0 1 0");
+    topLayout->addWidget(viewUp, 5, 1);
 
     // 
-    // Theta
+    // View angle
     // 
-    topLayout->addWidget(new QLabel(tr("Theta")), 4, 0);
-    theta= new QLineEdit();
-    theta->setText("0");
-    topLayout->addWidget(theta, 4, 1);
+    topLayout->addWidget(new QLabel(tr("View angle")), 6, 0);
+    viewAngle = new QLineEdit();
+    viewAngle->setText("30");
+    topLayout->addWidget(viewAngle, 6, 1);
 
     // 
-    // Phi
+    // Parallel scale
     // 
-    topLayout->addWidget(new QLabel(tr("Phi")), 5, 0);
-    phi = new QLineEdit();
-    phi->setText("0");
-    topLayout->addWidget(phi, 5, 1);
+    topLayout->addWidget(new QLabel(tr("Parallel scale")), 7, 0);
+    parallelScale = new QLineEdit();
+    parallelScale->setText("10");
+    topLayout->addWidget(parallelScale, 7, 1);
 
     // 
-    // Width
+    // Near plane
     // 
-    topLayout->addWidget(new QLabel(tr("Image Width")), 6, 0);
-    width= new QLineEdit();
-    width->setText("1");
-    topLayout->addWidget(width, 6, 1);
+    topLayout->addWidget(new QLabel(tr("Near plane")), 8, 0);
+    nearPlane = new QLineEdit();
+    nearPlane->setText("-20");
+    topLayout->addWidget(nearPlane, 8, 1);
 
     // 
-    // Height
+    // Far plane
     // 
-    topLayout->addWidget(new QLabel(tr("Image Height")), 7, 0);
-    height = new QLineEdit();
-    height->setText("1");
-    topLayout->addWidget(height, 7, 1);
+    topLayout->addWidget(new QLabel(tr("Far plane")), 9, 0);
+    farPlane = new QLineEdit();
+    farPlane->setText("20");
+    topLayout->addWidget(farPlane, 9, 1);
 
     // 
-    // Pixel Size
+    // Image pan
     // 
-    topLayout->addWidget(new QLabel(tr("Image Pixel Size")), 8, 0);
+    topLayout->addWidget(new QLabel(tr("Image pan")), 10, 0);
+    imagePan = new QLineEdit();
+    imagePan->setText("0 0");
+    topLayout->addWidget(imagePan, 10, 1);
+
+    // 
+    // Image zoom
+    // 
+    topLayout->addWidget(new QLabel(tr("Image zoom")), 11, 0);
+    imageZoom = new QLineEdit();
+    imageZoom->setText("1");
+    topLayout->addWidget(imageZoom, 11, 1);
+
+    //
+    // Perspective
+    //
+    perspective = new QCheckBox(tr("Perspective"));
+    perspective->setChecked(0);
+    topLayout->addWidget(perspective, 12, 0, 1, 2);
+
+    //
+    // Family output files
+    //
+    family = new QCheckBox(tr("Family output files"));
+    family->setChecked(1);
+    topLayout->addWidget(family, 13, 0, 1, 2);
+
+    //
+    // Output ray bounds
+    //
+    outputRayBounds = new QCheckBox(tr("Output ray bounds"));
+    outputRayBounds->setChecked(0);
+    topLayout->addWidget(outputRayBounds, 14, 0, 1, 2);
+
+    // 
+    // Image size
+    // 
+    topLayout->addWidget(new QLabel(tr("Image Size")), 15, 0);
     imageSize = new QLineEdit();
-    imageSize->setText("200 200");
-    topLayout->addWidget(imageSize, 8, 1);
+    imageSize->setText("500 500");
+    topLayout->addWidget(imageSize, 15, 1);
 }
 
 // ****************************************************************************
@@ -184,6 +250,49 @@ QvisXRayImageQueryWidget::~QvisXRayImageQueryWidget()
 //
 // Arguments:
 //   whichWidget     : The text field to parse.
+//   pt    : The array in which the values will be stored.
+//
+// Returns:    True if it worked.
+//
+// Programmer: Eric Brugger
+// Creation:   May 22, 2015
+//
+// Modifications:
+//
+// ****************************************************************************
+
+bool 
+QvisXRayImageQueryWidget::GetDoubleValues(int whichWidget, doubleVector &pt)
+{
+    QString temp;
+  
+    if (whichWidget == 0) // Background intensities
+    {
+        temp = backgroundIntensities->displayText().simplified();
+    }
+    bool okay = !temp.isEmpty();
+
+    if(okay)
+    {
+        QStringList s = temp.split(" ", QString::SkipEmptyParts);
+        for (int i = 0; okay && i < s.size(); ++i)
+        {
+            double val = s[i].toDouble(&okay);
+            if (okay) pt.push_back(val);
+        }
+    }
+
+    return okay;
+}
+
+// ****************************************************************************
+// Method: QvisXRayImageQueryWidget::GetDoubleValues
+//
+// Purpose:
+//   Gets double values from a text field.
+//
+// Arguments:
+//   whichWidget     : The text field to parse.
 //   n     : The number of values expected
 //   pt    : The array in which the values will be stored.
 //
@@ -196,6 +305,10 @@ QvisXRayImageQueryWidget::~QvisXRayImageQueryWidget()
 //   Kathleen Biagas, Wed Oct 17 12:12:29 PDT 2012
 //   Added upVector.
 //
+//   Eric Brugger, Fri May 22 15:52:32 PDT 2015
+//   I updated the window to use the new view description and support the
+//   recently added background intensity parameter.
+//
 // ****************************************************************************
 
 bool 
@@ -203,29 +316,41 @@ QvisXRayImageQueryWidget::GetDoubleValues(int whichWidget, int n, double *pt)
 {
     QString temp;
   
-    if (whichWidget == 0) // Origin
+    if (whichWidget == 1) // Normal
+    {
+        temp = normal->displayText().simplified();
+    }
+    else if (whichWidget == 2) // Focus
     {
-        temp = origin->displayText().simplified();
+        temp = focus->displayText().simplified();
     }
-    else if (whichWidget == 1) // upVector
+    else if (whichWidget == 3) // View up
     {
-        temp = upVector->displayText().simplified();
+        temp = viewUp->displayText().simplified();
     }
-    else if (whichWidget == 2) // Theta
+    else if (whichWidget == 4) // View angle
     {
-        temp = theta->displayText().simplified();
+        temp = viewAngle->displayText().simplified();
     }
-    else if (whichWidget == 3) // Phi
+    else if (whichWidget == 5) // Parallel scale
     {
-        temp = phi->displayText().simplified();
+        temp = parallelScale->displayText().simplified();
     }
-    else if (whichWidget == 4) // Image Width
+    else if (whichWidget == 6) // Near plane
     {
-        temp = width->displayText().simplified();
+        temp = nearPlane->displayText().simplified();
     }
-    else if (whichWidget == 5) // Image Height
+    else if (whichWidget == 7) // Far plane
     {
-        temp = height->displayText().simplified();
+        temp = farPlane->displayText().simplified();
+    }
+    else if (whichWidget == 8) // Image pan
+    {
+        temp = imagePan->displayText().simplified();
+    }
+    else if (whichWidget == 9) // Image zoom
+    {
+        temp = imageZoom->displayText().simplified();
     }
     bool okay = !temp.isEmpty();
 
@@ -255,7 +380,7 @@ QvisXRayImageQueryWidget::GetDoubleValues(int whichWidget, int n, double *pt)
 // Method: QvisXRayImageQueryWidget::GetIntValues
 //
 // Purpose:
-//   Gets a point from the text fiels containing ints.
+//   Gets a point from the text fields containing ints.
 //
 // Arguments:
 //   whichWidget : which widget to retrieve from
@@ -266,6 +391,11 @@ QvisXRayImageQueryWidget::GetDoubleValues(int whichWidget, int n, double *pt)
 // Programmer: Kathleen Biagas 
 // Creation:   June 17, 2011
 //
+// Modifications:
+//   Eric Brugger, Fri May 22 15:52:32 PDT 2015
+//   I updated the window to use the new view description and support the
+//   recently added background intensity parameter.
+//
 // ****************************************************************************
 
 bool 
@@ -273,7 +403,7 @@ QvisXRayImageQueryWidget::GetIntValues(int whichWidget, int *pt)
 {
     QString temp;
 
-    if (whichWidget == 3) // Image Pixel Size
+    if (whichWidget == 10) // Image size
     {
         temp = imageSize->displayText().simplified();
     }
@@ -307,55 +437,93 @@ QvisXRayImageQueryWidget::GetIntValues(int whichWidget, int *pt)
 // Creation:   June 17, 2011
 //
 // Modifications:
-//    Kathleen Biagas, Wed Sep  7 08:40:22 PDT 2011
-//    Return output_type as string instead of int.
+//   Kathleen Biagas, Wed Sep  7 08:40:22 PDT 2011
+//   Return output_type as string instead of int.
 // 
 //   Kathleen Biagas, Wed Oct 17 12:12:29 PDT 2012
 //   Added upVector.
 //
+//   Eric Brugger, Fri May 22 15:52:32 PDT 2015
+//   I updated the window to use the new view description and support the
+//   recently added background intensity parameter.
+//
+//   Eric Brugger, Wed May 27 17:30:15 PDT 2015
+//   I added an option to family output files.
+//
+//   Eric Brugger, Thu Jun  4 17:26:57 PDT 2015
+//   I added an option to enable outputting the ray bounds to a vtk file.
+//
 // ****************************************************************************
 bool
 QvisXRayImageQueryWidget::GetQueryParameters(MapNode &params)
 {
-    doubleVector origin(3);
-    doubleVector upVector(3);
-    double       t, p, w, h;
-    intVector    is(2);
+    doubleVector backgroundIntensities;
+    doubleVector normal(3);
+    doubleVector focus(3);
+    doubleVector viewUp(3);
+    double       viewAngle, parallelScale, nearPlane, farPlane;
+    doubleVector imagePan(2);
+    double       imageZoom;
+    intVector    imageSize(2);
 
     bool noerrors = true;
 
-    if (!GetDoubleValues(0, 3, &origin[0]))
+    if (!GetDoubleValues(0, backgroundIntensities))
+        noerrors = false;
+    if (backgroundIntensities.size() == 0)
+        noerrors = false;
+
+    if (noerrors && !GetDoubleValues(1, 3, &normal[0]))
+        noerrors = false;
+
+    if (noerrors && !GetDoubleValues(2, 3, &focus[0]))
+        noerrors = false;
+
+    if (noerrors && !GetDoubleValues(3, 3, &viewUp[0]))
+        noerrors = false;
+
+    if (noerrors && !GetDoubleValues(4, 1, &viewAngle))
         noerrors = false;
 
-    if (!GetDoubleValues(1, 3, &upVector[0]))
+    if (noerrors && !GetDoubleValues(5, 1, &parallelScale))
         noerrors = false;
 
-    if (noerrors && !GetDoubleValues(2, 1, &t))
+    if (noerrors && !GetDoubleValues(6, 1, &nearPlane))
         noerrors = false;
 
-    if (noerrors && !GetDoubleValues(3, 1, &p))
+    if (noerrors && !GetDoubleValues(7, 1, &farPlane))
         noerrors = false;
 
-    if (noerrors && !GetDoubleValues(4, 1, &w))
+    if (noerrors && !GetDoubleValues(8, 2, &imagePan[0]))
         noerrors = false;
 
-    if (noerrors && !GetDoubleValues(5, 1, &h))
+    if (noerrors && !GetDoubleValues(9, 1, &imageZoom))
         noerrors = false;
 
-    if (noerrors && !GetIntValues(3, &is[0]))
+    if (noerrors && !GetIntValues(10, &imageSize[0]))
         noerrors = false;
 
     if (noerrors)
     {
         params["output_type"] = imageFormat->currentText().toStdString();
         params["divide_emis_by_absorb"] = (int)divideFlag->isChecked();
-        params["origin"] = origin;
-        params["up_vector"] = upVector;
-        params["theta"] = t;
-        params["phi"] = p;
-        params["width"] = w;
-        params["height"] = h;
-        params["image_size"] = is;
+        if (backgroundIntensities.size() == 1)
+            params["background_intensity"] = backgroundIntensities[0];
+        else
+            params["background_intensities"] = backgroundIntensities;
+        params["normal"] = normal;
+        params["focus"] = focus;
+        params["view_up"] = viewUp;
+        params["view_angle"] = viewAngle;
+        params["parallel_scale"] = parallelScale;
+        params["near_plane"] = nearPlane;
+        params["far_plane"] = farPlane;
+        params["image_pan"] = imagePan;
+        params["image_zoom"] = imageZoom;
+        params["perspective"] = (int)perspective->isChecked();
+        params["family_files"] = (int)family->isChecked();
+        params["output_ray_bounds"] = (int)outputRayBounds->isChecked();
+        params["image_size"] = imageSize;
     }
     return noerrors; 
 }
diff --git a/src/gui/QvisXRayImageQueryWidget.h b/src/gui/QvisXRayImageQueryWidget.h
index 8dcc861..6d2c44f 100644
--- a/src/gui/QvisXRayImageQueryWidget.h
+++ b/src/gui/QvisXRayImageQueryWidget.h
@@ -40,6 +40,7 @@
 #define QVIS_XRAYIMAGE_QUERY_WIDGET_H
 #include <gui_exports.h>
 #include <QWidget>
+#include <vectortypes.h>
 
 // Forward declarations.
 class QCheckBox;
@@ -59,8 +60,18 @@ class MapNode;
 // Creation:   June 17, 2011 
 //
 // Modifications:
-//    Kathleen Biagas, Wed Oct 17 12:12:10 PDT 2012
-//    Added upVector.
+//   Kathleen Biagas, Wed Oct 17 12:12:10 PDT 2012
+//   Added upVector.
+//
+//   Eric Brugger, Fri May 22 15:50:50 PDT 2015
+//   I updated the window to use the new view description and support the
+//   recently added background intensity parameter.
+//
+//   Eric Brugger, Wed May 27 17:27:31 PDT 2015
+//   I added an option to family output files.
+//
+//   Eric Brugger, Thu Jun  4 17:23:58 PDT 2015
+//   I added an option to enable outputting the ray bounds to a vtk file.
 //
 // ****************************************************************************
 
@@ -75,17 +86,25 @@ public:
 
 
 private:
+    bool             GetDoubleValues(int whichWidget, doubleVector &pt);
     bool             GetDoubleValues(int whichWidget, int n, double *pt);
     bool             GetIntValues(int whichWidget, int *pt);
 
     QComboBox       *imageFormat;
     QCheckBox       *divideFlag;
-    QLineEdit       *origin;
-    QLineEdit       *upVector;
-    QLineEdit       *theta;
-    QLineEdit       *phi;
-    QLineEdit       *width;
-    QLineEdit       *height;
+    QLineEdit       *backgroundIntensities;
+    QLineEdit       *normal;
+    QLineEdit       *focus;
+    QLineEdit       *viewUp;
+    QLineEdit       *viewAngle;
+    QLineEdit       *parallelScale;
+    QLineEdit       *nearPlane;
+    QLineEdit       *farPlane;
+    QLineEdit       *imagePan;
+    QLineEdit       *imageZoom;
+    QCheckBox       *perspective;
+    QCheckBox       *family;
+    QCheckBox       *outputRayBounds;
     QLineEdit       *imageSize;
 };
 
diff --git a/src/gui/SplashScreen.C b/src/gui/SplashScreen.C
index 80dc531..5557187 100644
--- a/src/gui/SplashScreen.C
+++ b/src/gui/SplashScreen.C
@@ -197,6 +197,9 @@
 //    Eric Brugger, Wed Apr 22 11:38:06 PDT 2015
 //    Changed the date on the splash screen to May 2015.
 //
+//    Eric Brugger, Mon Jun  8 08:38:45 PDT 2015
+//    Changed the date on the splash screen to June 2015.
+//
 // ****************************************************************************
 
 SplashScreen::SplashScreen(bool cyclePictures) : QFrame(0, Qt::SplashScreen)
@@ -317,7 +320,7 @@ SplashScreen::SplashScreen(bool cyclePictures) : QFrame(0, Qt::SplashScreen)
            << tr("October")
            << tr("November")
            << tr("December");
-    int currentMonth = 5;
+    int currentMonth = 6;
     lLayout->addWidget(new QLabel(versionText, this));
     lLayout->addWidget(new QLabel(months[currentMonth-1] + " 2015", this));
 
diff --git a/src/operators/CoordSwap/avtCoordSwapFilter.C b/src/operators/CoordSwap/avtCoordSwapFilter.C
index de047d0..db633eb 100644
--- a/src/operators/CoordSwap/avtCoordSwapFilter.C
+++ b/src/operators/CoordSwap/avtCoordSwapFilter.C
@@ -46,6 +46,7 @@
 #include <vtkPointData.h>
 #include <vtkPointSet.h>
 #include <vtkRectilinearGrid.h>
+#include <vtkIntArray.h>
 
 
 static void SwapExtentsCallback(const double *, double *, void *);
@@ -155,6 +156,9 @@ avtCoordSwapFilter::Equivalent(const AttributeGroup *a)
 //    Eric Brugger, Wed Jul 23 11:09:55 PDT 2014
 //    Modified the class to work with avtDataRepresentation.
 //
+//    Kathleen Biagas, Thu Jun 4 18:15:22 MST 2015
+//    Make sure base_index gets swapped.
+//
 // ****************************************************************************
 
 avtDataRepresentation *
@@ -286,6 +290,40 @@ avtCoordSwapFilter::ExecuteData(avtDataRepresentation *in_dr)
         rv = out_ps;
     }
 
+    if (rv != NULL)
+    {
+        vtkIntArray *bi_array = vtkIntArray::SafeDownCast(
+            rv->GetFieldData()->GetArray("base_index"));
+        if (bi_array)
+        {
+            int orig_bi_vals[3]= {bi_array->GetValue(0), bi_array->GetValue(1),
+                                  bi_array->GetValue(2)};
+            // Need a new array here, so we don't affect things upstream.
+            vtkIntArray *new_bi = vtkIntArray::New();
+            new_bi->SetNumberOfComponents(1);
+            new_bi->SetNumberOfTuples(3);
+            new_bi->SetName("base_index");
+            for (int i = 0 ; i < 3 ; i++)
+            {
+                switch (new_coord[i])
+                {
+                case CoordSwapAttributes::Coord1:
+                    new_bi->SetValue(i, orig_bi_vals[0]);
+                    break;
+                case CoordSwapAttributes::Coord2:
+                    new_bi->SetValue(i, orig_bi_vals[1]);
+                    break;
+                case CoordSwapAttributes::Coord3:
+                    new_bi->SetValue(i, orig_bi_vals[2]);
+                    break;
+                }
+            }
+            rv->GetFieldData()->RemoveArray("base_index");
+            rv->GetFieldData()->AddArray(new_bi);
+            new_bi->Delete();
+        }
+    }
+
     avtDataRepresentation *out_dr = new avtDataRepresentation(rv,
         in_dr->GetDomain(), in_dr->GetLabel());
 
diff --git a/src/operators/IndexSelect/avtIndexSelectFilter.C b/src/operators/IndexSelect/avtIndexSelectFilter.C
index e9df709..5b173f8 100644
--- a/src/operators/IndexSelect/avtIndexSelectFilter.C
+++ b/src/operators/IndexSelect/avtIndexSelectFilter.C
@@ -45,7 +45,10 @@
 #include <vtkCell.h>
 #include <vtkCellArray.h>
 #include <vtkCellData.h>
+#include <vtkCharArray.h>
+#include <vtkDataSetReader.h>
 #include <vtkDataSetRemoveGhostCells.h>
+#include <vtkDataSetWriter.h>
 #include <vtkMaskPoints.h>
 #include <vtkIntArray.h>
 #include <vtkPointData.h>
@@ -59,10 +62,12 @@
 #include <vtkVisItUtility.h>
 
 #include <avtCallback.h>
+#include <avtDatasetExaminer.h>
 #include <avtLogicalSelection.h>
 #include <avtSILNamespace.h>
 #include <avtSILRestrictionTraverser.h>
 #include <avtOriginatingSource.h>
+#include <avtParallel.h>
 
 #include <DebugStream.h>
 #include <ImproperUseException.h>
@@ -71,8 +76,14 @@
 #include <InvalidVariableException.h>
 #include <snprintf.h>
 
+#ifdef PARALLEL
+#include <mpi.h>
+#endif
+
 #include <string>
 #include <vector>
+using std::string;
+using std::vector;
 
 // ****************************************************************************
 //  Method: avtIndexSelectFilter constructor
@@ -102,9 +113,12 @@
 //    Kathleen Biagas, Wed Jan 11 13:58:31 PST 2012
 //    Turn on SingleCellPerVertex for vtkMaskPoints.
 //
+//    Kathleen Biagas, Tue Jun 9 09:31:15 MST 2015
+//    Added globalDims, lspace.
+//
 // ****************************************************************************
 
-avtIndexSelectFilter::avtIndexSelectFilter()
+avtIndexSelectFilter::avtIndexSelectFilter() : lspace()
 {
     curvilinearFilter = vtkVisItExtractGrid::New();
     rectilinearFilter = vtkVisItExtractRectilinearGrid::New();
@@ -117,6 +131,11 @@ avtIndexSelectFilter::avtIndexSelectFilter()
     amrLevel          = -1;
     amrMesh           = false;
     groupCategory = false;
+    for (int i = 0; i < 3; ++i)
+    {
+        globalDims[i] = INT_MAX;
+        globalDims[i+3] = -1;
+    }
 }
 
 
@@ -415,6 +434,9 @@ avtIndexSelectFilter::Equivalent(const AttributeGroup *a)
 //    I modified the routine to return a NULL in the case where it previously
 //    returned an avtDataRepresentation with a NULL vtkDataSet.
 //
+//    Kathleen Biagas, Tue Jun 9 09:34:17 MST 2015
+//    Move Replicate (wrap) to PostExecute, collect globalDims here instead.
+//
 // ****************************************************************************
 
 avtDataRepresentation *
@@ -433,6 +455,8 @@ avtIndexSelectFilter::ExecuteData(avtDataRepresentation *in_dr)
     amrMesh = (GetInput()->GetInfo().GetAttributes().GetMeshType() == 
                 AVT_AMR_MESH);
 
+    vtkIntArray *bi_arr = vtkIntArray::SafeDownCast(
+        in_ds->GetFieldData()->GetArray("base_index"));
     //
     // If the selection this filter exists to create has already been handled,
     // then we can skip execution
@@ -482,14 +506,12 @@ avtIndexSelectFilter::ExecuteData(avtDataRepresentation *in_dr)
         // The indices should reflect the "base_index"'s, so dummy one up if
         // we don't have one.
         //
-        vtkDataArray *arr = in_ds->GetFieldData()->GetArray("base_index");
         int ind[3] = { 0, 0, 0 };
-        if (arr != NULL)
+        if (bi_arr != NULL)
         {
-            vtkIntArray *ar2 = (vtkIntArray *) arr;
-            ind[0] = ar2->GetValue(0);
-            ind[1] = ar2->GetValue(1);
-            ind[2] = ar2->GetValue(2);
+            ind[0] = bi_arr->GetValue(0);
+            ind[1] = bi_arr->GetValue(1);
+            ind[2] = bi_arr->GetValue(2);
         }
 
         int *amri = NULL;
@@ -604,13 +626,11 @@ avtIndexSelectFilter::ExecuteData(avtDataRepresentation *in_dr)
         int base[3] = { 0, 0, 0 };
         if (groupCategory)
         {
-            vtkDataArray *arr = in_ds->GetFieldData()->GetArray("base_index");
-            if (arr != NULL)
+            if (bi_arr != NULL)
             {
-                vtkIntArray *ar2 = (vtkIntArray *) arr;
-                base[0] += ar2->GetValue(0);
-                base[1] += ar2->GetValue(1);
-                base[2] += ar2->GetValue(2);
+                base[0] = bi_arr->GetValue(0);
+                base[1] = bi_arr->GetValue(1);
+                base[2] = bi_arr->GetValue(2);
             }
         }
         
@@ -714,18 +734,41 @@ avtIndexSelectFilter::ExecuteData(avtDataRepresentation *in_dr)
 
     successfullyExecuted = true;
 
-    bool wrap[3];
-    wrap[0] = atts.GetXWrap();
-    wrap[1] = atts.GetYWrap();
-    wrap[2] = atts.GetZWrap();
-
-    int dstype = in_ds->GetDataObjectType();
 
-    if( (wrap[0] || wrap[1] || wrap[2]) &&
+    if ((atts.GetXWrap() || atts.GetYWrap() || atts.GetZWrap()) &&
         topoDim > 0 &&
-        dstype != VTK_POLY_DATA && dstype != VTK_UNSTRUCTURED_GRID )
+       (in_ds->GetDataObjectType() == VTK_STRUCTURED_GRID ||
+        in_ds->GetDataObjectType() == VTK_RECTILINEAR_GRID))
     {
-        out_ds = Replicate( out_ds, wrap );
+        // In the multi-block case, this doesn't work if sil-selection
+        // has been applied, because only the currently plotted domains
+        // are used to calculate the maximums... is this okay?
+
+        int lo[3] = {0, 0, 0};
+        int hi[3] = {0, 0, 0};
+        int dims[3] = {0, 0, 0};
+        if (out_ds->GetDataObjectType() == VTK_STRUCTURED_GRID)
+        {
+            vtkStructuredGrid::SafeDownCast(out_ds)->GetDimensions(dims);
+        }
+        else if (out_ds->GetDataObjectType() == VTK_RECTILINEAR_GRID)
+        {
+            vtkRectilinearGrid::SafeDownCast(out_ds)->GetDimensions(dims);
+        }
+        if (bi_arr)
+        {
+            lo[0] = bi_arr->GetValue(0);
+            lo[1] = bi_arr->GetValue(1);
+            lo[2] = bi_arr->GetValue(2);
+        }
+        for (int i = 0; i < 3; ++i)
+        {
+            hi[i] = lo[i] + dims[i] -1;
+            if (lo[i] < globalDims[i])
+                globalDims[i] = lo[i];
+            if (hi[i] > globalDims[i+3])
+                globalDims[i+3] = hi[i];
+        }
     }
 
     avtDataRepresentation *out_dr = new avtDataRepresentation(out_ds,
@@ -834,13 +877,13 @@ avtIndexSelectFilter::ModifyContract(avtContract_p spec)
         {
             // If we've got species info, we need to maintain that.
             // So see which species are on.
-            std::vector<int>  species;
-            std::vector<bool> setState;
+            vector<int>  species;
+            vector<bool> setState;
         
             int topset = silr->GetTopSet();
             avtSILSet_p pTopset = silr->GetSILSet(topset);
 
-            const std::vector<int> &mapsOut = pTopset->GetRealMapsOut();
+            const vector<int> &mapsOut = pTopset->GetRealMapsOut();
             avtSILCollection_p speciesColl = NULL;
             for (size_t i = 0 ; i < mapsOut.size() ; i++)
             {
@@ -1060,6 +1103,22 @@ avtIndexSelectFilter::PostExecute(void)
         GetOutput()->GetInfo().GetAttributes().SetTopologicalDimension(newdim);
       }
     }
+
+    if ( GetOutput()->GetInfo().GetAttributes().GetTopologicalDimension() > 0 &&
+        (atts.GetXWrap() || atts.GetYWrap() || atts.GetZWrap()))
+    {
+        Replicate();
+
+        avtDataAttributes &outAtts = GetOutput()->GetInfo().GetAttributes();
+        outAtts.GetOriginalSpatialExtents()->Clear();
+        outAtts.GetDesiredSpatialExtents()->Clear();
+        outAtts.GetActualSpatialExtents()->Clear();
+
+        double bounds[6];
+        avtDataset_p ds = GetTypedOutput();
+        avtDatasetExaminer::GetSpatialExtents(ds, bounds);
+        outAtts.GetThisProcsOriginalSpatialExtents()->Set(bounds);
+    }
 }
 
 
@@ -1105,6 +1164,8 @@ avtIndexSelectFilter::ReleaseData(void)
     vtkPolyData *p = vtkPolyData::New();
     pointsFilter->SetOutput(p);
     p->Delete();
+
+    lspace.clear();
 }
 
 // ****************************************************************************
@@ -1265,188 +1326,6 @@ avtIndexSelectFilter::VerifyInput()
     ENDTRY
 }
 
-// ****************************************************************************
-//  Method: avtIndexSelectFilter::Replicate
-//
-//  Purpose:
-//    Replicates the first slice to the last slice for wrapping.
-//
-//  Programmer: Hank Childs/Allen Sanderson
-//  Creation:   April 14, 2010
-//
-//  Modifications:
-//    Kathleen Biagas, Tue Aug 21 16:14:59 MST 2012
-//    Preserve coordinate type.
-//
-// ****************************************************************************
-
-vtkDataSet *
-avtIndexSelectFilter::Replicate(vtkDataSet *in_ds, bool wrap[3] )
-{
-   int   dims_in[3];
-   int   dims_out[3];
-
-   vtkDataSet *out_ds = in_ds;
-
-   // Instantiate the output and copy over the coordinates.
-   if (in_ds->GetDataObjectType() == VTK_RECTILINEAR_GRID)
-   {
-     // Get the original dimensions.
-     vtkRectilinearGrid *rgrid = (vtkRectilinearGrid *) out_ds;
-     rgrid->GetDimensions(dims_in);
-
-     // Do each dimension individually.
-     for( unsigned int d=0; d<3; ++d )
-     {
-       if( !wrap[d] )
-         continue;
-
-       unsigned int d0 = d;
-       unsigned int d1 = (d+1)%3;
-       unsigned int d2 = (d+2)%3;
-
-       // Learn about the input grid
-       int dims[3];
-       vtkRectilinearGrid *rgrid = (vtkRectilinearGrid *) out_ds;
-       rgrid->GetDimensions(dims);
-       dims_out[0] = dims[0] + (d==0 && wrap[0] ? 1 : 0);
-       dims_out[1] = dims[1] + (d==1 && wrap[1] ? 1 : 0);
-       dims_out[2] = dims[2] + (d==2 && wrap[2] ? 1 : 0);
-
-       // Make a new coord with a new value at the end.
-       vtkDataArray *coor = GetCoordinates(rgrid, d0);
-       vtkDataArray *coor_new = coor->NewInstance();
-       coor_new->SetNumberOfTuples(dims_out[d0]);
-       for (int i=0; i<dims[d0]; ++i)
-           coor_new->SetTuple1(i, coor->GetTuple1(i));
-
-       double lastVal = coor->GetTuple1(dims[d0]-1);
-       double prevVal = coor->GetTuple1(dims[d0]-2);
-       coor_new->SetTuple1(dims[d0], lastVal + (lastVal-prevVal));
-
-       // Set up the output, including the coordinates
-       vtkRectilinearGrid *out_rg = vtkRectilinearGrid::New();
-       out_rg->SetDimensions(dims_out);
-       SetCoordinates(out_rg, coor_new, d0);
-       SetCoordinates(out_rg, GetCoordinates(rgrid, d1), d1);
-       SetCoordinates(out_rg, GetCoordinates(rgrid, d2), d2);
-       coor_new->Delete();
-
-       if( out_ds != in_ds )
-         out_ds->Delete();
-
-       out_ds = out_rg;
-     }
-   }
-   else if (in_ds->GetDataObjectType() == VTK_STRUCTURED_GRID)
-   {
-     // Learn about the input grid
-     vtkStructuredGrid *sgrid = (vtkStructuredGrid *) in_ds;
-     sgrid->GetDimensions(dims_in);
-
-     dims_out[0] = dims_in[0] + (wrap[0] ? 1 : 0);
-     dims_out[1] = dims_in[1] + (wrap[1] ? 1 : 0);
-     dims_out[2] = dims_in[2] + (wrap[2] ? 1 : 0);
-
-     vtkPoints *pts = sgrid->GetPoints();
-     vtkPoints *new_pts = vtkPoints::New(pts->GetDataType());
-     vtkStructuredGrid *out_sg = vtkStructuredGrid::New();
-     out_sg->SetDimensions(dims_out);
-     out_sg->SetPoints(new_pts);
-     new_pts->Delete();
-     new_pts->SetNumberOfPoints(dims_out[0]*dims_out[1]*dims_out[2]);
-
-     // Copy the original points over.
-     for (int i=0; i<dims_out[0]; ++i)
-     {
-       int i0 = i % dims_in[0];
-       
-       for (int j=0; j<dims_out[1]; ++j)
-       {
-         int j0 = j % dims_in[1];
-         
-         for (int k=0; k<dims_out[2]; ++k)
-         {
-           int k0 = k % dims_in[2];
-           
-           int idx_in  = k0*dims_in[1]*dims_in[0] + j0*dims_in[0] + i0;
-           int idx_out = k*dims_out[1]*dims_out[0] + j*dims_out[0] + i;
-           
-           new_pts->SetPoint(idx_out, pts->GetPoint(idx_in));
-         }
-       }
-     }
-
-     if( out_ds != in_ds )
-       out_ds->Delete();
-
-     out_ds = out_sg;
-   }
-
-   // Should never get here but just in case.
-   else
-     return out_ds;
-
-   // Copy over the point data.
-   vtkPointData *inPD  =  in_ds->GetPointData();
-   vtkPointData *outPD = out_ds->GetPointData();
-   outPD->CopyAllocate(inPD, dims_out[0]*dims_out[1]*dims_out[2]);
-
-   for (int i1=0; i1<dims_out[0]; ++i1)
-   {
-     int i0 = i1 % dims_in[0];
-
-     for (int j1=0; j1<dims_out[1]; ++j1)
-     {
-       int j0 = j1 % dims_in[1];
-       
-       for (int k1=0; k1<dims_out[2]; ++k1)
-       {
-         int k0 = k1 % dims_in[2];
-         
-         int idx_in  = k0*dims_in[1]*dims_in[0] + j0*dims_in[0] + i0;
-         int idx_out = k1*dims_out[1]*dims_out[0] + j1*dims_out[0] + i1;
-
-         outPD->CopyData(inPD, idx_in, idx_out);
-       }
-     }
-   }
-
-   // Copy over the cell data.
-   int xdims = (dims_in[0]-1 < 1 ? 1 : dims_in[0]-1);
-   int ydims = (dims_in[1]-1 < 1 ? 1 : dims_in[1]-1);
-   int zdims = (dims_in[2]-1 < 1 ? 1 : dims_in[2]-1);
-
-   int xdims_out = (dims_out[0]-1 < 1 ? 1 : dims_out[0]-1);
-   int ydims_out = (dims_out[1]-1 < 1 ? 1 : dims_out[1]-1);
-   int zdims_out = (dims_out[2]-1 < 1 ? 1 : dims_out[2]-1);
-
-   vtkCellData *outCD = out_ds->GetCellData();
-   vtkCellData *inCD = in_ds->GetCellData();
-   outCD->CopyAllocate(inCD, xdims_out*ydims_out*zdims_out);
-
-   for (int i1=0; i1<xdims_out; ++i1)
-   {
-     int i0 = i1 % xdims;
-
-     for (int j1=0; j1<ydims_out; ++j1)
-     {
-       int j0 = j1 % ydims;
-
-       for (int k1=0; k1<zdims_out; ++k1)
-       {
-         int k0 = k1 % zdims;
-
-         int idx_in = k0*(ydims*xdims) + j0*xdims + i0;
-         int idx_out = k1*(ydims_out*xdims_out) + j1*xdims_out + i1;
-         outCD->CopyData(inCD, idx_in, idx_out);
-       }
-     }
-   }
-
-   return out_ds;
-}
-
 vtkDataArray *avtIndexSelectFilter::GetCoordinates( vtkRectilinearGrid *grid,
                                                     unsigned int coor)
 {
@@ -1458,7 +1337,7 @@ vtkDataArray *avtIndexSelectFilter::GetCoordinates( vtkRectilinearGrid *grid,
     return grid->GetZCoordinates();
   else
     return 0;
-};
+}
 
 
 void avtIndexSelectFilter::SetCoordinates( vtkRectilinearGrid *grid,
@@ -1471,4 +1350,688 @@ void avtIndexSelectFilter::SetCoordinates( vtkRectilinearGrid *grid,
     grid->SetYCoordinates(coordinates);
   else if( coor == 2 )
     grid->SetZCoordinates(coordinates);
-};
+}
+
+
+// ****************************************************************************
+//  Method: avtIndexSelectFilter::Replicate
+//
+//  Purpose:
+//    Replicates the first slice to the last slice for wrapping.
+//
+//  Programmer: Hank Childs/Allen Sanderson
+//  Creation:   April 14, 2010
+//
+//  Modifications:
+//    Kathleen Biagas, Tue Aug 21 16:14:59 MST 2012
+//    Preserve coordinate type.
+//
+//    Kathleen biagas, Tue June 9 09:36:27 MST 2015
+//    Changed signatu
+// ****************************************************************************
+
+void
+avtIndexSelectFilter::Replicate()
+{
+    avtDataset_p ds = GetTypedOutput();
+
+#ifdef PARALLEL
+    int gd[6];
+    MPI_Allreduce(&globalDims[0], &gd[0], 3, MPI_INT, MPI_MIN, VISIT_MPI_COMM);
+    MPI_Allreduce(&globalDims[3], &gd[3], 3, MPI_INT, MPI_MAX, VISIT_MPI_COMM);
+    for (int i = 0; i < 6; ++i)
+        globalDims[i] = gd[i];
+#endif
+    int myRank = PAR_Rank();
+
+    lspace.clear();
+    int nblocks = 0;
+    vtkDataSet **blocks = ds->GetDataTree()->GetAllLeaves(nblocks);
+
+    vector<int> domainIds;
+    vector<string> labels;
+    ds->GetDataTree()->GetAllDomainIds(domainIds);
+    ds->GetDataTree()->GetAllLabels(labels);
+    bool wrap[3] = {atts.GetXWrap(), atts.GetYWrap(), atts.GetZWrap()};
+
+    bool haveNewOutput = false;
+
+    int dataObjectType = -1;
+
+    bool okay = true;
+    for (int n = 0; n < nblocks && okay; ++n)
+    {
+        vtkDataSet *ds = blocks[n]; 
+        dataObjectType = ds->GetDataObjectType();
+        int dims[3];
+        vtkIntArray *bi = vtkIntArray::SafeDownCast(
+                              ds->GetFieldData()->GetArray("base_index"));
+        if (!bi)
+        {
+            okay = false;
+            break;
+        }
+        int *mins = (int*)bi->GetVoidPointer(0);
+        int max[3];
+        if (dataObjectType == VTK_RECTILINEAR_GRID)
+        {
+            vtkRectilinearGrid *rgrid = vtkRectilinearGrid::SafeDownCast(ds);
+            rgrid->GetDimensions(dims);
+            bool doReplicate = false;
+            for (int i = 0; i < 3; ++i)
+            {
+                max[i] = mins[i]+dims[i] -1;
+                doReplicate |= (wrap[i] && max[i] == globalDims[i+3]);
+            }
+            if (doReplicate)
+            {
+                blocks[n] = Replicate(rgrid, wrap, dims, max);
+                haveNewOutput = true;
+            }
+        }
+        else if (dataObjectType == VTK_STRUCTURED_GRID)
+        {
+            vtkStructuredGrid::SafeDownCast(ds)->GetDimensions(dims);
+            avtIndexSelectFilter::LogicalSpaces ls;
+            for (int i = 0; i < 3; ++i)
+            {
+                max[i] = mins[i]+dims[i] -1;
+            }
+            ls.SetMins(mins);
+            ls.SetMaxs(max);
+            ls.rank = myRank;
+            ls.block =  domainIds[n];
+            lspace.push_back(ls);
+        }
+        else
+        {
+            okay = false;
+            break;
+        }
+
+    }
+#ifdef PARALLEL
+    okay = (bool) UnifyMaximumValue((int)okay);
+    dataObjectType = UnifyMaximumValue(dataObjectType);
+#endif
+    if (!okay)
+    {
+        lspace.clear();
+        return;
+    }
+
+    if (dataObjectType == VTK_STRUCTURED_GRID)
+    {
+#ifdef PARALLEL
+        int mpiNBTag = GetUniqueMessageTag();
+        int mpiDataTag = GetUniqueMessageTag();
+        vector<avtIndexSelectFilter::LogicalSpaces> maxSpaces;
+        vector<avtIndexSelectFilter::LogicalSpaces> minSpaces;
+        if (myRank == 0)
+        {
+            MPI_Status stat;
+            MPI_Status stat2;
+            for (int i = 1; i < PAR_Size(); ++i)
+            {
+                int nb;
+                MPI_Recv(&nb, 1, MPI_INT, MPI_ANY_SOURCE, mpiNBTag,
+                         VISIT_MPI_COMM, &stat);
+                for (int j = 0; j < nb; ++j)
+                {
+                    int data[8];
+                    MPI_Recv(data, 8, MPI_INT, stat.MPI_SOURCE,
+                             mpiDataTag, VISIT_MPI_COMM, &stat2);
+                    avtIndexSelectFilter::LogicalSpaces ls;
+                    ls.rank  = data[0];
+                    ls.block = data[1];
+                    ls.SetMins(&data[2]);
+                    ls.SetMaxs(&data[5]);
+                    lspace.push_back(ls);
+                }
+            }
+        } 
+        else
+        {
+            MPI_Send(&nblocks, 1, MPI_INT, 0, mpiNBTag, VISIT_MPI_COMM);
+            for (int i = 0; i < nblocks; ++i)
+            {
+                MPI_Send(&(lspace[i].rank), 8, MPI_INT, 0, mpiDataTag, 
+                           VISIT_MPI_COMM);
+            } 
+        } 
+        
+        Barrier();
+#endif
+
+        for (int i = 0; i < 3 && okay; ++i)
+        {
+            if(!wrap[i])
+                continue;
+
+        if (myRank == 0)
+        {
+            for (size_t j = 0; j < lspace.size(); ++j)
+            {
+                if (lspace[j].MatchesMaxAt(i, globalDims[i+3]))
+                {
+                    int findMin[3];
+                    for (int k = 0; k < 3; ++k)
+                    {
+                        if (k == i)
+                            findMin[k] = globalDims[i];
+                        else
+                            findMin[k] = lspace[j].mins[k];
+                    }
+                    for (size_t k = 0; k < lspace.size(); ++k)
+                    {
+                        if (lspace[k].MatchesMins(findMin))
+                        {
+#ifdef PARALLEL
+                            maxSpaces.push_back(lspace[j]);
+                            minSpaces.push_back(lspace[k]);
+#else
+                            int maxBlock = lspace[j].block;
+                            int minBlock = lspace[k].block;
+                            blocks[maxBlock] = Replicate(i, blocks[minBlock],
+                                                         blocks[maxBlock]);
+                            haveNewOutput = true;
+#endif
+                            break;
+                        }
+                    }
+                }
+            }
+        } // PAR_Rank
+#ifdef PARALLEL
+        Barrier();
+        int numMatches = (int)maxSpaces.size();
+        BroadcastInt(numMatches);
+        maxSpaces.resize(numMatches);
+        minSpaces.resize(numMatches);
+        for (int j = 0; j < numMatches; ++j)
+        {
+            BroadcastIntArray(&(maxSpaces[j].rank), 8);
+            BroadcastIntArray(&(minSpaces[j].rank), 8);
+        }
+        for (size_t j = 0; j < maxSpaces.size(); ++j)
+        {
+            int mpiSizeTag = GetUniqueMessageTag();
+            int mpiDSTag = GetUniqueMessageTag();
+            size_t maxBlock = 0;
+            size_t minBlock = 0;
+            if (myRank == maxSpaces[j].rank && myRank == minSpaces[j].rank)
+            {
+                // Both min and max blocks reside on this processor
+                for (size_t k = 0; k < domainIds.size(); ++k)
+                {
+                    if (domainIds[k] == maxSpaces[j].block)
+                        maxBlock = k;
+                    if (domainIds[k] == minSpaces[j].block)
+                        minBlock = k;
+                }
+                blocks[maxBlock] = Replicate(i, 
+                    blocks[minBlock], 
+                    blocks[maxBlock]);
+                haveNewOutput = true;
+            }
+            else if (myRank == maxSpaces[j].rank)
+            {
+                // Need to recv the vtkDataSet from proc with min
+                for (size_t k = 0; k < domainIds.size(); ++k)
+                {
+                    if (domainIds[k] == maxSpaces[j].block)
+                        maxBlock = k;
+                }
+                MPI_Status stat;
+                int size;
+                vtkDataSetReader *reader = vtkDataSetReader::New();
+                reader->ReadFromInputStringOn();
+                MPI_Recv(&size, 1, MPI_INT, minSpaces[j].rank, mpiSizeTag,
+                         VISIT_MPI_COMM, &stat);
+                char *str = new char[size];
+                MPI_Recv(str, size, MPI_CHAR, minSpaces[j].rank, mpiDSTag,
+                          VISIT_MPI_COMM, &stat);
+                vtkCharArray *charArray = vtkCharArray::New();
+                charArray->SetArray((char*)str, size, 1);
+                reader->SetInputArray(charArray);
+                reader->Update();
+
+                // Do the replication
+                blocks[maxBlock] = Replicate(i, 
+                    reader->GetOutput(), 
+                    blocks[maxBlock]);
+                haveNewOutput = true;
+
+                // cleanup;
+                delete [] str;
+                reader->Delete();
+                charArray->Delete();
+              
+            }
+            else if (myRank == minSpaces[j].rank)
+            {
+                for (size_t k = 0; k < domainIds.size(); ++k)
+                {
+                    if (domainIds[k] == minSpaces[j].block)
+                        minBlock = k;
+                }
+                // Need to send the vtkDataSet to proc with max
+                vtkDataSetWriter *writer = vtkDataSetWriter::New();
+                writer->WriteToOutputStringOn();
+                writer->SetFileTypeToBinary();
+                writer->SetInputData(blocks[minBlock]);
+                writer->Write();
+                int size = writer->GetOutputStringLength();
+                char *str = writer->RegisterAndGetOutputString();
+                MPI_Send(&size, 1, MPI_INT, maxSpaces[j].rank, mpiSizeTag,
+                         VISIT_MPI_COMM);
+                MPI_Send(str, size, MPI_CHAR, maxSpaces[j].rank, mpiDSTag,
+                         VISIT_MPI_COMM);
+                delete [] str;
+                writer->Delete();
+            }
+        }
+#endif
+        } // wrap direction
+    }
+
+
+    if (haveNewOutput)
+    {
+        avtDataTree_p tree;
+        if (!labels.empty())
+        {
+            tree = new avtDataTree(nblocks, blocks, domainIds, labels);
+        }
+        else 
+        {
+            tree = new avtDataTree(nblocks, blocks, domainIds);
+        }
+        SetOutputDataTree(tree);
+    }
+
+}
+
+
+// ****************************************************************************
+//  Method: avtIndexSelectFilter::Replicate
+//
+//  Purpose:
+//    Replicates the first slice to the last slice for wrapping.
+//
+//  Arguments:
+//    wrap      The wrap direction (0->i, 1->j, 2->k).
+//    min_ds    The dataset with the minimum slice for the wrap direction.
+//    max_ds    The dataset with the maximum slice for the wrap direction.
+//
+//  Programmer: Hank Childs/Allen Sanderson
+//  Creation:   April 14, 2010
+//
+//  Modifications:
+//    Kathleen Biagas, Tue Aug 21 16:14:59 MST 2012
+//    Preserve coordinate type.
+//
+//    Kathleen biagas, Tue June 9 09:36:27 MST 2015
+//    Changed signature (to handle multi-block and parallel), this method
+//    now only handles vtkStructuredGrid.
+//
+// ****************************************************************************
+
+vtkDataSet *
+avtIndexSelectFilter::Replicate(int wrap, vtkDataSet *min_ds,
+                                          vtkDataSet *max_ds)
+{
+    vtkStructuredGrid *min_sgrid = vtkStructuredGrid::SafeDownCast(min_ds);
+    vtkStructuredGrid *max_sgrid = vtkStructuredGrid::SafeDownCast(max_ds);
+    if (min_sgrid == NULL || max_sgrid == NULL)
+    {
+        debug3 << "IndexSelect::Replicate did not receive structured "
+               << "grid input." << endl;
+        return max_ds;
+    }
+
+    int   dims_in[3] = {0,0,0};
+    int   dims_out[3] = {0,0,0};
+
+    vtkDataSet *out_ds = max_ds;
+
+    // Learn about the input grid
+    max_sgrid->GetDimensions(dims_in);
+
+    dims_out[0] = dims_in[0];
+    dims_out[1] = dims_in[1];
+    dims_out[2] = dims_in[2];
+    dims_out[wrap]++;
+
+    vtkPoints *pts = max_sgrid->GetPoints();
+    vtkPoints *min_pts = vtkStructuredGrid::SafeDownCast(min_ds)->GetPoints();
+    vtkPoints *new_pts = vtkPoints::New(pts->GetDataType());
+    vtkStructuredGrid *out_sg = vtkStructuredGrid::New();
+    out_sg->SetDimensions(dims_out);
+    out_sg->SetPoints(new_pts);
+    new_pts->Delete();
+    new_pts->SetNumberOfPoints(dims_out[0]*dims_out[1]*dims_out[2]);
+
+    // Copy the original points over.
+    for (int i=0; i<dims_out[0]; ++i)
+    {
+        int i0 = i % dims_in[0];
+    
+        for (int j=0; j<dims_out[1]; ++j)
+        {
+            int j0 = j % dims_in[1];
+     
+            for (int k=0; k<dims_out[2]; ++k)
+            {
+                int k0 = k % dims_in[2];
+                int idx_in  = k0*dims_in[1]*dims_in[0] + j0*dims_in[0] + i0;
+                int idx_out = k*dims_out[1]*dims_out[0] + j*dims_out[0] + i;
+                if (i < dims_in[0] && j < dims_in[1] && k < dims_in[2]) 
+                    new_pts->SetPoint(idx_out, pts->GetPoint(idx_in));
+                else
+                    new_pts->SetPoint(idx_out, min_pts->GetPoint(idx_in));
+            }
+        }
+    }
+
+    if( out_ds != max_ds )
+        out_ds->Delete();
+
+    out_ds = out_sg;
+
+    CopyData(max_ds, out_ds, dims_in, dims_out);
+
+    return out_ds;
+}
+
+
+// ****************************************************************************
+//  Method: avtIndexSelectFilter::Replicate
+//
+//  Purpose:
+//    Replicates the first slice to the last slice for wrapping.
+//
+//  Arguments:
+//    rgrid     The input dataset.
+//    wrap      Whether or not to wrap in i,j,k.
+//    in_dims   The dimensions of the input grid.
+//
+//  Programmer: Hank Childs/Allen Sanderson
+//  Creation:   April 14, 2010
+//
+//  Modifications:
+//    Kathleen Biagas, Tue Aug 21 16:14:59 MST 2012
+//    Preserve coordinate type.
+//
+//    Kathleen Biagas, Tue June 9 09:36:27 MST 2015
+//    Extracted from original method to only handle rectilinear grid.
+//
+//    Kathleen Biagas, Wed June 10 10:45:43 MST 2015
+//    Fixed logic so that wrapping for a given direction doesn't happend
+//    if the input's max dims do not match the global max dims.
+//
+// ****************************************************************************
+
+vtkDataSet *
+avtIndexSelectFilter::Replicate(vtkRectilinearGrid *rgrid, bool wrap[3],
+    int dims_in[3], int max[3])
+{
+    vtkRectilinearGrid *out = rgrid;
+    bool haveCopied = false;
+    int dims_out[3] = {dims_in[0], dims_in[1], dims_in[2] };
+
+    // Do each dimension individually.
+    for( unsigned int d=0; d<3; ++d )
+    {
+        if( !wrap[d] )
+            continue;
+
+        // does this dataset have the max dims?
+        if (max[d] != globalDims[d+3])
+            continue;
+
+        if (!haveCopied)
+        {
+            out = rgrid->NewInstance();
+            out->DeepCopy(rgrid);
+            haveCopied = true;
+        }
+        dims_out[d]++;
+        vtkDataArray *coor = GetCoordinates(out, d);
+
+        double lastVal = coor->GetTuple1(dims_in[d]-1);
+        double prevVal = coor->GetTuple1(dims_in[d]-2);
+        coor->InsertNextTuple1(lastVal + (lastVal-prevVal));
+
+    }
+
+    if (haveCopied)
+    {
+        out->SetDimensions(dims_out);
+        CopyData(rgrid, out, dims_in, dims_out);
+    }
+
+    return out;
+}
+
+
+// ****************************************************************************
+//  Method: avtIndexSelectFilter::CopyData
+//
+//  Purpose:
+//    Copies Point and Cell Data from input to output datasets, utilizing
+//    input and output structured dimensions.
+//
+//  Arguments:
+//    in_ds     The input dataset.
+//    out_ds    The output dataset.
+//    in_dims   Dimensions for input dataset.
+//    out_dims  Dimensions for output dataset.
+//
+//  Programmer: Kathleen Biagas 
+//  Creation:   June 9, 2015
+//
+//  Modifications:
+//
+// ****************************************************************************
+
+void
+avtIndexSelectFilter::CopyData(vtkDataSet *in_ds, vtkDataSet *out_ds, int dims_in[3], int dims_out[3])
+{
+    // Copy over the point data.
+    vtkPointData *inPD  = in_ds->GetPointData();
+    vtkPointData *outPD = out_ds->GetPointData();
+    outPD->CopyAllocate(inPD, dims_out[0]*dims_out[1]*dims_out[2]);
+
+    for (int i1=0; i1<dims_out[0]; ++i1)
+    {
+        int i0 = i1 % dims_in[0];
+
+        for (int j1=0; j1<dims_out[1]; ++j1)
+        {
+            int j0 = j1 % dims_in[1];
+
+            for (int k1=0; k1<dims_out[2]; ++k1)
+            {
+                int k0 = k1 % dims_in[2];
+
+                int idx_in  = k0*dims_in[1]*dims_in[0] + j0*dims_in[0] + i0;
+                int idx_out = k1*dims_out[1]*dims_out[0] + j1*dims_out[0] + i1;
+
+                outPD->CopyData(inPD, idx_in, idx_out);
+            }
+        }
+    }
+
+    // Copy over the cell data.
+    int xdims = (dims_in[0]-1 < 1 ? 1 : dims_in[0]-1);
+    int ydims = (dims_in[1]-1 < 1 ? 1 : dims_in[1]-1);
+    int zdims = (dims_in[2]-1 < 1 ? 1 : dims_in[2]-1);
+
+    int xdims_out = (dims_out[0]-1 < 1 ? 1 : dims_out[0]-1);
+    int ydims_out = (dims_out[1]-1 < 1 ? 1 : dims_out[1]-1);
+    int zdims_out = (dims_out[2]-1 < 1 ? 1 : dims_out[2]-1);
+
+    vtkCellData *outCD = out_ds->GetCellData();
+    vtkCellData *inCD  = in_ds->GetCellData();
+    outCD->CopyAllocate(inCD, xdims_out*ydims_out*zdims_out);
+
+    for (int i1=0; i1<xdims_out; ++i1)
+    {
+        int i0 = i1 % xdims;
+
+        for (int j1=0; j1<ydims_out; ++j1)
+        {
+            int j0 = j1 % ydims;
+
+            for (int k1=0; k1<zdims_out; ++k1)
+            {
+                int k0 = k1 % zdims;
+
+                int idx_in = k0*(ydims*xdims) + j0*xdims + i0;
+                int idx_out = k1*(ydims_out*xdims_out) + j1*xdims_out + i1;
+                outCD->CopyData(inCD, idx_in, idx_out);
+            }
+        }
+    }
+}
+
+
+// ****************************************************************************
+//  Method: avtIndexSelectFilter::LogicalSpaces constructor
+//
+//  Purpse:  Helper class for 'wrap' option.
+//
+//  Programmer: Kathleen Biagas
+//  Creation:   June 9, 2015
+//
+// ****************************************************************************
+
+avtIndexSelectFilter::LogicalSpaces::LogicalSpaces()
+{
+    mins[0] = mins[1] = mins[2] = -1;
+    maxs[0] = maxs[1] = maxs[2] = -1;
+}
+
+// ****************************************************************************
+//  Method: avtIndexSelectFilter::LogicalSpaces destructor
+//
+//  Programmer: Kathleen Biagas
+//  Creation:   June 9, 2015
+//
+// ****************************************************************************
+
+avtIndexSelectFilter::LogicalSpaces::~LogicalSpaces()
+{
+}
+
+// ****************************************************************************
+//  Method: avtIndexSelectFilter::LogicalSpaces::SetMins
+//
+//  Purpose:
+//    Sets the minimum values.
+//
+//  Arguments:
+//    _min     The minimum values.
+//
+//  Programmer: Kathleen Biagas
+//  Creation:   June 9, 2015
+//
+// ****************************************************************************
+
+void
+avtIndexSelectFilter::LogicalSpaces::SetMins(int *_min)
+{
+    mins[0] = _min[0];
+    mins[1] = _min[1];
+    mins[2] = _min[2];
+}
+
+
+// ****************************************************************************
+//  Method: avtIndexSelectFilter::LogicalSpaces::SetMaxs
+//
+//  Purpose:
+//    Sets the maximum values.
+//
+//  Arguments:
+//    _max     The maximum values.
+//
+//  Programmer: Kathleen Biagas
+//  Creation:   June 9, 2015
+//
+// ****************************************************************************
+
+void
+avtIndexSelectFilter::LogicalSpaces::SetMaxs(int *_max)
+{
+    maxs[0] = _max[0];
+    maxs[1] = _max[1];
+    maxs[2] = _max[2];
+}
+
+// ****************************************************************************
+//  Method: avtIndexSelectFilter::LogicalSpaces::HasMinAt
+//
+//  Returns:
+//    True if the minimum value at index 'idx' matches the passed value.
+//
+//  Arguments:
+//    idx     The index.
+//    _min    The minimum value to be matched.
+//
+//  Programmer: Kathleen Biagas
+//  Creation:   June 9, 2015
+//
+// ****************************************************************************
+
+bool
+avtIndexSelectFilter::LogicalSpaces::HasMinAt(int idx, int _min)
+{
+    return idx < 3 && idx >= 0 && mins[idx] == _min;
+}
+
+// ****************************************************************************
+//  Method: avtIndexSelectFilter::LogicalSpaces::MatchesMin
+//
+//  Returns:
+//    True if the mins values matches passed values.
+//
+//  Arguments:
+//    i_min     The value to match at position 0.
+//    j_min     The value to match at position 1.
+//    k_min     The value to match at position 2.
+//
+//  Programmer: Kathleen Biagas
+//  Creation:   June 9, 2015
+//
+// ****************************************************************************
+
+bool
+avtIndexSelectFilter::LogicalSpaces::MatchesMins(int _min[3])
+{
+    return mins[0] == _min[0] && mins[1] == _min[1] && mins[2] == _min[2];
+}
+ 
+
+// ****************************************************************************
+//  Method: avtIndexSelectFilter::LogicalSpaces::HasMaxAt
+//
+//  Returns:
+//    True if the maximum value at index 'idx' matches the passed value.
+//
+//  Arguments:
+//    idx     The index.
+//    _max    The maximum value to be matched.
+//
+//  Programmer: Kathleen Biagas
+//  Creation:   June 9, 2015
+//
+// ****************************************************************************
+
+bool
+avtIndexSelectFilter::LogicalSpaces::MatchesMaxAt(int idx, int _max)
+{
+    return idx < 3 && idx >= 0 && maxs[idx] == _max;
+}
+
diff --git a/src/operators/IndexSelect/avtIndexSelectFilter.h b/src/operators/IndexSelect/avtIndexSelectFilter.h
index f83cca8..620a68e 100644
--- a/src/operators/IndexSelect/avtIndexSelectFilter.h
+++ b/src/operators/IndexSelect/avtIndexSelectFilter.h
@@ -92,6 +92,9 @@ class vtkDataArray;
 //    Eric Brugger, Mon Jul 28 15:33:34 PDT 2014
 //    Modified the class to work with avtDataRepresentation.
 //
+//    Kathleen Biagas, Tue Jun 9 09:37:12 MST 2015
+//    Changes to 'Replicate', added helper class for 'wrap' option.
+//
 // ****************************************************************************
 
 class avtIndexSelectFilter : public avtPluginDataTreeIterator
@@ -134,7 +137,11 @@ class avtIndexSelectFilter : public avtPluginDataTreeIterator
     virtual avtContract_p       ModifyContract(avtContract_p);
     virtual bool                FilterUnderstandsTransformedRectMesh();
 
-    virtual vtkDataSet *Replicate(vtkDataSet *in_ds, bool wrap[3] );
+    virtual void        Replicate(void);
+    vtkDataSet         *Replicate(int wrap, vtkDataSet *min_ds,
+                                            vtkDataSet *max_ds);
+    vtkDataSet         *Replicate(vtkRectilinearGrid *rgrid, bool wrap[3],
+                                  int dims_in[3], int max[3]);
 
     virtual vtkDataArray *GetCoordinates( vtkRectilinearGrid *grid,
                                           unsigned int coor);
@@ -142,6 +149,29 @@ class avtIndexSelectFilter : public avtPluginDataTreeIterator
     virtual void SetCoordinates( vtkRectilinearGrid *grid,
                                  vtkDataArray *coordinates,
                                  unsigned int coor);
+
+  private:
+    class LogicalSpaces
+    {
+        // helper class for 'wrap' option
+        public:
+            LogicalSpaces();
+            LogicalSpaces(int *mins);
+           ~LogicalSpaces();
+            void SetMins(int *);
+            void SetMaxs(int *);
+
+            bool HasMinAt(int idx, int _min);
+            bool MatchesMaxAt(int idx, int _max);
+            bool MatchesMins(int _min[3]);
+            int rank;
+            int block;
+            int mins[3];
+            int maxs[3];
+    };
+    int globalDims[6];
+    std::vector<LogicalSpaces> lspace;
+    void CopyData(vtkDataSet *, vtkDataSet *, int dims_in[3], int  dims_out[3]);
 };
 
 
diff --git a/src/plots/Label/CellLabels_body.C b/src/plots/Label/CellLabels_body.C
index 769e08d..d3476de 100644
--- a/src/plots/Label/CellLabels_body.C
+++ b/src/plots/Label/CellLabels_body.C
@@ -97,6 +97,9 @@
     //
     data = input->GetCellData()->GetArray(varname);
 
+    vtkUnsignedIntArray *logIndices = vtkUnsignedIntArray::SafeDownCast(
+        input->GetCellData()->GetArray("LabelFilterCellLogicalIndices"));
+
     if(useGlobalLabel)
     {
         debug3 << "avtLabelRenderer using global label." << endl;
@@ -293,6 +296,31 @@
             free(formatStringLast);
         }
     }
+    else if(logIndices != 0 && 
+            atts.GetLabelDisplayFormat() != LabelAttributes::Index)
+    {
+debug3 << "Labelling cells with logical Indices: " << endl;
+        const unsigned int *intptr = (const unsigned int*)logIndices->GetVoidPointer(0);
+        int nc = logIndices->GetNumberOfComponents();
+        if (nc == 2)
+        {
+            for(vtkIdType id = 0; id < nCells; id += skipIncrement)
+            {
+                BEGIN_LABEL
+                CREATE_LABEL(labelString, MAX_LABEL_SIZE, "%d,%d", intptr[id*2+0], intptr[id*2+1]);
+                END_LABEL
+            }
+        }
+        else
+        {
+            for(vtkIdType id = 0; id < nCells; id += skipIncrement)
+            {
+                BEGIN_LABEL
+                CREATE_LABEL(labelString, MAX_LABEL_SIZE, "%d,%d,%d", intptr[id*3+0], intptr[id*3+1], intptr[id*3+2]);
+                END_LABEL
+            }
+        }
+    }
     else if(originalCells != 0)
     {
 debug3 << "Labelling cells with original cell indices: "
diff --git a/src/plots/Label/NodeLabels_body.C b/src/plots/Label/NodeLabels_body.C
index efd41dc..ddef7ea 100644
--- a/src/plots/Label/NodeLabels_body.C
+++ b/src/plots/Label/NodeLabels_body.C
@@ -75,7 +75,7 @@
     // If the data array is empty then try and get the node numbers so we can
     // label the node numbers using the original node numbers.
     //
-    vtkUnsignedIntArray *originalNodes = 0;
+    vtkIntArray *originalNodes = 0;
     if(data == 0 && atts.GetVarType() == LabelAttributes::LABEL_VT_VECTOR_VAR)
     {
         data = input->GetPointData()->GetVectors();
@@ -88,18 +88,23 @@
         {
             debug3 << "avtLabelRenderer could not find LabelFilterOriginalNodeNumbers" << endl;
         }
-        else if(!tmpNodes->IsA("vtkUnsignedIntArray"))
+        else if(!tmpNodes->IsA("vtkIntArray"))
         {
             debug3 << "avtLabelRenderer found LabelFilterOriginalNodeNumbers but it "
-                      "was not a vtkUnsignedIntArray. It was a " << tmpNodes->GetClassName() << endl;
+                      "was not a vtkIntArray. It was a " << tmpNodes->GetClassName() << endl;
         }
         else
         {
             debug3 << "avtLabelRenderer setting originalNodes=data." << endl;
-            originalNodes = (vtkUnsignedIntArray *)tmpNodes;
+            originalNodes = (vtkIntArray *)tmpNodes;
         }
     }
 
+   vtkIntArray *logIndices = vtkIntArray::SafeDownCast(
+        input->GetPointData()->GetArray("LabelFilterNodeLogicalIndices"));
+
+
+
     if(data != 0)
     {
         int numElements = data->GetNumberOfTuples();
@@ -280,6 +285,37 @@ debug3 << "Labelling nodes with 3d tensor data" << endl;
             free(formatStringLast);
         }
     }
+    else if(logIndices != 0 &&
+          atts.GetLabelDisplayFormat() != LabelAttributes::Index)
+    {
+debug3 << "Labelling nodes with logical Indices: " << endl;
+        const int *intptr = (const int*)logIndices->GetVoidPointer(0);
+        int nc = logIndices->GetNumberOfComponents();
+        if (nc == 2)
+        {
+            for(vtkIdType id = 0; id < npts; id += skipIncrement)
+            {
+                BEGIN_LABEL
+                if (intptr[id*2+0] == -1)
+                    CREATE_LABEL(labelString, MAX_LABEL_SIZE, " ");
+                else
+                    CREATE_LABEL(labelString, MAX_LABEL_SIZE, "%d,%d", intptr[id*2+0], intptr[id*2+1]);
+                END_LABEL
+            }
+        }
+        else
+        {
+            for(vtkIdType id = 0; id < npts; id += skipIncrement)
+            {
+                BEGIN_LABEL
+                if (intptr[id*3+0] == -1)
+                    CREATE_LABEL(labelString, MAX_LABEL_SIZE, " ");
+                else
+                    CREATE_LABEL(labelString, MAX_LABEL_SIZE, "%d,%d,%d", intptr[id*3+0], intptr[id*3+1], intptr[id*3+2]);
+                END_LABEL
+            }
+        }
+    }
     else if(originalNodes != 0)
     {
 debug3 << "Labelling nodes with original node indices: "
diff --git a/src/plots/Label/avtLabelFilter.C b/src/plots/Label/avtLabelFilter.C
index 3783a6f..8b98cd9 100644
--- a/src/plots/Label/avtLabelFilter.C
+++ b/src/plots/Label/avtLabelFilter.C
@@ -66,12 +66,18 @@
 // Creation:   Wed Jan 7 14:58:26 PST 2004
 //
 // Modifications:
+//    Kathleen Biagas, Wed Jun  3 10:28:07 PDT 2015
+//    Added mayBeLogical, cellOrigin, nodeOrigin, to aid in calculating
+//    logical indices.
 //
 // ****************************************************************************
 
 avtLabelFilter::avtLabelFilter()
 {
     labelVariable = 0;
+    mayBeLogical = false;
+    cellOrigin = 0;
+    nodeOrigin = 0;
 }
 
 
@@ -178,6 +184,12 @@ print_array_names(vtkDataSet *inDS)
 //    Eric Brugger, Tue Aug 19 10:33:45 PDT 2014
 //    Modified the class to work with avtDataRepresentation.
 //
+//    Kathleen Biagas, Wed Jun  3 10:31:28 PDT 2015
+//    Create logical indices here, where each block can be considered
+//    separately, otherwise if block dimensions vary, the indices will be
+//    incorrect.
+//    (Logic mostly copied from NodeLabels_body.C and CellLabels_body.C)
+//
 // ****************************************************************************
 
 avtDataRepresentation *
@@ -276,10 +288,10 @@ avtLabelFilter::ExecuteData(avtDataRepresentation *inDR)
                    << endl;
             // Throw out the domain numbers.
             int n = originalNodeNumbers->GetNumberOfTuples();
-            vtkUnsignedIntArray *newNodeNos = vtkUnsignedIntArray::New();
+            vtkIntArray *newNodeNos = vtkIntArray::New();
             newNodeNos->SetName("LabelFilterOriginalNodeNumbers");
             newNodeNos->SetNumberOfTuples(n);
-            unsigned int *dest = (unsigned int*)newNodeNos->GetVoidPointer(0);
+            int *dest = (int*)newNodeNos->GetVoidPointer(0);
             int *src = (int*)originalNodeNumbers->GetVoidPointer(0);
             ++src;
             for(int i = 0; i < n; ++i, src+=2)
@@ -296,6 +308,108 @@ avtLabelFilter::ExecuteData(avtDataRepresentation *inDR)
     }
     visitTimer->StopTimer(stageTimer, "Creating LabelFilterOriginalNodeNumbers");
 
+
+    if(variableProbablyIsAMesh && needNodeArray)
+    {
+
+        vtkDataArray *sDims = inDS->GetFieldData()->
+            GetArray("avtOriginalStructuredDimensions");
+        if(mayBeLogical &&
+           sDims != 0 &&
+           sDims->IsA("vtkUnsignedIntArray") &&
+           sDims->GetNumberOfTuples() == 3)
+        {
+            stageTimer = visitTimer->StartTimer();
+debug3 << "LabelFilter: adding LabelFilterNodeLogicalIndices array" << endl;
+            //
+            // Figure out the first real index in x,y,z. This only matters if we
+            // have ghost zones and structured indices.
+            //
+            vtkDataArray *rDims = inDS->GetFieldData()->GetArray("avtRealDims");
+            unsigned int xbase = 0, ybase = 0, zbase = 0;
+            if(rDims != 0 &&
+               rDims->IsA("vtkIntArray") &&
+               rDims->GetNumberOfTuples() == 6)
+            {
+                const unsigned int *iptr = (const unsigned int *)rDims->GetVoidPointer(0);
+                xbase = iptr[0];
+                ybase = iptr[2];
+                zbase = iptr[4];
+            }
+            xbase -= nodeOrigin;
+            ybase -= nodeOrigin;
+            zbase -= nodeOrigin;
+
+
+            vtkIntArray *originalNodes = vtkIntArray::SafeDownCast(
+                outDS->GetPointData()->GetArray("LabelFilterOriginalNodeNumbers"));
+
+            int npts = outDS->GetNumberOfPoints();
+            //
+            // Add the node labels as structured indices.
+            //
+            const unsigned int *iptr = (const unsigned int *)sDims->GetVoidPointer(0);
+            int xdims = (int)iptr[0];
+            int ydims = (int)iptr[1];
+            int zdims = (int)iptr[2];
+
+            vtkIntArray *logicalIndices = vtkIntArray::New();
+            logicalIndices->SetNumberOfComponents(zdims == 1 ? 2 : 3);
+            logicalIndices->SetNumberOfTuples(npts);
+            logicalIndices->SetName("LabelFilterNodeLogicalIndices");
+            int *logI = (int*)logicalIndices->GetVoidPointer(0);
+
+            if(zdims == 1)
+            {
+                // 2D
+                for(vtkIdType id = 0; id < npts; ++id)
+                {
+                    int realNodeId = originalNodes->GetValue(id);
+                    if(realNodeId == -1)
+                    {
+                        logI[2*id+0] = -1;
+                        logI[2*id+1] = -1;
+                    }
+                    else
+                    {
+                        int y = (realNodeId / xdims) - ybase;
+                        int x = (realNodeId % xdims) - xbase;
+                        logI[2*id+0] = x;
+                        logI[2*id+1] = y;
+                    }
+                }
+            }
+            else
+            {
+                // 3D
+                int xydims = xdims * ydims;
+                for(vtkIdType id = 0; id < npts; ++id)
+                {
+                    int realNodeId = originalNodes->GetValue(id);
+                    if(realNodeId == -1)
+                    {
+                        logI[3*id+0] = -1;
+                        logI[3*id+1] = -1;
+                        logI[3*id+2] = -1;
+                    }
+                    else
+                    {
+                        int z = (realNodeId / xydims) - zbase;
+                        int offset = realNodeId % xydims;
+                        int y = (offset / xdims) - ybase;
+                        int x = (offset % xdims) - xbase;
+                        logI[3*id+0] = x;
+                        logI[3*id+1] = y;
+                        logI[3*id+2] = z;
+                    }
+                }
+            }
+            outDS->GetPointData()->AddArray(logicalIndices);
+            logicalIndices->Delete();
+            visitTimer->StopTimer(stageTimer, "Creating LabelFilterNodeLogicalIndices");
+        }
+    }
+
     //
     // If we have normals then quantize them so the float3 gets assigned to a
     // vector that closest matches a vector on a unit sphere. This way we can
@@ -361,8 +475,80 @@ avtLabelFilter::ExecuteData(avtDataRepresentation *inDR)
         //
         outDS->GetCellData()->AddArray(cellCenters);
         cellCenters->Delete();
+        visitTimer->StopTimer(stageTimer, "Creating LabelFilterCellCenters");
+
+
+        // Create logical index array
+        vtkDataArray *sDims = inDS->GetFieldData()->
+            GetArray("avtOriginalStructuredDimensions");
+        if(mayBeLogical &&
+           sDims != 0 &&
+           sDims->IsA("vtkUnsignedIntArray") &&
+           sDims->GetNumberOfTuples() == 3)
+        {
+           visitTimer->StartTimer();
+debug3 << "LabelFilter: adding LabelFilterCellLogicalIndices array" << endl;
+            vtkIdType nCells = inDS->GetNumberOfCells();
+            vtkUnsignedIntArray *originalCells = vtkUnsignedIntArray::SafeDownCast(
+                outDS->GetCellData()->GetArray("LabelFilterOriginalCellNumbers"));
+            const unsigned int *iptr = (const unsigned int *)sDims->GetVoidPointer(0);
+            unsigned int xdims = iptr[0]-1;
+            unsigned int ydims = iptr[1]-1;
+            unsigned int zdims = iptr[2]-1;
+            unsigned int xbase = 0, ybase = 0, zbase = 0;
+            vtkDataArray *rDims = inDS->GetFieldData()->
+                GetArray("avtRealDims");
+            if(rDims != 0 &&
+               rDims->IsA("vtkIntArray") &&
+               rDims->GetNumberOfTuples() == 6)
+            {
+                const int *iptr2 = (const int *)rDims->GetVoidPointer(0);
+                xbase = iptr2[0];
+                ybase = iptr2[2];
+                zbase = iptr2[4];
+            }
+            xbase -= cellOrigin;
+            ybase -= cellOrigin;
+            zbase -= cellOrigin;
+
+
+            vtkUnsignedIntArray *logicalIndices = vtkUnsignedIntArray::New();
+            logicalIndices->SetNumberOfComponents(zdims == 0? 2 : 3);
+            logicalIndices->SetNumberOfTuples(nCells);
+            logicalIndices->SetName("LabelFilterCellLogicalIndices");
+
+            unsigned int *li = (unsigned int *)logicalIndices->GetVoidPointer(0);
+            if(zdims == 0)
+            {
+                for(vtkIdType id = 0; id < nCells; ++id)
+                {
+                    unsigned int realCellId = originalCells->GetValue(id);
+                    unsigned int y = (realCellId / xdims) - ybase;
+                    unsigned int x = (realCellId % xdims) - xbase;
+                    li[2*id+0] = x;
+                    li[2*id+1] = y;
+                }
+            }
+            else
+            {
+                unsigned int xydims = xdims * ydims;
+                for(vtkIdType id = 0; id < nCells; ++id)
+                {
+                    unsigned int realCellId = originalCells->GetValue(id);
+                    unsigned int z = (realCellId / xydims) - zbase;
+                    unsigned int offset = realCellId % xydims;
+                    unsigned int y = (offset / xdims) - ybase;
+                    unsigned int x = (offset % xdims) - xbase;
+                    li[3*id+0] = x;
+                    li[3*id+1] = y;
+                    li[3*id+2] = z;
+                }
+            }
+            outDS->GetCellData()->AddArray(logicalIndices);
+            logicalIndices->Delete();
+            visitTimer->StopTimer(stageTimer, "Creating LabelFilterCellLogicalIndices");
+        }
     }
-    visitTimer->StopTimer(stageTimer, "Creating LabelFilterCellCenters");
 
 #define CELL_CENTER_HACK
 #ifdef CELL_CENTER_HACK
diff --git a/src/plots/Label/avtLabelFilter.h b/src/plots/Label/avtLabelFilter.h
index 2240a29..0a984e2 100644
--- a/src/plots/Label/avtLabelFilter.h
+++ b/src/plots/Label/avtLabelFilter.h
@@ -44,6 +44,7 @@
 #define AVT_Label_FILTER_H
 
 #include <avtDataTreeIterator.h>
+#include <vtkSystemIncludes.h>
 
 class vtkDataSet;
 
@@ -61,6 +62,10 @@ class vtkDataSet;
 //    Eric Brugger, Tue Aug 19 10:32:52 PDT 2014
 //    Modified the class to work with avtDataRepresentation.
 //
+//    Kathleen Biagas, Wed Jun  3 10:28:07 PDT 2015
+//    Added mayBeLogical, cellOrigin, nodeOrigin, to aid in calculating
+//    logical indices.
+//
 // ****************************************************************************
 
 class avtLabelFilter : public avtDataTreeIterator
@@ -74,6 +79,12 @@ class avtLabelFilter : public avtDataTreeIterator
                                   { return "Labelling values"; };
 
     void                      SetLabelVariable(const char *);
+    void                      SetMayBeLogical(bool val) 
+                                  { mayBeLogical = val; }
+    void                      SetCellOrigin(vtkIdType val) 
+                                  { cellOrigin = val; }
+    void                      SetNodeOrigin(vtkIdType val) 
+                                  { nodeOrigin = val; }
   protected:
     enum QuantizationRetval
     {
@@ -89,6 +100,9 @@ class avtLabelFilter : public avtDataTreeIterator
                                   vtkDataSet *outDS, bool isMesh);
 
     char                     *labelVariable;
+    bool                      mayBeLogical;
+    vtkIdType                 cellOrigin;
+    vtkIdType                 nodeOrigin;
 
     virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
     virtual void              UpdateDataObjectInfo(void);
diff --git a/src/plots/Label/avtLabelPlot.C b/src/plots/Label/avtLabelPlot.C
index f06b2c7..18027ed 100644
--- a/src/plots/Label/avtLabelPlot.C
+++ b/src/plots/Label/avtLabelPlot.C
@@ -308,6 +308,9 @@ avtLabelPlot::ApplyOperators(avtDataObject_p input)
 //   Jeremy Meredith, Tue Oct 14 14:00:06 EDT 2008
 //   Changed interface to SetMustCreatePolyData to allow either setting.
 //
+//   Kathleen Biagas, Wed Jun  3 10:26:59 PDT 2015
+//   Send information to avtLabelFilter so it can create logical indices.
+//
 // ****************************************************************************
 
 avtDataObject_p
@@ -409,6 +412,11 @@ avtLabelPlot::ApplyRenderingTransformation(avtDataObject_p input)
     if(labelFilter != NULL)
         delete labelFilter;
     labelFilter = new avtLabelFilter;
+    labelFilter->SetMayBeLogical(
+        atts.GetLabelDisplayFormat() == LabelAttributes::Natural || 
+        atts.GetLabelDisplayFormat() == LabelAttributes::LogicalIndex);
+    labelFilter->SetCellOrigin(dob->GetInfo().GetAttributes().GetCellOrigin());
+    labelFilter->SetNodeOrigin(dob->GetInfo().GetAttributes().GetNodeOrigin());
     labelFilter->SetInput(dob);
     dob = labelFilter->GetOutput();
     visitTimer->StopTimer(onefilter, "avtLabelFilter");
diff --git a/src/resources/help/en_US/relnotes2.9.2.html b/src/resources/help/en_US/relnotes2.9.2.html
new file mode 100644
index 0000000..b0fcc09
--- /dev/null
+++ b/src/resources/help/en_US/relnotes2.9.2.html
@@ -0,0 +1,57 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+  <meta http-equiv="Content-Language" content="en-us">
+  <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
+  <meta name="ProgId" content="FrontPage.Editor.Document">
+  <title>VisIt 2.9.2 Release Notes</title>
+</head>
+<body>
+
+<center><b><font size="6">VisIt 2.9.2 Release Notes</font></b></center>
+
+<p>Welcome to VisIt's release notes page. This page describes the important
+enhancements and bug-fixes that were added to this release.</p>
+
+<p><b>Sections</b></p>
+<ul>
+  <li><a href="#Bugs_fixed">Bug Fixes</a></li>
+  <li><a href="#Enhancements">Enhancements</a></li>
+  <li><a href="#Dev_changes">Changes for VisIt developers</a></li>
+</ul>
+
+<a name="Bugs_fixed"></a>
+<p><b><font size="4">Bugs fixed in version 2.9.2</font></b></p>
+<ul>
+  <li>Libsim functions <i>VisItSaveWindow</i>, <i>VisItExportDatabase</i>, and newer functions for adding and managing plots were only functional in batch mode. This update fixes the affected functions so they are also functional when VisIt interactively connects to the simulation.</li>
+  <li>The Fortran bindings for Libsim have been corrected so that the <i>visitsetupenv2</i> and <i>visitgetenv</i> functions are named appropriately.</li>
+  <li>Some small memory leaks in Libsim's batch mode have been corrected.</li>
+  <li>Plots which show polygonal data (such as Pseudocolor) were not showing the right data on the right cells for cell-centered fields for 2D datasets that contain line cells in addition to polygonal cells. </li>
+  <li>The <i>image_pan</i> parameters to the <i>XRay Image</i> query are no longer truncated to integer values.</li>
+  <li>The Label plot's display of logical indices was fixed for multi-block data with varying dimensions per block.</li>
+  <li>The IndexSelect operator's <i>Wrap</i> option will now work correctly for domain-decomposed data.</li>
+</ul>
+
+<a name="Enhancements"></a>
+<p><b><font size="4">Enhancements in version 2.9.2</font></b></p>
+<ul>
+  <li>The graphical user interface for the <i>XRay Image</i> query was updated to use the new view description as well as support the background intensity parameter.</li>
+  <li>The <i>XRay Image</i> query was enhanced to also output the path length field when outputting in rawfloat or bov format. The intensities will be in the files output00.bov - outputXX.bov and the path lengths will be in the files outputYY.bov - outputZZ.bov, where XX is nBins-1, YY is nBins and ZZ is 2*nBins-1.</li>
+  <li>The <i>XRay Image</i> query was enhanced to support output file familying. When file familying is enabled the output files are named outputXXXX.YY.EXT, where XXXX is the family number, YY is the bin number, and EXT is the output file type extension. Furthermore, when file familying is enabled, the query will not overwrite existing files. When file familying is disabled, the output file outputYY.EXT will be overwritten each time the query is run, consistent with the previous behavio [...]
+  <li>The <i>XRay Image</i> query was enhanced to support outputting the bounds of the ray bundle to a VTK file to aid in verification of the setup of the rays. The rays will be output to the file "ray_bounds.vtk". The setup can be verified by adding a Mesh plot of "mesh" from the file "ray_bounds.vtk" to the object to be xrayed. Outputting the bounds of the ray bundle is controlled with the <i>output_ray_bounds</i> setting to the query from the command line interface and with the <i>Out [...]
+  <li>Added support for FELINESEG type in Tecplot plugin.</li>
+  <li>The command line interface no longer starts automatically when the file "visitrc" exists in the users ".visit" directory. The command line interface will now start on-demand when the user brings up the Macros window or the Macros window is posted or set to be visible on startup.</li>
+  <li>The <i>Maintain view limits</i> setting on the <i>Advanced</i> tab in the View window is now also saved when saving settings, not just when saving a session.</li>
+</ul>
+
+<a name="Dev_changes"></a>
+<p><b><font size="4">Changes for VisIt developers in version 2.9.2</font></b></p>
+<ul>
+  <li>Support was added for using the CUDA profiler. The CUDA profiler is enabled with the "-nvprof" command line option, for example, to launch the serial engine with the CUDA profiler use "visit -nvprof engine_ser".</li>
+</ul>
+
+<p>Click the following link to view the release notes for the previous version
+of VisIt: <a href=relnotes2.9.1.html>2.9.1</a>.</p>
+</body>
+</html>
diff --git a/src/resources/hosts/llnl/host_llnl_rzgw_rzuseq.xml b/src/resources/hosts/llnl/host_llnl_rzgw_rzuseq.xml
index d0272ca..5540ea3 100644
--- a/src/resources/hosts/llnl/host_llnl_rzgw_rzuseq.xml
+++ b/src/resources/hosts/llnl/host_llnl_rzgw_rzuseq.xml
@@ -3,7 +3,7 @@
     <Field name="host" type="string">rzuseq</Field>
     <Field name="hostAliases" type="string">rzuseqlac#.llnl.gov rzuseqlac#</Field>
     <Field name="hostNickname" type="string">LLNL RZ uSeq</Field>
-    <Field name="directory" type="string">/g/g16/kbonnell/visit2.9.0b_BGQ</Field>
+    <Field name="directory" type="string">/usr/gapps/visit</Field>
     <Field name="useGateway" type="bool">true</Field>
     <Field name="gatewayHost" type="string">rzgw.llnl.gov</Field>
     <Field name="tunnelSSH" type="bool">true</Field>
diff --git a/src/resources/hosts/nersc/customlauncher b/src/resources/hosts/nersc/customlauncher
index df861bd..ee53bba 100644
--- a/src/resources/hosts/nersc/customlauncher
+++ b/src/resources/hosts/nersc/customlauncher
@@ -26,7 +26,7 @@ class JobSubmitter_aprun_NERSC(JobSubmitter_aprun):
         if self.launcher.nersc_host == "edison":
             return ["env", "DISPLAY=", "CRAY_ROOTFS=DSL", "/opt/cray/alps/default/bin/aprun"]
         else:
-            return ["env", "DISPLAY=", "CRAY_ROOTFS=DSL", "/usr/common/usg/altd/1.0/bin/aprun"]
+            return ["env", "DISPLAY=", "CRAY_ROOTFS=DSL", "/opt/cray/alps/5.2.1-2.0502.9072.13.1.gem/bin/aprun"]
 
 ###############################################################################
 # Class: JobSubmitter_mpiexec_NERSC
@@ -100,11 +100,11 @@ class JobSubmitter_qsub_NERSC(JobSubmitter_qsub):
         if self.launcher.nersc_host == "carver":
             return ["/usr/syscom/opt/torque/default/bin/qsub"]
         elif self.launcher.nersc_host == "edison":
-            return ["/opt/torque/default/bin/qsub"]
+            return ["/opt/torque/5.0.1/bin/qsub"]
         elif self.launcher.nersc_host == "grace":
-            return ["/usr/common/nsg/bin/qsub"]
+            return ["/opt/torque/5.0.1/bin/qsub"]
         elif self.launcher.nersc_host == "hopper":
-            return ["/opt/torque/default/bin/qsub"]
+            return ["/usr/common/nsg/bin/qsub"]
         else:
             print "Error: unknown NERSC host '%s'. Using default qsub executable." % self.launcher.nersc_host
             print "If this does not work, please contact consult at nersc.gov."
@@ -116,7 +116,7 @@ class JobSubmitter_qsub_NERSC(JobSubmitter_qsub):
         if self.launcher.nersc_host == "edison":
             return ["env", "CRAY_ROOTFS=DSL", "/opt/cray/alps/default/bin/aprun"]
         else:
-            return ["env", "CRAY_ROOTFS=DSL", "/usr/common/usg/altd/1.0/bin/aprun"]
+            return ["env", "CRAY_ROOTFS=DSL", "/opt/cray/alps/5.2.1-2.0502.9072.13.1.gem/bin/aprun"]
 
     def mpirun(self):
         # Currently, this method will only be called on Carver.
@@ -263,14 +263,14 @@ For more information about running VisIt at NERSC: http://www.nersc.gov/nusers/r
         # ----
             # Add GCC libraries to LD_LIBRARY_PATH
             ld_library_path = self.splitpaths(GETENV("LD_LIBRARY_PATH"))
-            added_ld_library_paths = ["/opt/gcc/4.8.2/snos/lib64"]
+            added_ld_library_paths = ["/opt/gcc/4.9.0/snos/lib64"]
             SETENV("LD_LIBRARY_PATH", self.joinpaths(added_ld_library_paths + ld_library_path))
 
             # Running the gui on Hopper or a serial engine on a login node are "verboten"
             if self.sectorname() == "grace" or self.sectorname() == "hopper":
                 if not self.generalArgs.env and self.generalArgs.exe_name == "gui" and not self.visitver[-1] =="b":
                     msg = """
-Do not run the VisIt GUI on Edison. Run it on your local workstation (preferred/best performance) or on Carver!
+Do not run the VisIt GUI on Hopper. Run it on your local workstation (preferred/best performance) or on Carver!
 
 For more information about running VisIt at NERSC: http://www.nersc.gov/nusers/resources/software/apps/visualization/visit/
 """
diff --git a/src/resources/hosts/umich/host_umich_flux.xml b/src/resources/hosts/umich/host_umich_flux.xml
old mode 100644
new mode 100755
index 3ddad00..7b6d3d8
--- a/src/resources/hosts/umich/host_umich_flux.xml
+++ b/src/resources/hosts/umich/host_umich_flux.xml
@@ -2,11 +2,14 @@
 <Object name="MachineProfile">
     <Field name="hostNickname" type="string">flux-login</Field>
     <Field name="host" type="string">flux-login.engin.umich.edu</Field>
+    <Field name="userName" type="string">notset</Field>
     <Field name="hostAliases" type="string">"nyx#### flux-login#"</Field>
     <Field name="directory" type="string">/home/software/rhel6/visit</Field>
     <Field name="shareOneBatchJob" type="bool">false</Field>
     <Field name="sshPortSpecified" type="bool">false</Field>
     <Field name="sshPort" type="int">22</Field>
+    <Field name="sshCommandSpecified" type="bool">false</Field>
+    <Field name="sshCommand" type="stringVector">"ssh" </Field>
     <Field name="useGateway" type="bool">false</Field>
     <Field name="gatewayHost" type="string"></Field>
     <Field name="clientHostDetermination" type="string">MachineName</Field>
@@ -122,7 +125,151 @@
         <Field name="XArguments" type="string"></Field>
         <Field name="launchXServers" type="bool">false</Field>
         <Field name="XDisplay" type="string">:%l</Field>
-        <Field name="profileName" type="string">"Parallel Batch (qsub)"</Field>
+        <Field name="profileName" type="string">"Parallel Batch (qsub/flux)"</Field>
+    </Object>
+    <Object name="LaunchProfile">
+        <Field name="timeout" type="int">480</Field>
+        <Field name="numProcessors" type="int">2</Field>
+        <Field name="numNodesSet" type="bool">true</Field>
+        <Field name="numNodes" type="int">1</Field>
+        <Field name="partitionSet" type="bool">true</Field>
+        <Field name="partition" type="string">fluxoe</Field>
+        <Field name="bankSet" type="bool">true</Field>
+        <Field name="bank" type="string"></Field>
+        <Field name="timeLimitSet" type="bool">true</Field>
+        <Field name="timeLimit" type="string">1:00:00</Field>
+        <Field name="launchMethodSet" type="bool">true</Field>
+        <Field name="launchMethod" type="string">qsub/mpirun</Field>
+        <Field name="forceStatic" type="bool">true</Field>
+        <Field name="forceDynamic" type="bool">false</Field>
+        <Field name="active" type="bool">false</Field>
+        <Field name="arguments" type="stringVector"></Field>
+        <Field name="parallel" type="bool">true</Field>
+        <Field name="launchArgsSet" type="bool">false</Field>
+        <Field name="launchArgs" type="string"></Field>
+        <Field name="sublaunchArgsSet" type="bool">false</Field>
+        <Field name="sublaunchArgs" type="string"></Field>
+        <Field name="sublaunchPreCmdSet" type="bool">false</Field>
+        <Field name="sublaunchPreCmd" type="string"></Field>
+        <Field name="sublaunchPostCmdSet" type="bool">false</Field>
+        <Field name="sublaunchPostCmd" type="string"></Field>
+        <Field name="machinefileSet" type="bool">false</Field>
+        <Field name="machinefile" type="string"></Field>
+        <Field name="visitSetsUpEnv" type="bool">false</Field>
+        <Field name="canDoHWAccel" type="bool">false</Field>
+        <Field name="GPUsPerNode" type="int">1</Field>
+        <Field name="XArguments" type="string"></Field>
+        <Field name="launchXServers" type="bool">false</Field>
+        <Field name="XDisplay" type="string">:%l</Field>
+        <Field name="profileName" type="string">"Parallel Batch (qsub/fluxoe)"</Field>
+    </Object>
+    <Object name="LaunchProfile">
+        <Field name="timeout" type="int">480</Field>
+        <Field name="numProcessors" type="int">2</Field>
+        <Field name="numNodesSet" type="bool">true</Field>
+        <Field name="numNodes" type="int">1</Field>
+        <Field name="partitionSet" type="bool">true</Field>
+        <Field name="partition" type="string">fluxm</Field>
+        <Field name="bankSet" type="bool">true</Field>
+        <Field name="bank" type="string"></Field>
+        <Field name="timeLimitSet" type="bool">true</Field>
+        <Field name="timeLimit" type="string">1:00:00</Field>
+        <Field name="launchMethodSet" type="bool">true</Field>
+        <Field name="launchMethod" type="string">qsub/mpirun</Field>
+        <Field name="forceStatic" type="bool">true</Field>
+        <Field name="forceDynamic" type="bool">false</Field>
+        <Field name="active" type="bool">false</Field>
+        <Field name="arguments" type="stringVector"></Field>
+        <Field name="parallel" type="bool">true</Field>
+        <Field name="launchArgsSet" type="bool">false</Field>
+        <Field name="launchArgs" type="string"></Field>
+        <Field name="sublaunchArgsSet" type="bool">false</Field>
+        <Field name="sublaunchArgs" type="string"></Field>
+        <Field name="sublaunchPreCmdSet" type="bool">false</Field>
+        <Field name="sublaunchPreCmd" type="string"></Field>
+        <Field name="sublaunchPostCmdSet" type="bool">false</Field>
+        <Field name="sublaunchPostCmd" type="string"></Field>
+        <Field name="machinefileSet" type="bool">false</Field>
+        <Field name="machinefile" type="string"></Field>
+        <Field name="visitSetsUpEnv" type="bool">false</Field>
+        <Field name="canDoHWAccel" type="bool">false</Field>
+        <Field name="GPUsPerNode" type="int">1</Field>
+        <Field name="XArguments" type="string"></Field>
+        <Field name="launchXServers" type="bool">false</Field>
+        <Field name="XDisplay" type="string">:%l</Field>
+        <Field name="profileName" type="string">"Parallel Batch (qsub/fluxm)"</Field>
+    </Object>
+    <Object name="LaunchProfile">
+        <Field name="timeout" type="int">480</Field>
+        <Field name="numProcessors" type="int">2</Field>
+        <Field name="numNodesSet" type="bool">true</Field>
+        <Field name="numNodes" type="int">1</Field>
+        <Field name="partitionSet" type="bool">true</Field>
+        <Field name="partition" type="string">fluxod</Field>
+        <Field name="bankSet" type="bool">true</Field>
+        <Field name="bank" type="string"></Field>
+        <Field name="timeLimitSet" type="bool">true</Field>
+        <Field name="timeLimit" type="string">1:00:00</Field>
+        <Field name="launchMethodSet" type="bool">true</Field>
+        <Field name="launchMethod" type="string">qsub/mpirun</Field>
+        <Field name="forceStatic" type="bool">true</Field>
+        <Field name="forceDynamic" type="bool">false</Field>
+        <Field name="active" type="bool">false</Field>
+        <Field name="arguments" type="stringVector"></Field>
+        <Field name="parallel" type="bool">true</Field>
+        <Field name="launchArgsSet" type="bool">false</Field>
+        <Field name="launchArgs" type="string"></Field>
+        <Field name="sublaunchArgsSet" type="bool">false</Field>
+        <Field name="sublaunchArgs" type="string"></Field>
+        <Field name="sublaunchPreCmdSet" type="bool">false</Field>
+        <Field name="sublaunchPreCmd" type="string"></Field>
+        <Field name="sublaunchPostCmdSet" type="bool">false</Field>
+        <Field name="sublaunchPostCmd" type="string"></Field>
+        <Field name="machinefileSet" type="bool">false</Field>
+        <Field name="machinefile" type="string"></Field>
+        <Field name="visitSetsUpEnv" type="bool">false</Field>
+        <Field name="canDoHWAccel" type="bool">false</Field>
+        <Field name="GPUsPerNode" type="int">1</Field>
+        <Field name="XArguments" type="string"></Field>
+        <Field name="launchXServers" type="bool">false</Field>
+        <Field name="XDisplay" type="string">:%l</Field>
+        <Field name="profileName" type="string">"Parallel Batch (qsub/fluxod)"</Field>
+    </Object>
+    <Object name="LaunchProfile">
+        <Field name="timeout" type="int">480</Field>
+        <Field name="numProcessors" type="int">2</Field>
+        <Field name="numNodesSet" type="bool">true</Field>
+        <Field name="numNodes" type="int">1</Field>
+        <Field name="partitionSet" type="bool">true</Field>
+        <Field name="partition" type="string">fluxg</Field>
+        <Field name="bankSet" type="bool">true</Field>
+        <Field name="bank" type="string"></Field>
+        <Field name="timeLimitSet" type="bool">true</Field>
+        <Field name="timeLimit" type="string">1:00:00</Field>
+        <Field name="launchMethodSet" type="bool">true</Field>
+        <Field name="launchMethod" type="string">qsub/mpirun</Field>
+        <Field name="forceStatic" type="bool">true</Field>
+        <Field name="forceDynamic" type="bool">false</Field>
+        <Field name="active" type="bool">false</Field>
+        <Field name="arguments" type="stringVector"></Field>
+        <Field name="parallel" type="bool">true</Field>
+        <Field name="launchArgsSet" type="bool">false</Field>
+        <Field name="launchArgs" type="string"></Field>
+        <Field name="sublaunchArgsSet" type="bool">false</Field>
+        <Field name="sublaunchArgs" type="string"></Field>
+        <Field name="sublaunchPreCmdSet" type="bool">false</Field>
+        <Field name="sublaunchPreCmd" type="string"></Field>
+        <Field name="sublaunchPostCmdSet" type="bool">false</Field>
+        <Field name="sublaunchPostCmd" type="string"></Field>
+        <Field name="machinefileSet" type="bool">false</Field>
+        <Field name="machinefile" type="string"></Field>
+        <Field name="visitSetsUpEnv" type="bool">false</Field>
+        <Field name="canDoHWAccel" type="bool">false</Field>
+        <Field name="GPUsPerNode" type="int">1</Field>
+        <Field name="XArguments" type="string"></Field>
+        <Field name="launchXServers" type="bool">false</Field>
+        <Field name="XDisplay" type="string">:%l</Field>
+        <Field name="profileName" type="string">"Parallel Batch (qsub/fluxg)"</Field>
     </Object>
     <Field name="activeProfile" type="int">1</Field>
 </Object>
diff --git a/src/sim/V2/lib/VisItControlInterface_V2.c b/src/sim/V2/lib/VisItControlInterface_V2.c
index d8a4680..351368f 100644
--- a/src/sim/V2/lib/VisItControlInterface_V2.c
+++ b/src/sim/V2/lib/VisItControlInterface_V2.c
@@ -232,6 +232,7 @@ static void        (*visit_slave_process_callback)(void) = NULL;
 static void        (*visit_slave_process_callback2)(void *) = NULL;
 static void         *visit_slave_process_callback2_data = NULL;
 static void         *visit_communicator = NULL;
+static int           visit_batch_mode = 0;
 
 /*******************************************************************************
  *******************************************************************************
@@ -1165,6 +1166,8 @@ static int CreateEngine(int batch)
                                       VISIT_ERROR);
                     return VISIT_ERROR;
                 }
+
+                visit_batch_mode = 1;
             }
             else
             {
@@ -3492,6 +3495,9 @@ int VisItSaveWindow(const char *filename, int w, int h, int format)
     {
         LIBSIM_MESSAGE("Calling visit_save_window");
         ret = (*callbacks->control.save_window)(engine, filename, w, h, format);
+        /* Synchronize in case we we're connected interactively. */
+        if(visit_batch_mode == 0 && visit_sync_enabled)
+            VisItSynchronize();
     }
     LIBSIM_API_LEAVE(VisItSaveWindow);
     return ret;
@@ -4233,9 +4239,12 @@ VisItExportDatabase(const char *filename, const char *format, visit_handle varNa
 
     LIBSIM_API_ENTER(VisItExportDatabase);
     /* Make sure the function exists before using it. */
-    if (engine && callbacks != NULL && callbacks->control.set_operator_options)
+    if (engine && callbacks != NULL && callbacks->control.exportdatabase)
     {
         retval = (*callbacks->control.exportdatabase)(engine, filename, format, varNames);
+        /* Synchronize in case we we're connected interactively. */
+        if(visit_batch_mode == 0 && visit_sync_enabled)
+            VisItSynchronize();
     }
     LIBSIM_API_LEAVE(VisItExportDatabase)
     return retval;
@@ -4261,7 +4270,7 @@ VisItRestoreSession(const char *filename)
 
     LIBSIM_API_ENTER(VisItExportDatabase);
     /* Make sure the function exists before using it. */
-    if (engine && callbacks != NULL && callbacks->control.set_operator_options)
+    if (engine && callbacks != NULL && callbacks->control.restoresession)
     {
         retval = (*callbacks->control.restoresession)(engine, filename);
     }
diff --git a/src/sim/V2/lib/VisItFortran.h b/src/sim/V2/lib/VisItFortran.h
index c9d5790..726f710 100644
--- a/src/sim/V2/lib/VisItFortran.h
+++ b/src/sim/V2/lib/VisItFortran.h
@@ -18,6 +18,9 @@
 #ifdef _INCLUDE_HPUX_SOURCE     /* HPUX */
 #define F77_ID(x_, x, X)  x
 #endif
+#ifdef VISIT_BLUE_GENE_Q        /* BlueGene/Q */
+#define F77_ID(x_, x, X)  x
+#endif
 #ifndef F77_ID
 #define F77_ID(x_, x, X)  x_
 #endif
diff --git a/src/sim/V2/lib/visitfortransimV2interface.c b/src/sim/V2/lib/visitfortransimV2interface.c
index d96ec20..a0c2596 100644
--- a/src/sim/V2/lib/visitfortransimV2interface.c
+++ b/src/sim/V2/lib/visitfortransimV2interface.c
@@ -209,6 +209,8 @@ f_visit_internal_InstallCallbacks(void)
 #define F_VISITSETPARALLEL          F77_ID(visitsetparallel_,visitsetparallel,VISITSETPARALLEL)
 #define F_VISITSETPARALLELRANK      F77_ID(visitsetparallelrank_,visitsetparallelrank,VISITSETPARALLELRANK)
 #define F_VISITSETUPENV             F77_ID(visitsetupenv_,visitsetupenv,VISITSETUPENV)
+#define F_VISITSETUPENV2            F77_ID(visitsetupenv2_,visitsetupenv2,VISITSETUPENV2)
+#define F_VISITGETENV               F77_ID(visitgetenv_,visitgetenv,VISITGETENV)
 #define F_VISITSYNCHRONIZE          F77_ID(visitsynchronize_,visitsynchronize,VISITSYNCHRONIZE)
 #define F_VISITTIMESTEPCHANGED      F77_ID(visittimestepchanged_,visittimestepchanged,VISITTIMESTEPCHANGED)
 #define F_VISITUPDATEPLOTS          F77_ID(visitupdateplots_,visitupdateplots,VISITUPDATEPLOTS)
diff --git a/src/sim/V2/runtime/SimEngine.C b/src/sim/V2/runtime/SimEngine.C
index 0acf62e..afeb3c0 100644
--- a/src/sim/V2/runtime/SimEngine.C
+++ b/src/sim/V2/runtime/SimEngine.C
@@ -170,6 +170,21 @@ SimEngine::SimEngine() : Engine()
 
 SimEngine::~SimEngine()
 {
+#ifdef SIMV2_VIEWER_INTEGRATION
+    if(!viewerInitialized)
+    {
+        delete ViewerBase::GetPlotFactory();
+        delete ViewerBase::GetOperatorFactory();
+
+        delete ViewerBase::GetViewerProperties();
+        delete ViewerBase::GetViewerState();
+        delete ViewerBase::GetViewerMethods();
+        delete ViewerBase::GetViewerStateManager();
+        delete ViewerBase::GetViewerMessaging();
+        delete ViewerBase::GetViewerFileServer();
+        delete ViewerBase::GetViewerEngineManager();
+    }
+#endif
 }
 
 // ****************************************************************************
@@ -464,28 +479,29 @@ SimEngine::ExportDatabase(const std::string &filename, const std::string &format
                           const stringVector &vars)
 {
     bool retval = false;
-#ifdef SIMV2_VIEWER_INTEGRATION
-    if(viewerInitialized)
+
+    // Get the plugin id from the input format, which could be an id or a name.
+    std::string id, name;
+    for(int i = 0; i < GetNetMgr()->GetDatabasePluginManager()->GetNAllPlugins(); ++i)
     {
-        // Get the plugin id from the input format, which could be an id or a name.
-        std::string id, name;
-        for(int i = 0; i < GetNetMgr()->GetDatabasePluginManager()->GetNAllPlugins(); ++i)
-        {
-            std::string thisID(GetNetMgr()->GetDatabasePluginManager()->GetAllID(i));
-            if(thisID == format)
-                id = thisID;
-            if(GetNetMgr()->GetDatabasePluginManager()->GetPluginName(thisID) == format)
-                id = thisID;
-        }
-        if(id.empty())
-            return false;
-        name = GetNetMgr()->GetDatabasePluginManager()->GetPluginName(id);
+        std::string thisID(GetNetMgr()->GetDatabasePluginManager()->GetAllID(i));
+        if(thisID == format)
+            id = thisID;
+        if(GetNetMgr()->GetDatabasePluginManager()->GetPluginName(thisID) == format)
+            id = thisID;
+    }
+    if(id.empty())
+        return false;
+    name = GetNetMgr()->GetDatabasePluginManager()->GetPluginName(id);
 
-        std::string dName(FileFunctions::Dirname(filename));
-        std::string fName(FileFunctions::Basename(filename));
-        if(dName.empty() || dName == ".")
-            dName = FileFunctions::GetCurrentWorkingDirectory();
+    std::string dName(FileFunctions::Dirname(filename));
+    std::string fName(FileFunctions::Basename(filename));
+    if(dName.empty() || dName == ".")
+        dName = FileFunctions::GetCurrentWorkingDirectory();
 
+#ifdef SIMV2_VIEWER_INTEGRATION
+    if(viewerInitialized)
+    {
         ExportDBAttributes *atts = GetViewerState()->GetExportDBAttributes();
         atts->SetAllTimes(false);
         atts->SetDb_type(name);
@@ -498,6 +514,24 @@ SimEngine::ExportDatabase(const std::string &filename, const std::string &format
         GetViewerMethods()->ExportDatabase();
         retval = true;
     }
+    else
+    {
+#endif
+        // Send a message to the viewer indicating we want it to export.
+        char tmp[2048];
+        SNPRINTF(tmp, 2048, "ExportDatabase:%s:%s:%s:%s:",
+            name.c_str(), id.c_str(), dName.c_str(), fName.c_str());
+        std::string cmd(tmp);
+        for(size_t i = 0; i < vars.size(); ++i)
+        {
+            cmd.append(vars[i]);
+            if(i < vars.size()-1)
+                cmd.append(":");
+        }
+        SimulationInitiateCommand(cmd);
+        retval = true;
+#ifdef SIMV2_VIEWER_INTEGRATION
+    }
 #endif
     return retval;
 }
@@ -545,6 +579,15 @@ SimEngine::RestoreSession(const std::string &filename)
         }
         ENDTRY
     }
+    else
+    {
+#endif
+        std::string cmd("RestoreSession:");
+        cmd.append(filename);
+        SimulationInitiateCommand(cmd);
+        retval = true;
+#ifdef SIMV2_VIEWER_INTEGRATION
+    }
 #endif
     return retval;
 }
@@ -595,15 +638,15 @@ SimEngine::SaveWindow(const std::string &filename, int w, int h, int format)
         else
             fmt = SaveWindowAttributes::TIFF;
 
+        std::string dName(FileFunctions::Dirname(filename));
+        std::string fName(FileFunctions::Basename(filename));
+        if(dName.empty() || dName == ".")
+            dName = FileFunctions::GetCurrentWorkingDirectory();
+
 #ifdef SIMV2_VIEWER_INTEGRATION
         // Viewer based method.
         if(viewerInitialized)
         {
-            std::string dName(FileFunctions::Dirname(filename));
-            std::string fName(FileFunctions::Basename(filename));
-            if(dName.empty() || dName == ".")
-                dName = FileFunctions::GetCurrentWorkingDirectory();
-
             SaveWindowAttributes *swa = GetViewerState()->GetSaveWindowAttributes();
             swa->SetFileName(fName);
             swa->SetOutputToCurrentDirectory(false);
@@ -620,6 +663,18 @@ SimEngine::SaveWindow(const std::string &filename, int w, int h, int format)
 
             retval = true;
         }
+        else
+        {
+#endif
+            // Send a message to the viewer indicating we want it to save an image.
+            std::string f(SaveWindowAttributes::FileFormat_ToString(fmt));
+            char cmd[2048];
+            SNPRINTF(cmd, 2048, "SaveWindow:%s:%s:%d:%d:%s",
+                dName.c_str(), fName.c_str(), w, h, f.c_str());
+            SimulationInitiateCommand(cmd);
+            retval = true;
+#ifdef SIMV2_VIEWER_INTEGRATION
+        }
 #endif
     }
     CATCHALL
@@ -681,6 +736,16 @@ SimEngine::AddPlot(const std::string &plotType, const std::string &var)
             GetViewerMethods()->AddPlot(plotIndex, var);
             retval = true;
         }
+        else
+        {
+#endif
+            // Send the viewer a message to add  plot.
+            char cmd[200];
+            SNPRINTF(cmd, 200, "AddPlot:%s:%s", plotType.c_str(), var.c_str());
+            SimulationInitiateCommand(cmd);
+            retval = true;
+#ifdef SIMV2_VIEWER_INTEGRATION
+        }
 #endif
     }
     CATCHALL
@@ -732,12 +797,12 @@ SimEngine::AddOperator(const std::string &operatorType, bool applyToAll)
     bool retval = false;
     TRY
     {
+        int operatorIndex = GetNetMgr()->GetOperatorPluginManager()->GetEnabledIndex(id);
+
 #ifdef SIMV2_VIEWER_INTEGRATION
         // Viewer based method.
         if(viewerInitialized)
         {
-            int operatorIndex = GetNetMgr()->GetOperatorPluginManager()->GetEnabledIndex(id);
-
             bool applyOperatorSave = GetViewerState()->GetGlobalAttributes()->GetApplyOperator();
             GetViewerState()->GetGlobalAttributes()->SetApplyOperator(applyToAll != 0);
 
@@ -747,6 +812,16 @@ SimEngine::AddOperator(const std::string &operatorType, bool applyToAll)
             GetViewerState()->GetGlobalAttributes()->SetApplyOperator(applyOperatorSave);
             retval = true;
         }
+        else
+        {
+#endif
+            // Send the viewer a message to add an operator.
+            char cmd[200];
+            SNPRINTF(cmd, 200, "AddOperator:%s:%d", operatorType.c_str(), applyToAll?1:0);
+            SimulationInitiateCommand(cmd);
+            retval = true;
+#ifdef SIMV2_VIEWER_INTEGRATION
+        }
 #endif
     }
     CATCHALL
@@ -792,6 +867,13 @@ SimEngine::DrawPlots()
             GetViewerMethods()->DrawPlots();
             retval = true;
         }
+        else
+        {
+#endif
+            SimulationInitiateCommand("DrawPlots");
+            retval = true;
+#ifdef SIMV2_VIEWER_INTEGRATION
+        }
 #endif
     }
     CATCHALL
@@ -836,6 +918,13 @@ SimEngine::DeleteActivePlots()
             GetViewerMethods()->DeleteActivePlots();
             retval = true;
         }
+        else
+        {
+#endif
+            SimulationInitiateCommand("DeleteActivePlots");
+            retval = true;
+#ifdef SIMV2_VIEWER_INTEGRATION
+        }
 #endif
     }
     CATCHALL
@@ -888,6 +977,20 @@ SimEngine::SetActivePlots(const int *ids, int nids)
             }
             retval = true;
         }
+        else
+        {
+#endif
+            std::string cmd("SetActivePlots");
+            char tmp[10];
+            for(int i = 0; i < nids; ++i)
+            {
+                SNPRINTF(tmp, 10, ":%d", ids[i]);
+                cmd.append(tmp);
+            }
+            SimulationInitiateCommand(cmd);
+            retval = true;
+#ifdef SIMV2_VIEWER_INTEGRATION
+        }
 #endif
     }
     CATCHALL
@@ -1225,6 +1328,12 @@ bool SimEngine::SetPlotOptions(const std::string &fieldName,
                 }
             }
         }
+        else
+        {
+#endif
+            debug5 << "SimEngine::SetPlotOptions is just implemented for batch mode." << endl;
+#ifdef SIMV2_VIEWER_INTEGRATION
+        }
 #endif
     }
     CATCHALL
@@ -1331,6 +1440,12 @@ bool SimEngine::SetOperatorOptions(const std::string &fieldName,
                 }
             }
         }
+        else
+        {
+#endif
+            debug5 << "SimEngine::SetOperatorOptions is just implemented for batch mode." << endl;
+#ifdef SIMV2_VIEWER_INTEGRATION
+        }
 #endif
     }
     CATCHALL
diff --git a/src/sim/V2/runtime/VisItControlInterfaceRuntime.C b/src/sim/V2/runtime/VisItControlInterfaceRuntime.C
index 568ff11..d014c5f 100644
--- a/src/sim/V2/runtime/VisItControlInterfaceRuntime.C
+++ b/src/sim/V2/runtime/VisItControlInterfaceRuntime.C
@@ -813,7 +813,10 @@ simv2_exportdatabase(void *e, const char *filename, const char *format,
             if(simv2_NameList_getName(names, i, &var) == VISIT_OKAY)
             {
                 if(var != NULL)
-                     varNames.push_back(var);
+                {
+                    varNames.push_back(var);
+                    free(var); // simv2_NameList_getName used malloc.
+                }
             }
         }
     }
diff --git a/src/svn_bin/build_visit b/src/svn_bin/build_visit
index 78581b8..e276366 100755
--- a/src/svn_bin/build_visit
+++ b/src/svn_bin/build_visit
@@ -52,7 +52,7 @@
 #5  bv_<module>_depends_on [not implemented yet], also may be removed in favor of xml structure
 #6. bv_<module>_build builds the module
 
-export VISIT_VERSION=${VISIT_VERSION:-"2.9.1"}
+export VISIT_VERSION=${VISIT_VERSION:-"2.9.2"}
 
 ####
 # Trunk:
diff --git a/src/svn_bin/build_visit_BGQ b/src/svn_bin/build_visit_BGQ
index 3dc1818..8efb380 100755
--- a/src/svn_bin/build_visit_BGQ
+++ b/src/svn_bin/build_visit_BGQ
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-VISIT_VERSION="2.9.0"
+VISIT_VERSION="2.9.1"
 
 ################################################################################
 ## DEFAULT VALUES FOR VARIABLES
diff --git a/src/svn_bin/bv_support/bv_cgns.sh b/src/svn_bin/bv_support/bv_cgns.sh
index 4d94e10..814f77b 100644
--- a/src/svn_bin/bv_support/bv_cgns.sh
+++ b/src/svn_bin/bv_support/bv_cgns.sh
@@ -101,8 +101,8 @@ function apply_cgns_321_darwin_patch
 {
    patch -p0 << \EOF
 diff -c cgnslib_3.2.1/src/configure.orig cgnslib_3.2.1/src/configure
-*** cgnslib_3.2.1/src/configure.orig	2014-12-17 15:31:56.000000000 -0800
---- cgnslib_3.2.1/src/configure	2014-12-17 15:33:22.000000000 -0800
+*** cgnslib_3.2.1/src/configure.orig	2015-04-27 15:11:36.000000000 -0700
+--- cgnslib_3.2.1/src/configure	2015-04-27 14:24:48.000000000 -0700
 ***************
 *** 2324,2333 ****
   echo "$ac_t""$shared" 1>&6
@@ -153,6 +153,61 @@ diff -c cgnslib_3.2.1/src/configure.orig cgnslib_3.2.1/src/configure
     fi
   fi
   
+***************
+*** 2490,2495 ****
+--- 2490,2496 ----
+  if test "${with_zlib+set}" = set; then
+    withval="$with_zlib"
+    withzlib=$withval
++   ZLIBLIB=$withval
+  else
+    withzlib="no"
+  fi
+***************
+*** 2499,2504 ****
+--- 2500,2506 ----
+    else
+      H5NEEDZLIB=1
+      if test -z "$withzlib" || test "$withzlib" = "yes"; then
++       ZLIBLIB=""
+        zlibdir=""
+        echo "$ac_t""yes" 1>&6
+        ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'` 
+
+EOF
+   if [[ $? != 0 ]] ; then
+      return 1
+   fi
+
+   return 0
+}
+
+function apply_cgns_321_zlib_patch
+{
+   patch -p0 << \EOF
+diff -c cgnslib_3.2.1/src/configure.orig cgnslib_3.2.1/src/configure
+*** cgnslib_3.2.1/src/configure.orig	2013-06-19 21:04:00.000000000 -0700
+--- cgnslib_3.2.1/src/configure	2015-04-27 15:03:16.000000000 -0700
+***************
+*** 2490,2495 ****
+--- 2490,2496 ----
+  if test "${with_zlib+set}" = set; then
+    withval="$with_zlib"
+    withzlib=$withval
++   ZLIBLIB=$withval
+  else
+    withzlib="no"
+  fi
+***************
+*** 2499,2504 ****
+--- 2500,2506 ----
+    else
+      H5NEEDZLIB=1
+      if test -z "$withzlib" || test "$withzlib" = "yes"; then
++       ZLIBLIB=""
+        zlibdir=""
+        echo "$ac_t""yes" 1>&6
+        ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'`
 EOF
    if [[ $? != 0 ]] ; then
       return 1
@@ -163,9 +218,13 @@ EOF
 
 function apply_cgns_321_patch
 {
+
    if [[ "$OPSYS" == "Darwin" ]] ; then
        info "Applying OS X patch . . ."
        apply_cgns_321_darwin_patch
+   else 
+       info "Applying patch . . ."
+       apply_cgns_321_zlib_patch
    fi
 
    return $?
@@ -194,6 +253,11 @@ function apply_cgns_patch
 # Kevin Griffin, Fri Jan 16 10:28:21 PST 2015                                 #
 # Fixed the --with-szip and --with-zlib to specify the full path to the       #
 # library for both OSX and linux                                              #
+#                                                                             #
+# Kevin Griffin, Mon Apr 27 15:20:43 PDT 2015                                 #
+# Patched the configure file to use the zlib library specified in the         #
+# --with-zlib option.                                                         #
+#                                                                             #
 # *************************************************************************** #
 
 function build_cgns
diff --git a/src/svn_bin/filter_link_commands_BGQ.sh b/src/svn_bin/filter_link_commands_BGQ.sh
index e420a1b..c1c69af 100644
--- a/src/svn_bin/filter_link_commands_BGQ.sh
+++ b/src/svn_bin/filter_link_commands_BGQ.sh
@@ -58,6 +58,34 @@ do
     fi
 done
 
+# Filter the osmesavtktest link line so it will not include X11 libraries. CMake
+# is adding them even though we don't want them. Also get rid of extra static/dynamic
+# link keywords that prevent the linker from making a good static executable.
+for target in osmesavtktest_ser.dir osmesavtktest_par.dir
+do
+    edir="tools/diagnostics/osmesatest/CMakeFiles/$target"
+    if test -e "$edir/link.txt" ; then
+        sed "s/-lX11//g" $edir/link.txt > $edir/link1.txt
+        sed "s/-lXext//g" $edir/link1.txt > $edir/link2.txt
+        sed "s/-Wl,-Bstatic//g" $edir/link2.txt > $edir/link3.txt
+        sed "s/-Wl,-Bdynamic//g" $edir/link3.txt > $edir/link4.txt
+        rm -f $edir/link1.txt $edir/link2.txt $edir/link3.txt
+        mv $edir/link4.txt $edir/link.txt
+    else
+        echo "***** DID NOT SEE: $edir/link.txt   pwd=`pwd`"
+    fi
+    if test -e "$edir/relink.txt" ; then
+        sed "s/-lX11//g" $edir/relink.txt > $edir/relink1.txt
+        sed "s/-lXext//g" $edir/relink1.txt > $edir/relink2.txt
+        sed "s/-Wl,-Bstatic//g" $edir/relink2.txt > $edir/relink3.txt
+        sed "s/-Wl,-Bdynamic//g" $edir/relink3.txt > $edir/relink4.txt
+        rm -f $edir/relink1.txt $edir/relink2.txt $edir/relink3.txt
+        mv $edir/relink4.txt $edir/relink.txt
+    else
+        echo "***** DID NOT SEE: $edir/relink.txt   pwd=`pwd`"
+    fi
+done
+
 exit 0
 
 
diff --git a/src/svn_bin/visit-build-open b/src/svn_bin/visit-build-open
index 5275c4a..7fe5720 100755
--- a/src/svn_bin/visit-build-open
+++ b/src/svn_bin/visit-build-open
@@ -134,6 +134,9 @@
 #   Eric Brugger, Thu Feb 19 09:05:16 PST 2015
 #   I removed redsky. I modified many of the builds to use cmake 3.0.2.
 #
+#   Kathleen Biagas, Thu May  7 09:33:43 PDT 2015
+#   Added build for vulcan (copied from rzuseq).
+#
 #-----------------------------------------------------------------------
 
 test=no
@@ -183,6 +186,7 @@ rzzeus=true
 rzuseq=false
 carver=true
 glory=false
+vulcan=false
 
 dist=undefined
 
@@ -277,6 +281,14 @@ do
          glory=true
          shift
          ;;
+      -vulcan)
+         vulcan=false
+         shift
+         ;;
+      +vulcan)
+         vulcan=true
+         shift
+         ;;
       -d)
          dist=$2
          shift 2
@@ -791,10 +803,81 @@ then
    fi
 fi
 
+
+#
+# Build on vulcan.
+#
+rm -f vulcan
+cat <<EOF > vulcan
+#!/bin/sh
+if test ! -d /usr/tmp/$user ; then
+   mkdir /usr/tmp/$user
+fi
+if test ! -d /usr/tmp/$user/vulcan ; then
+   mkdir /usr/tmp/$user/vulcan
+fi
+rm -rf /usr/tmp/$user/vulcan/visitbuild
+mkdir /usr/tmp/$user/vulcan/visitbuild
+mv vulcan_$dist.tar.gz /usr/tmp/$user/vulcan/visitbuild/$dist.tar.gz
+cd /usr/tmp/$user/vulcan/visitbuild
+gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
+cd $dist/src
+ver=\`cat VERSION\`
+ver2=\`echo \$ver | tr "." "_"\`
+cd ..
+# **NOTE** We do 2 in-source builds because of a weird problem with cmake
+# Make a copy of src called login_build
+cp -R src login_build
+# Rename src to compute_build
+mv src compute_build
+# Rename the data directory since the data programs won't run.
+mv data .data
+# install dir
+mkdir visit\${ver2}.linux-ppc64
+bgqinstdir=\`pwd\`/visit\${ver2}.linux-ppc64
+# Build for compute node, engine-only version
+cd compute_build
+/usr/gapps/visit/thirdparty_static/2.9.0/cmake/3.0.2/linux-ppc64_gcc-4.4_BGQ/bin/cmake -DVISIT_CONFIG_SITE:PATH=config-site/vulcanlac4-compute.cmake -DVISIT_ENGINE_ONLY:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=\$bgqinstdir -DCMAKE_BUILD_TYPE:STRING=Release -DVISIT_INSTALL_THIRD_PARTY:BOOL=ON . >> ../../buildlog 2>&1
+sh svn_bin/filter_link_commands_BGQ.sh >> ../../buildlog 2>&1
+make install >> ../../buildlog 2>&1
+cd ..
+# Restore data directory
+mv .data data
+# Build for login node, server-components-only version
+cd login_build
+/usr/gapps/visit/thirdparty_static/2.9.0/cmake/3.0.2/linux-ppc64_gcc-4.4/bin/cmake -DVISIT_CONFIG_SITE:PATH=config-site/vulcanlac4-login.cmake -DVISIT_SERVER_COMPONENTS_ONLY:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=\$bgqinstdir -DCMAKE_BUILD_TYPE:STRING=Release -DVISIT_INSTALL_THIRD_PARTY:BOOL=ON . >> ../../buildlog 2>&1
+make install >> ../../buildlog 2>&1
+cd ..
+# Now, tar up the common install directory.
+tar zcf ../visit\$ver2.linux-ppc64-BGQ.tar.gz visit\${ver2}.linux-ppc64
+cd ..
+rm -f resultlog
+echo "        build of visit on vulcan"       > resultlog 2>&1
+echo "       --------------------------"      >> resultlog 2>&1
+echo ""                                       >> resultlog 2>&1
+ls -l                                         >> resultlog 2>&1
+echo ""                                       >> resultlog 2>&1
+echo "number of database plugins = (statically linked)" >> resultlog 2>&1
+echo "number of operator plugins = (statically linked)" >> resultlog 2>&1
+echo "number of plot plugins = (statically linked)" >> resultlog 2>&1
+mail  -s "VisIt build ($dist): vulcan" $emailName < resultlog
+EOF
+
+if [ $vulcan = true ]
+then
+   if [ $test = no ]
+   then
+      echo "Building on vulcan"
+      scp vulcan vulcanlac4:vulcan_buildit
+      scp $dist.tar.gz vulcanlac4:vulcan_$dist.tar.gz
+      ssh vulcanlac4 "chmod 750 vulcan_buildit;./vulcan_buildit" &
+   fi
+fi
+
 #
 # Clean up.
 #
 if [ $test = no ]
 then
-   rm -f kickit sidious ubuntu1104_64 ubuntu1404_64 aztec rzzeus rzuseq carver glory
+   rm -f kickit sidious ubuntu1104_64 ubuntu1404_64 aztec rzzeus rzuseq carver glory vulcan
 fi
diff --git a/src/svn_bin/visit-create-chksums b/src/svn_bin/visit-create-chksums
index 23bdd31..b4266ec 100755
--- a/src/svn_bin/visit-create-chksums
+++ b/src/svn_bin/visit-create-chksums
@@ -53,15 +53,41 @@ fi
 version2=`echo $version | tr "." "_"`
 
 #
-# Create the directory to check out the files into.
+# List the third_party files.
+#
+third_party_files="AdvIO-1.2.tar.gz BoxLib-2011.04.28.tar.gz EAVL-4593630.tar.gz EAVL-5f53629eed.tar.gz EAVL-9e7ffd1a93.tar.gz EAVL-ac39232.tar.gz FMDB-1.2.tar.gz GRUMMP-0.6.3.tar.gz GRUMMP-0.6.5.tar.gz H5Part-1.6.4.tar.gz H5Part-1.6.6.tar.gz IceT-1-0-0.tar.gz Imaging-1.1.6.tar.gz MesaLib-7.10.2.tar.gz MesaLib-7.8.2.tar.gz Python-2.6.4.tgz Python-2.7.3.tgz Python-2.7.5.tgz Python-2.7.6.tgz R-2.13.2.tar.gz R-3.0.2.tar.gz Uintah-1.6.0.tar.gz VTK-6.1.0.tar.gz Xdmf-2.1.1.tar.gz adios-1.6.0.t [...]
+
+#
+# List the release files.
+#
+release_files="INSTALL_NOTES VisIt-$version.dmg jvisit$version.tar.gz visit${version}.exe visit-install$version2 visit${version}_x64.exe visit$version2.darwin-x86_64.tar.gz visit$version2.linux-x86_64-ubuntu11.tar.gz visit$version2.linux-x86_64-ubuntu14.tar.gz visit$version2.linux-x86_64-rhel6.tar.gz build_visit$version2 $dist.tar.gz visitdev$version.exe"
+
+#
+# Download the files.
 #
 rm -rf checksum_dir
 mkdir checksum_dir
 cd checksum_dir
-echo "Checking out third_party..."
-svn co http://portal.nersc.gov/svn/visit/tags/$version/third_party
-echo "Checking out $version..."
-svn co http://portal.nersc.gov/svn/visit/trunk/releases/$version
+echo "Downloading third_party..."
+mkdir third_party
+cd third_party
+for file in $third_party_files
+do
+   echo "   Downloading $file"
+   wget --no-check-certificate -o /dev/null http://portal.nersc.gov/project/visit/third_party/$file
+   shift
+done
+cd ..
+echo "Downloading $version..."
+mkdir $version
+cd $version
+for file in $release_files
+do
+   echo "   Downloading $file"
+   wget --no-check-certificate -o /dev/null http://portal.nersc.gov/project/visit/releases/$version/$file
+   shift
+done
+cd ..
 
 #
 # Create an awk script for use with the filesize command
diff --git a/src/svn_bin/visit-install b/src/svn_bin/visit-install
index 8efad0f..f15342b 100755
--- a/src/svn_bin/visit-install
+++ b/src/svn_bin/visit-install
@@ -364,6 +364,9 @@
 #    Kathleen Biagas, Mon Jan 26 07:46:28 PST 2015
 #    Removed host profile for edge.
 #
+#    Kathleen Biagas, Thu May  7 09:48:06 PDT 2015
+#    Fix second 'data' conditional to test for "$distributiondir"/data
+#
 #-----------------------------------------------------------------------
 
 Compress=COMPRESS
@@ -1002,7 +1005,7 @@ for f in `echo $platformPath | tr "/" " "`; do
 done
 # Copy the files
 find . -print | cpio -pmud "$dir"/$version+
-if [ -e "$dir"/data ]; then
+if [ -e "$distributiondir"/data ]; then
     cd ../data
     find . -print | cpio -pmud "$dir"/data
 fi
diff --git a/src/svn_bin/visit-install-open b/src/svn_bin/visit-install-open
index ebd2e6e..e5bbc36 100755
--- a/src/svn_bin/visit-install-open
+++ b/src/svn_bin/visit-install-open
@@ -71,6 +71,9 @@
 #   Eric Brugger, Thu Feb 19 09:14:29 PST 2015
 #   I removed redsky.
 #
+#   Kathleen Biagas, Thu May  7 09:35:34 PDT 2015
+#   Added vulcan, changed rzuseq bank to wbronze.
+#
 #-----------------------------------------------------------------------
 
 test=no
@@ -120,6 +123,7 @@ rzzeus=true
 rzuseq=false
 carver=true
 glory=false
+vulcan=false
 
 ver=undefined
 
@@ -214,6 +218,14 @@ do
          glory=true
          shift
          ;;
+      -vulcan)
+         vulcan=false
+         shift
+         ;;
+      +vulcan)
+         vulcan=true
+         shift
+         ;;
       -v)
          ver=$2
          shift 2
@@ -466,7 +478,7 @@ fi
 rm -f rzuseq
 cat <<EOF > rzuseq
 #!/bin/sh
-./visit-install -private -c llnl_open_rz -g visit -b bdivp -gw -l $ver linux-ppc64-BGQ /usr/gapps/visit > installlog 2>&1
+./visit-install -private -c llnl_open_rz -g visit -b wbronze -gw -l $ver linux-ppc64-BGQ /usr/gapps/visit > installlog 2>&1
 rm -f resultlog
 echo "        install of visit on rzuseq"          > resultlog 2>&1
 echo "       ----------------------------"         >> resultlog 2>&1
@@ -564,9 +576,42 @@ then
 fi
 
 #
+# Install on vulcan.
+#
+rm -f vulcan
+cat <<EOF > vulcan
+#!/bin/sh
+./visit-install -private -c llnl_open_rz -g visit -b wbronze -gw -l $ver linux-ppc64-BGQ /usr/gapps/visit > installlog 2>&1
+rm -f resultlog
+echo "        install of visit on vulcan"          > resultlog 2>&1
+echo "       ----------------------------"         >> resultlog 2>&1
+echo ""                                            >> resultlog 2>&1
+df -k /usr/gapps/visit                             >> resultlog 2>&1
+echo ""                                            >> resultlog 2>&1
+ls -l /usr/gapps/visit/$ver+/linux-ppc64/bin       >> resultlog 2>&1
+echo ""                                            >> resultlog 2>&1
+echo "number of database plugins = (statically linked)" >> resultlog 2>&1
+echo "number of operator plugins = (statically linked)" >> resultlog 2>&1
+echo "number of plot plugins = (statically linked)" >> resultlog 2>&1
+mail -s "VisIt install ($ver): vulcan" $emailName < resultlog
+EOF
+
+if [ $vulcan = true ]
+then
+   if [ $test = no ]
+   then
+      scp vulcanlac4:/usr/tmp/$user/vulcan/visitbuild/visit$ver2.linux-x86_64.tar.gz visit$ver2.linux-ppc64-BGQ.tar.gz
+      scp visit$ver2.linux-ppc64-BGQ.tar.gz vulcanlac4:
+      scp visit-install vulcanlac4:
+      scp vulcan vulcanlac4:vulcan_install
+      ssh vulcanlac4 "chmod 750 vulcan_install;./vulcan_install"
+   fi
+fi
+
+#
 # Clean up.
 #
 if [ $test = no ]
 then
-   rm -f kickit sidious ubuntu1104_64 ubuntu1404_64 aztec rzuseq rzzeus carver glory
+   rm -f kickit sidious ubuntu1104_64 ubuntu1404_64 aztec rzuseq rzzeus carver glory vulcan
 fi
diff --git a/src/tools/DataManualExamples/Simulations/contrib/pjacobi/F90/PJacobi_InSitu.f b/src/tools/DataManualExamples/Simulations/contrib/pjacobi/F90/PJacobi_InSitu.f
index 214bae6..67bb227 100644
--- a/src/tools/DataManualExamples/Simulations/contrib/pjacobi/F90/PJacobi_InSitu.f
+++ b/src/tools/DataManualExamples/Simulations/contrib/pjacobi/F90/PJacobi_InSitu.f
@@ -38,7 +38,7 @@ c     Add a 2D rect mesh
               err = visitmdsimaddmesh(md, mmd)
           endif
 
-c     Add a zonal variable on mesh2d.
+c     Add a nonal variable on mesh2d.
       if(visitmdvaralloc(vmd).eq.VISIT_OKAY) then
           err = visitmdvarsetname(vmd, "temperature", 11)
           err = visitmdvarsetmeshname(vmd, "mesh", 4)
@@ -222,7 +222,7 @@ c---------------------------------------------------------------------------
       character*8 name
       integer     handle, lname
       include "visitfortransimV2interface.inc"
-      visitgetcurve = VISIT_ERROR
+      visitgetcurve = VISIT_INVALID_HANDLE
       end
 
 c---------------------------------------------------------------------------
@@ -276,7 +276,18 @@ c---------------------------------------------------------------------------
       character*8 name
       integer     domain, lname
       include "visitfortransimV2interface.inc"
-      visitgetmaterial = VISIT_ERROR
+      visitgetmaterial = VISIT_INVALID_HANDLE
+      end
+
+c---------------------------------------------------------------------------
+c visitgetmixedvariable
+c---------------------------------------------------------------------------
+      integer function visitgetmixedvariable(handle, name, lname)
+      implicit none
+      character*8 name
+      integer     handle, lname
+      include "visitfortransimV2interface.inc"
+      visitgetmixedvariable = VISIT_INVALID_HANDLE
       end
 
 c-----------------------------------------------------------------
diff --git a/src/viewer/core/ViewerWindow.C b/src/viewer/core/ViewerWindow.C
index 3a26142..bbf606f 100644
--- a/src/viewer/core/ViewerWindow.C
+++ b/src/viewer/core/ViewerWindow.C
@@ -8176,6 +8176,10 @@ ViewerWindow::GetCompactDomainsAutoThreshold() const
 //   Eric Brugger, Thu Oct 27 15:47:36 PDT 2011
 //   I added a multi resolution display capability for 2d.
 //
+//   Eric Brugger, Fri Jun  5 15:48:51 PDT 2015
+//   I modified the viewer so that it also saves maintain view limits when
+//   saving settings, not just when saving a session.
+//
 // ****************************************************************************
 
 void
@@ -8203,10 +8207,10 @@ ViewerWindow::CreateNode(DataNode *parentNode,
     //
     // Add information specific to the ViewerWindow.
     //
+    windowNode->AddNode(new DataNode("maintainView", maintainView));
     if(detailed)
     {
         windowNode->AddNode(new DataNode("cameraView", cameraView));
-        windowNode->AddNode(new DataNode("maintainView", maintainView));
         windowNode->AddNode(new DataNode("viewExtentsType", avtExtentType_ToString(plotExtentsType)));
         windowNode->AddNode(new DataNode("viewIsLocked", viewIsLocked));
         windowNode->AddNode(new DataNode("timeLocked", timeLocked));
diff --git a/src/viewer/main/ViewerSubject.C b/src/viewer/main/ViewerSubject.C
index c23f612..b4329ed 100644
--- a/src/viewer/main/ViewerSubject.C
+++ b/src/viewer/main/ViewerSubject.C
@@ -3260,10 +3260,10 @@ ViewerSubject::Export()
             node["files"] = JSONNode::JSONArray();
             node["dirs"] = JSONNode::JSONArray();
 
-            for(int i = 0; i < list->files.size(); ++i) {
+            for(size_t i = 0; i < list->files.size(); ++i) {
                 node["files"].Append(""" + list->files[i].name + """ );
             }
-            for(int i = 0; i < list->dirs.size(); ++i) {
+            for(size_t i = 0; i < list->dirs.size(); ++i) {
                 node["dirs"].Append(""" + list->dirs[i].name + """);
             }
 
@@ -5223,6 +5223,9 @@ ViewerSubject::DeferCommandFromSimulation(const EngineKey &key,
 //   Brad Whitlock, Sun Feb 27 21:12:17 PST 2011
 //   I added the SetUI command.
 //
+//   Brad Whitlock, Thu May 28 15:27:56 PDT 2015
+//   I added more commands that can come from simulations.
+//
 // ****************************************************************************
 
 void
@@ -5286,6 +5289,151 @@ ViewerSubject::HandleCommandFromSimulation(const EngineKey &key,
         GetViewerState()->GetSimulationUIValues()->SetEnabled(s[4] == "1");
         GetViewerState()->GetSimulationUIValues()->Notify();
     }
+    else if(command.substr(0,10) == "SaveWindow")
+    {
+        stringVector s = SplitValues(command, ':');
+        // s[0] = SaveWindow
+        // s[1] = dName
+        // s[2] = fName
+        // s[3] = w
+        // s[4] = h
+        // s[5] = format
+        int ival = 0, w = 100, h = 100;
+        if(sscanf(s[3].c_str(), "%d", &ival) == 1)
+            w = (ival > 0) ? ival : w;
+        if(sscanf(s[4].c_str(), "%d", &ival) == 1)
+            h = (ival > 0) ? ival : h;
+        SaveWindowAttributes::FileFormat fmt = SaveWindowAttributes::PNG;
+        SaveWindowAttributes::FileFormat_FromString(s[5], fmt);
+
+        SaveWindowAttributes *swa = GetViewerState()->GetSaveWindowAttributes();
+        swa->SetFileName(s[2]);
+        swa->SetOutputToCurrentDirectory(false);
+        swa->SetOutputDirectory(s[1]);
+        swa->SetFamily(false);
+        swa->SetFormat(fmt);
+        swa->SetWidth(w);
+        swa->SetHeight(h);
+        swa->SetSaveTiled(false);
+        swa->SetScreenCapture(false);
+        swa->Notify();
+
+        GetViewerMethods()->SaveWindow();
+    }
+    else if(command.substr(0,14) == "ExportDatabase")
+    {
+        stringVector s = SplitValues(command, ':');
+        // s[0] = ExportDatabase
+        // s[1] = name
+        // s[2] = id
+        // s[3] = dName
+        // s[4] = fName
+        // s[5] = var0
+        // ...   more vars.
+
+        stringVector vars;
+        for(size_t i = 5; i < s.size(); ++i)
+            vars.push_back(s[i]);
+
+        ExportDBAttributes *atts = GetViewerState()->GetExportDBAttributes();
+        atts->SetAllTimes(false);
+        atts->SetDb_type(s[1]);
+        atts->SetDb_type_fullname(s[2]);
+        atts->SetDirname(s[3]);
+        atts->SetFilename(s[4]);
+        atts->SetVariables(vars);
+        atts->Notify();
+
+        GetViewerMethods()->ExportDatabase();
+    }
+    else if(command.substr(0,14) == "RestoreSession")
+    {
+        stringVector s = SplitValues(command, ':');
+        // s[0] = RestoreSession
+        // s[1] = filename
+        stringVector sources;
+        for(int i = 0; i < 10; ++i)
+            sources.push_back(db);
+
+        GetViewerMethods()->
+            ImportEntireStateWithDifferentSources(s[1], false, sources);
+    }
+    else if(command.substr(0,7) == "AddPlot")
+    {
+        stringVector s = SplitValues(command, ':');
+        // s[0] = AddPlot
+        // s[1] = plotType
+        // s[2] = var
+
+        // Get the plugin id from the input plotType, which could be an id or a name.
+        std::string id;
+        for(int i = 0; i < GetPlotPluginManager()->GetNEnabledPlugins(); ++i)
+        {
+            std::string thisID(GetPlotPluginManager()->GetEnabledID(i));
+            if(thisID == s[1])
+                id = thisID;
+            if(GetPlotPluginManager()->GetPluginName(thisID) == s[1])
+                id = thisID;
+        }
+        if(!id.empty())
+        {
+            int plotIndex = GetPlotPluginManager()->GetEnabledIndex(id);
+            GetViewerMethods()->AddPlot(plotIndex, s[2]);
+        }
+    }
+    else if(command.substr(0,11) == "AddOperator")
+    {
+        stringVector s = SplitValues(command, ':');
+        // s[0] = AddPlot
+        // s[1] = operatorType
+        // s[2] = applyToAll
+
+        // Get the plugin id from the input plotType, which could be an id or a name.
+        std::string id;
+        for(int i = 0; i < GetOperatorPluginManager()->GetNEnabledPlugins(); ++i)
+        {
+            std::string thisID(GetOperatorPluginManager()->GetEnabledID(i));
+            if(thisID == s[1])
+                id = thisID;
+            if(GetOperatorPluginManager()->GetPluginName(thisID) == s[1])
+                id = thisID;
+        }
+        if(!id.empty())
+        {
+            bool applyToAll = (s[2]=="1");
+
+            bool applyOperatorSave = GetViewerState()->GetGlobalAttributes()->GetApplyOperator();
+            GetViewerState()->GetGlobalAttributes()->SetApplyOperator(applyToAll);
+
+            int operatorIndex = GetOperatorPluginManager()->GetEnabledIndex(id);
+            GetViewerMethods()->AddOperator(operatorIndex);
+
+            GetViewerState()->GetGlobalAttributes()->SetApplyOperator(applyOperatorSave);
+        }
+    }
+    else if(command.substr(0,9) == "DrawPlots")
+    {
+        GetViewerMethods()->DrawPlots();
+    }
+    else if(command.substr(0,17) == "DeleteActivePlots")
+    {
+        GetViewerMethods()->DeleteActivePlots();
+    }
+    else if(command.substr(0,14) == "SetActivePlots")
+    {
+        stringVector s = SplitValues(command, ':');
+        // s[0] = SetActivePlots
+        // s[1] = activePlot0
+        // ... more active plots.
+        intVector activePlots;
+        for(size_t i = 1; i < s.size(); ++i)
+        {
+            int ival = atoi(s[i].c_str());
+            if(ival >= 0)
+                activePlots.push_back(ival);
+        }
+        GetViewerMethods()->SetActivePlots(activePlots);
+    }
 }
 
 // ****************************************************************************
diff --git a/src/visitpy/cli/cli.C b/src/visitpy/cli/cli.C
index a134d00..629b50e 100644
--- a/src/visitpy/cli/cli.C
+++ b/src/visitpy/cli/cli.C
@@ -407,6 +407,14 @@ main(int argc, char *argv[])
                 ShowWindow(console, SW_MINIMIZE);
 #endif
         }
+        else if(strcmp(argv[i], "-hide_window") == 0)
+        {
+#ifdef WIN32
+            HWND console = GetConsoleWindow();
+            if(console != NULL)
+                ShowWindow(console, SW_HIDE);
+#endif
+        }
         else
         {
             // Pass the array along to the visitmodule.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/visit.git



More information about the debian-science-commits mailing list