Commit 52ec55e6 authored by hrchilds's avatar hrchilds
Browse files

Update from August 31, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@312 18c085ea-50e0-402c-830e-de6fd14e8384
parent 8a50fd1a
......@@ -1726,6 +1726,9 @@ avtGenericDatabase::GetSymmetricTensorVariable(const char *varname, int ts,
// point and cell data arrays. That information is now obtained through
// the GetAuxiliaryData interface.
//
// Hank Childs, Fri Aug 27 16:16:52 PDT 2004
// Rename ghost data arrays.
//
// ****************************************************************************
vtkDataSet *
......@@ -1796,16 +1799,16 @@ avtGenericDatabase::GetMesh(const char *meshname, int ts, int domain,
// There are some mesh variables that we want to copy over -- namely
// those with ghost information or global numbering information.
//
if (mesh->GetCellData()->GetArray("vtkGhostLevels"))
if (mesh->GetCellData()->GetArray("avtGhostZones"))
{
rv->GetCellData()->AddArray(
mesh->GetCellData()->GetArray("vtkGhostLevels"));
mesh->GetCellData()->GetArray("avtGhostZones"));
GetMetaData(ts)->SetContainsGhostZones(meshname, AVT_HAS_GHOSTS);
}
if (mesh->GetPointData()->GetArray("vtkGhostNodes"))
if (mesh->GetPointData()->GetArray("avtGhostNodes"))
{
rv->GetPointData()->AddArray(
mesh->GetPointData()->GetArray("vtkGhostNodes"));
mesh->GetPointData()->GetArray("avtGhostNodes"));
GetMetaData(ts)->SetContainsGhostZones(meshname, AVT_HAS_GHOSTS);
}
rv->GetFieldData()->ShallowCopy(mesh->GetFieldData());
......@@ -4804,6 +4807,11 @@ avtGenericDatabase::CommunicateGhostZonesFromGlobalNodeIds(
// Programmer: Hank Childs
// Creation: August 13, 2004
//
// Modifications:
//
// Hank Childs, Fri Aug 27 16:16:52 PDT 2004
// Rename ghost data arrays.
//
// ****************************************************************************
bool
......@@ -4989,7 +4997,7 @@ avtGenericDatabase::CommunicateGhostNodesFromGlobalNodeIds(
int *ptr = int_gni->GetPointer(0);
int nvals = int_gni->GetNumberOfTuples();
vtkUnsignedCharArray *ghost_nodes = vtkUnsignedCharArray::New();
ghost_nodes->SetName("vtkGhostNodes");
ghost_nodes->SetName("avtGhostNodes");
ghost_nodes->SetNumberOfTuples(nvals);
for (j = 0 ; j < nvals ; j++)
{
......@@ -6475,6 +6483,9 @@ avtGenericDatabase::QueryMesh(const std::string &varName, const int ts,
// Only search for the node if it hasn't already been discovered,
// use the generic ds->GetPoint() method.
//
// Hank Childs, Fri Aug 27 16:16:52 PDT 2004
// Rename ghost data arrays.
//
// ****************************************************************************
bool
......@@ -6564,7 +6575,7 @@ avtGenericDatabase::QueryZones(const string &varName, const int dom,
if (nCells > 0)
{
vtkUnsignedCharArray *ghostArray = (vtkUnsignedCharArray*)
ds->GetCellData()-> GetArray("vtkGhostLevels");
ds->GetCellData()-> GetArray("avtGhostZones");
unsigned char *ghosts = NULL;
if (ghostArray)
ghosts = ghostArray->GetPointer(0);
......@@ -7181,6 +7192,9 @@ avtGenericDatabase::GetDomainName(const std::string &varName, const int ts,
// Kathleen Bonnell, Thu Jun 10 18:15:11 PDT 2004
// Renamed from QueryZoneCenter to QueryCoords, added bool arg.
//
// Hank Childs, Fri Aug 27 16:16:52 PDT 2004
// Rename ghost data arrays.
//
// ****************************************************************************
bool
......@@ -7198,7 +7212,7 @@ avtGenericDatabase::QueryCoords(const string &varName, const int dom,
if (ds->GetDataObjectType() == VTK_RECTILINEAR_GRID ||
ds->GetDataObjectType() == VTK_STRUCTURED_GRID)
{
if (ds->GetCellData()->GetArray("vtkGhostLevels") != NULL)
if (ds->GetCellData()->GetArray("avtGhostZones") != NULL)
{
int dims[3], ijk[3] = {0, 0, 0};
vtkVisItUtility::GetDimensions(ds, dims);
......@@ -7229,7 +7243,7 @@ avtGenericDatabase::QueryCoords(const string &varName, const int dom,
if (ds->GetDataObjectType() == VTK_RECTILINEAR_GRID ||
ds->GetDataObjectType() == VTK_STRUCTURED_GRID)
{
if (ds->GetCellData()->GetArray("vtkGhostLevels") != NULL)
if (ds->GetCellData()->GetArray("avtGhostZones") != NULL)
{
int dims[3], ijk[3] = {0, 0, 0};
vtkVisItUtility::GetDimensions(ds, dims);
......
// ************************************************************************* //
// avtDomainNesting.h //
// ************************************************************************* //
#ifndef AVT_DOMAIN_NESTING_H
#define AVT_DOMAIN_NESTING_H
#include <database_exports.h>
#include <vector>
......@@ -12,13 +17,17 @@ class vtkDataSet;
//
// Purpose:
// Encapsulate domain nesting information. The main purpose of this class
// is to add the "vtkGhostLevels" data array that is '1' in coarser
// domains where there is a finer (nested) domain also in the current
// selection.
// is to update the "avtGhostZones" data array for regions where a
// domain is nested by a finer domain also in the current selection.
//
// Programmer: Mark C. Miller
// Creation: October 13, 2003
//
// Modifications:
//
// Hank Childs, Fri Aug 27 16:16:52 PDT 2004
// Update "Purpose" statement for changes in handling ghost data.
//
// ****************************************************************************
class DATABASE_API avtDomainNesting
{
......
......@@ -2126,6 +2126,11 @@ avtStructuredDomainBoundaries::ConfirmMesh(vector<int> domainNum,
// Programmer: Hank Childs
// Creation: November 12, 2003
//
// Modifications:
//
// Hank Childs, Fri Aug 27 16:16:52 PDT 2004
// Rename ghost data arrays.
//
// ****************************************************************************
void
......@@ -2133,26 +2138,27 @@ avtStructuredDomainBoundaries::CreateGhostZones(vtkDataSet *outMesh,
vtkDataSet *inMesh, Boundary *bi)
{
vtkUnsignedCharArray *oldGhosts = (vtkUnsignedCharArray *)
inMesh->GetCellData()->GetArray("vtkGhostLevels");
inMesh->GetCellData()->GetArray("avtGhostZones");
// Create the ghost zone array
vtkUnsignedCharArray *ghostCells = vtkUnsignedCharArray::New();
ghostCells->SetName("vtkGhostLevels");
ghostCells->SetName("avtGhostZones");
ghostCells->Allocate(bi->newncells);
for (int k = bi->newzextents[4]; k <= bi->newzextents[5]; k++)
for (int j = bi->newzextents[2]; j <= bi->newzextents[3]; j++)
for (int i = bi->newzextents[0]; i <= bi->newzextents[1]; i++)
{
unsigned char used_to_be_ghost = 0;
if (oldGhosts)
unsigned char gv = 0;
if (oldGhosts != NULL)
{
int index = bi->OldCellIndex(i, j, k);
if (index >= 0)
used_to_be_ghost = oldGhosts->GetValue(index);
gv = oldGhosts->GetValue(index);
}
ghostCells->InsertNextValue(bi->IsGhostZone(i,j,k)
? 1 : used_to_be_ghost);
if (bi->IsGhostZone(i,j,k))
avtGhostData::AddGhostZoneType(gv,
DUPLICATED_ZONE_INTERNAL_TO_PROBLEM);
ghostCells->InsertNextValue(gv);
}
outMesh->GetCellData()->AddArray(ghostCells);
......@@ -2394,6 +2400,9 @@ avtRectilinearDomainBoundaries::ExchangeMesh(vector<int> domainNum,
// Hank Childs, Tue Aug 24 09:25:39 PDT 2004
// Create avtRealDims.
//
// Hank Childs, Fri Aug 27 16:16:52 PDT 2004
// Renamed ghost data array.
//
// ****************************************************************************
void
......@@ -2413,7 +2422,7 @@ avtStructuredDomainBoundaries::CreateGhostNodes(vector<int> domainNum,
vtkUnsignedCharArray *gn = vtkUnsignedCharArray::New();
gn->SetNumberOfTuples(npts);
gn->SetName("vtkGhostNodes");
gn->SetName("avtGhostNodes");
unsigned char *gnp = gn->GetPointer(0);
for (int j = 0 ; j < npts ; j++)
......
// ************************************************************************* //
// avtStructuredDomainNesting.C //
// ************************************************************************* //
#include <avtStructuredDomainNesting.h>
#include <avtGhostData.h>
#include <BadIndexException.h>
#include <UnexpectedValueException.h>
#include <VisItException.h>
#include <vtkCellData.h>
#include <vtkFloatArray.h>
#include <vtkIntArray.h>
......@@ -33,7 +41,7 @@ avtStructuredDomainNesting::Destruct(void *p)
//
// Purpose: Detects number of ghost layers in each dimension given
// knowledge of the dimension, non-ghosted size of the patch in each
// dimension and the pre-existing vtkGhostLevels data
// dimension and the pre-existing avtGhostZones data
//
// To perform the detection, basically we try all reasonable combinations
// of ghost numbers of layers and probe the ghostData array around the
......@@ -241,7 +249,7 @@ avtStructuredDomainNesting::GetSelectedDescendents(
// Method: avtStructuredDomainNesting::ApplyGhost
//
// Purpose:
// Applies "vtkGhostLevels" array to the meshes passed in
// Applies "avtGhostZones" array to the meshes passed in
//
// Programmer: Mark C. Miller
// Creation: October 13, 2003
......@@ -274,6 +282,9 @@ avtStructuredDomainNesting::GetSelectedDescendents(
// re-organized the key loops a bit for better cache efficiency and less
// multiplication.
//
// Hank Childs, Fri Aug 27 16:16:52 PDT 2004
// Renamed ghost data array. Also properly mark each zone's ghost type.
//
// ****************************************************************************
bool
avtStructuredDomainNesting::ApplyGhost(vector<int> domainList,
......@@ -288,7 +299,7 @@ avtStructuredDomainNesting::ApplyGhost(vector<int> domainList,
unsigned char *ghostData = 0;
vtkUnsignedCharArray *ghostArray = vtkUnsignedCharArray::SafeDownCast(
meshes[i]->GetCellData()->GetArray("vtkGhostLevels"));
meshes[i]->GetCellData()->GetArray("avtGhostZones"));
int parentDom = domainList[i];
int numCells = meshes[i]->GetNumberOfCells();
......@@ -316,7 +327,7 @@ avtStructuredDomainNesting::ApplyGhost(vector<int> domainList,
ghostArray = vtkUnsignedCharArray::New();
ghostArray->SetNumberOfTuples(numCells);
ghostData = (unsigned char *) ghostArray->GetVoidPointer(0);
ghostArray->SetName("vtkGhostLevels");
ghostArray->SetName("avtGhostZones");
meshes[i]->GetCellData()->AddArray(ghostArray);
ghostArray->Delete();
}
......@@ -426,7 +437,8 @@ avtStructuredDomainNesting::ApplyGhost(vector<int> domainList,
{
int aa = ii - I0 + ghostLayers[0];
int a = b + aa;
ghostData[a] = 0x1;
avtGhostData::AddGhostZoneType(ghostData[a],
REFINED_ZONE_IN_AMR_GRID);
}
}
}
......@@ -441,7 +453,8 @@ avtStructuredDomainNesting::ApplyGhost(vector<int> domainList,
{
int aa = ii - I0 + ghostLayers[0];
int a = b + aa;
ghostData[a] = 0x1;
avtGhostData::AddGhostZoneType(ghostData[a],
REFINED_ZONE_IN_AMR_GRID);
}
}
}
......@@ -450,7 +463,8 @@ avtStructuredDomainNesting::ApplyGhost(vector<int> domainList,
for (int ii = i0; ii < i1; ii++)
{
int a = ii - I0 + ghostLayers[0];
ghostData[a] = 0x1;
avtGhostData::AddGhostZoneType(ghostData[a],
REFINED_ZONE_IN_AMR_GRID);
}
}
}
......
......@@ -295,6 +295,11 @@ avtUnstructuredDomainBoundaries::CopyPointer(T *src, T *dest, int components,
// Programmer: Akira Haddox
// Creation: August 11, 2003
//
// Modifications:
//
// Hank Childs, Fri Aug 27 16:34:46 PDT 2004
// Rename ghost data arrays. Also properly mark ghost data type.
//
// ****************************************************************************
vector<vtkDataSet*>
......@@ -395,7 +400,7 @@ avtUnstructuredDomainBoundaries::ExchangeMesh(vector<int> domainNum,
// The id that the cells will be inserted at is
// important, and we need to remember.
startingCell[pair<int,int>(sendDom, recvDom)] = outm->
GetNumberOfCells();
GetNumberOfCells();
// We want the map that indexes the ptIds from sendDom into
// the ptIds of recvDom.
......@@ -424,19 +429,22 @@ avtUnstructuredDomainBoundaries::ExchangeMesh(vector<int> domainNum,
// Create the ghost zone array
vtkUnsignedCharArray *ghostCells = vtkUnsignedCharArray::New();
ghostCells->SetName("vtkGhostLevels");
ghostCells->SetName("avtGhostZones");
ghostCells->SetNumberOfTuples(outm->GetNumberOfCells());
unsigned char *ptr = ghostCells->GetPointer(0);
for (i = 0; i < nOldCells; ++i)
*(ptr++) = 0;
int nGhostCells = outm->GetNumberOfCells() - nOldCells;
for (i = 0; i < nGhostCells; ++i)
*(ptr++) = 1;
{
avtGhostData::AddGhostZoneType(*ptr,
DUPLICATED_ZONE_INTERNAL_TO_PROBLEM);
ptr++;
}
outm->GetCellData()->AddArray(ghostCells);
ghostCells->Delete();
outm->SetUpdateGhostLevel(0);
outm->BuildLinks();
out[d] = outm;
}
......@@ -1484,6 +1492,9 @@ avtUnstructuredDomainBoundaries::CommunicateDataInformation(
// Programmer: Hank Childs
// Creation: August 16, 2004
//
// Hank Childs, Fri Aug 27 16:34:46 PDT 2004
// Rename ghost data arrays.
//
// ****************************************************************************
void
......@@ -1499,7 +1510,7 @@ avtUnstructuredDomainBoundaries::CreateGhostNodes(vector<int> domainNum,
vtkUnsignedCharArray *gn = vtkUnsignedCharArray::New();
gn->SetNumberOfTuples(npts);
gn->SetName("vtkGhostNodes");
gn->SetName("avtGhostNodes");
unsigned char *gnp = gn->GetPointer(0);
for (j = 0 ; j < npts ; j++)
gnp[j] = 0;
......
......@@ -216,6 +216,9 @@ avtExpressionFilter::PostExecute(void)
// DataExtents now always only 2 components. Allow for Tensor var's range
// to be computed.
//
// Hank Childs, Fri Aug 27 16:54:45 PDT 2004
// Rename ghost data arrays.
//
// ****************************************************************************
vtkDataSet *
......@@ -298,7 +301,7 @@ avtExpressionFilter::ExecuteData(vtkDataSet *in_ds, int index,
if (!isPoint)
{
vtkUnsignedCharArray *g = (vtkUnsignedCharArray *)
rv->GetCellData()->GetArray("vtkGhostLevels");
rv->GetCellData()->GetArray("avtGhostZones");
if (g != NULL)
{
ghosts = g->GetPointer(0);
......
......@@ -86,6 +86,9 @@ avtRevolvedSurfaceArea::PreExecute(void)
// The variable created must have the same number of tuples as the input
// dataset.
//
// Hank Childs, Mon Aug 30 17:09:57 PDT 2004
// Remove call to SetGhostLevel for vtkDataSetRemoveGhostCells filter.
//
// ****************************************************************************
vtkDataArray *
......@@ -147,7 +150,6 @@ avtRevolvedSurfaceArea::DeriveVariable(vtkDataSet *in_ds)
// Remove ghost zones.
//
vtkDataSetRemoveGhostCells *gzFilter = vtkDataSetRemoveGhostCells::New();
gzFilter->SetGhostLevel(1);
gzFilter->SetInput(allLines);
vtkDataSet *ds_1d_nogz = gzFilter->GetOutput();
ds_1d_nogz->Update();
......
......@@ -317,6 +317,9 @@ avtContourFilter::PerformRestriction(avtPipelineSpecification_p in_spec)
// Kathleen Bonnell, Thu Mar 11 11:10:07 PST 2004
// DataExtents now always have only 2 components.
//
// Hank Childs, Mon Aug 30 08:42:48 PDT 2004
// Initialize current_node and nnodes for better progress indicators.
//
// ****************************************************************************
void
......@@ -367,6 +370,9 @@ avtContourFilter::PreExecute(void)
debug5 << endl;
CreateLabels();
GetOutput()->GetInfo().GetAttributes().SetLabels(isoLabels);
nnodes = GetInputDataTree()->GetNumberOfLeaves();
current_node = 0;
}
......@@ -451,6 +457,9 @@ avtContourFilter::PreExecute(void)
// Hank Childs, Tue May 11 06:47:24 PDT 2004
// Fix a bug that assumed that we would always have *something* to contour.
//
// Hank Childs, Mon Aug 30 08:45:14 PDT 2004
// Give better progress.
//
// ****************************************************************************
avtDataTree_p
......@@ -465,6 +474,7 @@ avtContourFilter::ExecuteDataTree(vtkDataSet *in_ds, int domain, string label)
{
debug3 << "No levels to calculate! " << endl;
GetOutput()->GetInfo().GetValidity().InvalidateOperation();
current_node++;
return NULL;
}
......@@ -516,12 +526,25 @@ avtContourFilter::ExecuteDataTree(vtkDataSet *in_ds, int domain, string label)
toBeContoured->GetPointData()->SetActiveScalars(contourVar);
visitTimer->StopTimer(t3, "Recentering");
//
// The progress is a bit funny. Recentering and building the scalar
// tree takes a lot of time. So we would like for that to be 1/2 of
// the progress for this stage. So allocate 1/4 for each. The "+2"
// business is to account for a case where there are 0 isolevels,
// which could lead to a divide-by-0 when calculating progress.
//
int nLevels = isoValues.size();
int total = 4*nLevels+2;
UpdateProgress(current_node*total + nLevels+1, total*nnodes);
vtkVisItScalarTree *tree = vtkVisItScalarTree::New();
tree->SetDataSet(toBeContoured);
int id0 = visitTimer->StartTimer();
tree->BuildTree();
visitTimer->StopTimer(id0, "Building scalar tree");
UpdateProgress(current_node*total + 2*nLevels+2, total*nnodes);
//
// Do the actual contouring. Split each isolevel into its own dataset.
//
......@@ -553,6 +576,7 @@ avtContourFilter::ExecuteDataTree(vtkDataSet *in_ds, int domain, string label)
out_ds[i]->ShallowCopy(output);
}
visitTimer->StopTimer(id2, "Calculating isosurface");
UpdateProgress(current_node*total + 2*nLevels+2+2*i, total*nnodes);
}
//
......@@ -583,6 +607,7 @@ avtContourFilter::ExecuteDataTree(vtkDataSet *in_ds, int domain, string label)
tree->Delete();
visitTimer->StopTimer(tt1, "avtContourFilter::ExecuteData");
current_node++;
return outDT;
}
......
......@@ -51,6 +51,10 @@ class vtkDataSet;
// hold string representation of computed isoValues. Added method
// CreateLabels.
//
// Hank Childs, Mon Aug 30 09:03:38 PDT 2004
// Do a better job of providing progress. Added two data members, nnodes
// and current_node to help with bookkeeping.
//
// ****************************************************************************
class AVTFILTERS_API avtContourFilter : public avtDataTreeStreamer
......@@ -80,6 +84,9 @@ class AVTFILTERS_API avtContourFilter : public avtDataTreeStreamer
std::vector<double> isoValues;
std::vector<std::string> isoLabels;
int nnodes;
int current_node;
virtual avtPipelineSpecification_p
PerformRestriction(avtPipelineSpecification_p);
virtual avtDataTree_p ExecuteDataTree(vtkDataSet *, int, string);
......
......@@ -8,7 +8,7 @@
#include <vtkCellArray.h>
#include <vtkCellData.h>
#include <vtkDataSet.h>
#include <vtkFeatureEdges.h>
#include <vtkVisItFeatureEdges.h>
#include <vtkIdList.h>
#include <vtkPointData.h>
#include <vtkPolyData.h>
......@@ -86,6 +86,12 @@ avtFeatureEdgesFilter::~avtFeatureEdgesFilter()
// Improved for the single cell case -- VTK feature edges was handling
// poorly.
//
// Hank Childs, Tue Aug 31 08:40:44 PDT 2004
// The VTK feature edges filter removes edges that have "vtkGhostLevels".
// But we now use "avtGhostZones" to indicate this. So we need to remove
// the ghost zones ourselves to do what used to be done from within the
// feature edges filter.
//
// ****************************************************************************
vtkDataSet *
......@@ -161,11 +167,8 @@ avtFeatureEdgesFilter::ExecuteData(vtkDataSet *inDS, int, string)
//
// Set up and apply the filter
//
vtkFeatureEdges *featureEdgesFilter = vtkFeatureEdges::New();
vtkVisItFeatureEdges *featureEdgesFilter = vtkVisItFeatureEdges::New();
featureEdgesFilter->SetInput((vtkPolyData*)inDS);
vtkPolyData *newDS = vtkPolyData::New();
featureEdgesFilter->SetOutput(newDS);
featureEdgesFilter->BoundaryEdgesOn();
if (GetInput()->GetInfo().GetAttributes().GetSpatialDimension() == 3)
{
......@@ -180,14 +183,14 @@ avtFeatureEdgesFilter::ExecuteData(vtkDataSet *inDS, int, string)
featureEdgesFilter->ManifoldEdgesOff();
featureEdgesFilter->ColoringOff();
newDS->Update();
vtkDataSet *output = featureEdgesFilter->GetOutput();
output->Update();
if (newDS->GetNumberOfCells() > 0)
if (output->GetNumberOfCells() > 0)
{
outDS = newDS;
outDS = output;
}
ManageMemory(outDS);
newDS->Delete();
featureEdgesFilter->Delete();
}
......
......@@ -81,6 +81,9 @@ avtGhostZoneFilter::~avtGhostZoneFilter()
// Hank Childs, Sun Jun 27 09:45:20 PDT 2004
// Add support for ghost nodes as well.
//
// Hank Childs, Fri Aug 27 16:02:58 PDT 2004
// Rename ghost data array. Also remove SetGhostLevel call.
//
// ****************************************************************************
vtkDataSet *
......@@ -93,9 +96,9 @@ avtGhostZoneFilter::ExecuteData(vtkDataSet *in_ds, int domain, std::string)
}
bool haveGhostZones =
(in_ds->GetCellData()->GetArray("vtkGhostLevels") != NULL);
(in_ds->GetCellData()->GetArray("avtGhostZones") != NULL);
bool haveGhostNodes = (in_ds->GetDataObjectType() == VTK_POLY_DATA) &&
(in_ds->GetPointData()->GetArray("vtkGhostNodes") != NULL);
(in_ds->GetPointData()->GetArray("avtGhostNodes") != NULL);
if (!haveGhostZones && !haveGhostNodes)
{
//
......@@ -115,7 +118,6 @@ avtGhostZoneFilter::ExecuteData(vtkDataSet *in_ds, int domain, std::string)
// will be removed. Currently our 'real' zones have
// ghostlevel ==0, 'ghost' have ghostlevel ==1.
//
filter->SetGhostLevel(1);
vtkDataSet *outDS = filter->GetOutput();
outDS->Update();
......
......@@ -272,6 +272,9 @@ avtSamplePointExtractor::SetUpExtractors(void)
// Hank Childs, Sun Dec 14 11:07:56 PST 2003
// Make use of massVoxelExtractor.
//
// Hank Childs, Fri Aug 27 16:47:45 PDT 2004
// Rename ghost data arrays.
//
// ****************************************************************************
void
......@@ -315,7 +318,7 @@ avtSamplePointExtractor::ExecuteTree(avtDataTree_p dt)
int numCells = ds->GetNumberOfCells();
int lastMilestone = 0;
vtkUnsignedCharArray *ghosts = (vtkUnsignedCharArray *)
ds->GetCellData()->GetArray("vtkGhostLevels");
ds->GetCellData()->GetArray("avtGhostZones");
for (int j = 0 ; j < numCells ; j++)
{
if (ghosts != NULL && ghosts->GetValue(j) > 0)
......
......@@ -104,6 +104,9 @@ avtShiftCenteringFilter::~avtShiftCenteringFilter()
// Kathleen Bonnell, Thu Mar 13 10:23:37 PST 2003
// Ensure that avtOriginalCellNumbers remains a cell-data array.
//
// Hank Childs, Fri Aug 27 16:02:58 PDT 2004
// Rename ghost data array. Also add support for ghost nodes.
//
// ****************************************************************************
vtkDataSet *
......@@ -128,12 +131,17 @@ avtShiftCenteringFilter::ExecuteData(vtkDataSet *inDS, int, std::string)
cd2pd->Delete();
// We want to preserve knowledge of ghost zones
vtkDataArray *ghosts = inDS->GetCellData()->GetArray("vtkGhostLevels");
vtkDataArray *ghosts = inDS->GetCellData()->GetArray("avtGhostZones");
if (ghosts)
{
outDS->GetCellData()->AddArray(ghosts);
// Only want ghost cell-data, not ghost point-data.
outDS->GetPointData()->RemoveArray("vtkGhostLevels");