Commit ccd113c6 authored by hrchilds's avatar hrchilds

Merge RC to trunk, picking up fix for Resample operator in parallel

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@11450 18c085ea-50e0-402c-830e-de6fd14e8384
parent c21f24ef
......@@ -369,6 +369,10 @@ avtResampleFilter::BypassResample(void)
// Tom Fogal, Wed Jun 24 20:28:04 MDT 2009
// Use new GetBounds method.
//
// Hank Childs, Thu May 20 21:33:53 CDT 2010
// Add support for distributed resampling in a way that actually
// distributes the memory footprint.
//
// ****************************************************************************
void
......@@ -616,12 +620,16 @@ avtResampleFilter::ResampleInput(void)
// Now replace the -FLT_MAX's with the default value. (See comment above.)
for (i = 0 ; i < numArrays ; i++)
{
float *ptr = (float *) vars[i]->GetVoidPointer(0);
int numTups = width*height*depth*vars[i]->GetNumberOfComponents();
for (j = 0 ; j < numTups ; j++)
ptr[j] = (ptr[j] == defaultPlaceholder
? atts.GetDefaultVal()
: ptr[j]);
int numTups = vars[i]->GetNumberOfComponents()
* vars[i]->GetNumberOfTuples();
if (numTups > 0)
{
float *ptr = (float *) vars[i]->GetVoidPointer(0);
for (j = 0 ; j < numTups ; j++)
ptr[j] = (ptr[j] == defaultPlaceholder
? atts.GetDefaultVal()
: ptr[j]);
}
}
bool iHaveData = false;
......@@ -673,21 +681,33 @@ avtResampleFilter::ResampleInput(void)
else
rg->GetPointData()->SetVectors(vars[i]);
else if (vars[i]->GetNumberOfComponents() == 1)
{
if (cellCenteredOutput)
{
rg->GetCellData()->AddArray(vars[i]);
rg->GetCellData()->SetScalars(vars[i]);
}
else
{
rg->GetPointData()->AddArray(vars[i]);
rg->GetPointData()->SetScalars(vars[i]);
}
}
else
{
if (cellCenteredOutput)
rg->GetCellData()->AddArray(vars[i]);
else
rg->GetPointData()->AddArray(vars[i]);
}
}
else
{
if (cellCenteredOutput)
rg->GetCellData()->AddArray(vars[i]);
else
rg->GetPointData()->AddArray(vars[i]);
}
}
avtDataTree_p tree = new avtDataTree(rg, 0);
......
......@@ -645,6 +645,9 @@ avtVolume::ExtractSamples(const char * const *msgs, const int *cnt, int nmsgs)
// Hank Childs, Thu May 31 23:07:02 PDT 2007
// Add support for non-scalars.
//
// Hank Childs, Thu May 20 21:33:53 CDT 2010
// Make distributed resampling work correctly.
//
// ****************************************************************************
void
......@@ -653,13 +656,6 @@ avtVolume::GetVariables(float defaultVal, vtkDataArray **arrays, int nArrays,
{
int i, j, k, l, m;
//
// Create the scalars and tell it how many elements we want.
//
for (i = 0 ; i < nArrays ; i++)
{
arrays[i]->SetNumberOfTuples(volumeWidth*volumeHeight*volumeDepth);
}
//
// Set up the indices we are going to iterate over. This is normally
......@@ -680,6 +676,15 @@ avtVolume::GetVariables(float defaultVal, vtkDataArray **arrays, int nArrays,
if (hEnd > volumeHeight)
return;
//
// Create the scalars and tell it how many elements we want.
//
int vH = hEnd-hStart;
int vW = wEnd-wStart;
int nvals = vH*vW*volumeDepth;
for (i = 0 ; i < nArrays ; i++)
arrays[i]->SetNumberOfTuples(vW*vH*volumeDepth);
int *arraySize = new int[nArrays];
for (i = 0 ; i < nArrays ; i++)
arraySize[i] = arrays[i]->GetNumberOfComponents();
......@@ -727,7 +732,7 @@ avtVolume::GetVariables(float defaultVal, vtkDataArray **arrays, int nArrays,
float sample[AVT_VARIABLE_LIMIT];
if (rays[i][j]->GetSample(k, sample))
{
int index = k*vHeight*vWidth + (i-hStart)*vWidth
int index = k*vH*vW + (i-hStart)*vW
+ (j-wStart);
int nv = 0;
for (l = 0 ; l < nArrays ; l++)
......
......@@ -14,6 +14,7 @@
<p>Welcome to VisIt's release notes page. Release 2.0.1 is primarily a bug fix release to release 2.0. It fixes additional bugs in release 2.0. Look <a href="relnotes2.0.0.html">here</a> to see a complete list of changes in release 2.0.</p>
<p><b><font size="4">Bugs fixed in version 2.0.1</font></b></p>
<ul>
<li>The resample operator's distributed resampling mode now works correctly in parallel (as one would expect).</li>
<li>A bug was fixed where number of passive scalars in legacy Nek files was being misinterpreted.</li>
<li>If a non-compliant Nek file is encountered, VisIt is better at reporting to the user why the file is non-compliant.</li>
<li>It no longer crashes the GUI when you delete the last variable in the Threshold operator's attributes window.</li>
......
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