Commit 7931ec6d authored by hrchilds's avatar hrchilds

Update from March 2, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@188 18c085ea-50e0-402c-830e-de6fd14e8384
parent 03c1da60
......@@ -170,7 +170,7 @@ NetworkManager::ClearAllNetworks(void)
for (i = 0 ; i < globalCellCounts.size() ; i++)
{
globalCellCounts[i] = 0;
globalCellCounts[i] = -1;
}
}
......@@ -212,7 +212,7 @@ NetworkManager::ClearNetworksWithDatabase(const std::string &db)
{
delete networkCache[i];
networkCache[i] = NULL;
globalCellCounts[i] = 0;
globalCellCounts[i] = -1;
}
}
}
......@@ -1009,7 +1009,10 @@ NetworkManager::GetTotalGlobalCellCounts(void) const
{
int i, sum = 0;
for (i = 0; i < globalCellCounts.size(); i++)
sum += globalCellCounts[i];
{
if (globalCellCounts[i] >= 0)
sum += globalCellCounts[i];
}
return sum;
}
......@@ -1227,12 +1230,15 @@ NetworkManager::GetOutput(bool respondWithNullData, bool calledForRender)
if ((PAR_Size() > 1) && (GetTotalGlobalCellCounts() > scalableThreshold))
{
avtNullData_p nullData = new avtNullData(NULL,AVT_NULL_DATASET_MSG);
avtDataObject_p dummyDob;
CopyTo(dummyDob, nullData);
writer = dummyDob->InstantiateWriter();
writer->SetInput(dummyDob);
clearNetwork = false;
debug5 << "Cell count has exceeded SR threshold. Sending the "
"AVT_NULL_DATASET_MSG data object message" << endl;
avtNullData_p nullData = new avtNullData(NULL,AVT_NULL_DATASET_MSG);
avtDataObject_p dummyDob;
CopyTo(dummyDob, nullData);
writer = dummyDob->InstantiateWriter();
writer->SetInput(dummyDob);
clearNetwork = false;
}
#endif
......@@ -1285,6 +1291,8 @@ NetworkManager::Render(intVector plotIds, bool getZBuffer)
// the misfortune of oscillating switching of modes around the threshold)
if (GetTotalGlobalCellCounts() < 0.5 * scalableThreshold)
{
debug5 << "Cell count has fallen below SR threshold. Sending the "
"AVT_NULL_IMAGE_MSG data object to viewer" << endl;
avtNullData_p nullData = new avtNullData(NULL,AVT_NULL_IMAGE_MSG);
avtDataObject_p dummyDob;
......
......@@ -49,6 +49,9 @@
// Mark C. Miller Sun Feb 29 18:08:26 PST 2004
// Initialize zValMin and zValMax
//
// Mark C. Miller, Tue Mar 2 09:58:49 PST 2004
// Removed zValMin and zValMax data members
//
// ****************************************************************************
avtSurfaceFilter::avtSurfaceFilter(const AttributeGroup *a)
......@@ -73,8 +76,6 @@ avtSurfaceFilter::avtSurfaceFilter(const AttributeGroup *a)
max = -1;
Ms = 1.;
Bs = 0.;
zValMin = 0;
zValMax = 0;
}
......@@ -214,6 +215,9 @@ avtSurfaceFilter::Equivalent(const AttributeGroup *a)
// Mark C. Miller, Sun Feb 29 18:08:26 PST 2004
// Added code to compute zValMin and zValMax
//
// Mark C. Miller, Tue Mar 2 09:58:49 PST 2004
// Removed zValMin and zValMax data members
//
// ****************************************************************************
vtkDataSet *
......@@ -268,7 +272,6 @@ avtSurfaceFilter::ExecuteData(vtkDataSet *inDS, int, std::string)
int numScalars = inScalars->GetNumberOfTuples();
outScalars->SetNumberOfTuples(numScalars);
zValMin = zValMax = inScalars->GetTuple1(0);
for (int i = 0; i < numScalars; i++)
{
// calculate and store zVals
......@@ -294,11 +297,6 @@ avtSurfaceFilter::ExecuteData(vtkDataSet *inDS, int, std::string)
}
zVal = Ms * zVal + Bs;
if (zVal > zValMax)
zValMax = zVal;
else if (zVal < zValMin)
zValMin = zVal;
outScalars->SetValue(i, zVal);
}
......@@ -534,8 +532,7 @@ avtSurfaceFilter::PreExecute(void)
// Modifications:
//
// Mark C. Miller, Sun Feb 29 17:52:19 PST 2004
// Added code to update output spatial extents from knowledge of input
// spatial extents and output zValMin and zValMax
// Added code to traverse output data extents and set them correctly
//
// ****************************************************************************
......@@ -549,14 +546,14 @@ avtSurfaceFilter::PostExecute(void)
double tform[16] = {1.,0.,0.,0.,0.,1.,0.,0.,0.,0.,0.,0.,0.,0.,0.,1.};
outAtts.SetTransform(tform);
// get the input's spatial extents
// get the outputs's spatial extents
double se[6];
GetInput()->GetInfo().GetAttributes().GetSpatialExtents(se);
avtDataset_p output = GetTypedOutput();
avtDatasetExaminer::GetSpatialExtents(output, se);
// over-write z-spatial extents with our known data extents
se[4] = zValMin;
se[5] = zValMax;
outAtts.GetTrueSpatialExtents()->Set(se);
// over-write spatial extents
outAtts.GetTrueSpatialExtents()->Clear();
outAtts.GetCumulativeTrueSpatialExtents()->Set(se);
}
......
......@@ -50,6 +50,9 @@ class vtkGeometryFilter;
// Mark C. Miller, Sun Feb 29 18:08:26 PST 2004
// Added zValMin, zValMax data members
//
// Mark C. Miller, Tue Mar 2 17:55:30 PST 2004
// Removed zValMin, zValMax
//
// ****************************************************************************
class avtSurfaceFilter : public avtStreamer
......@@ -78,8 +81,6 @@ class avtSurfaceFilter : public avtStreamer
double max;
double Ms;
double Bs;
double zValMin;
double zValMax;
bool stillNeedExtents;
double SkewTheValue(const double);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment