Commit 0c751ba5 authored by hrchilds's avatar hrchilds

Extents changes: rename them and calculate them less often.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@12327 18c085ea-50e0-402c-830e-de6fd14e8384
parent f31fbb28
......@@ -781,6 +781,9 @@ avtDatabase::GetOutput(const char *var, int ts)
// Tom Fogal, Fri Aug 6 16:53:50 MDT 2010
// Set level of detail info from the mesh meta data.
//
// Hank Childs, Thu Aug 26 13:02:28 PDT 2010
// Change named of extents object.
//
// ****************************************************************************
void
......@@ -802,7 +805,7 @@ avtDatabase::PopulateDataObjectInformation(avtDataObject_p &dob,
atts.SetDynamicDomainDecomposition(md->GetFormatCanDoDomainDecomposition());
string mesh = md->MeshForVar(var);
const avtMeshMetaData *mmd = md->GetMesh(mesh);
bool haveSetTrueSpatialExtents = false;
bool haveSetOriginalSpatialExtents = false;
atts.SetNumStates(md->GetNumStates());
if (mmd != NULL)
{
......@@ -844,8 +847,8 @@ avtDatabase::PopulateDataObjectInformation(avtDataObject_p &dob,
extents[2*i] = mmd->minSpatialExtents[i];
extents[2*i+1] = mmd->maxSpatialExtents[i];
}
atts.GetTrueSpatialExtents()->Set(extents);
haveSetTrueSpatialExtents = true;
atts.GetOriginalSpatialExtents()->Set(extents);
haveSetOriginalSpatialExtents = true;
}
atts.SetMeshType(mmd->meshType);
atts.SetMeshCoordType(mmd->meshCoordType);
......@@ -862,13 +865,13 @@ avtDatabase::PopulateDataObjectInformation(avtDataObject_p &dob,
//
// If we haven't set spatial extents, try using a data tree
//
if (haveSetTrueSpatialExtents == false)
if (haveSetOriginalSpatialExtents == false)
{
double extents[6];
if (GetExtentsFromAuxiliaryData(spec, mesh.c_str(),
AUXILIARY_DATA_SPATIAL_EXTENTS, extents))
{
atts.GetTrueSpatialExtents()->Set(extents);
atts.GetOriginalSpatialExtents()->Set(extents);
}
}
......@@ -917,7 +920,7 @@ avtDatabase::PopulateDataObjectInformation(avtDataObject_p &dob,
extents[0] = smd->minDataExtents;
extents[1] = smd->maxDataExtents;
atts.GetTrueDataExtents(var_list[i])->Set(extents);
atts.GetOriginalDataExtents(var_list[i])->Set(extents);
}
else
{
......@@ -925,7 +928,7 @@ avtDatabase::PopulateDataObjectInformation(avtDataObject_p &dob,
if (GetExtentsFromAuxiliaryData(spec, var_list[i],
AUXILIARY_DATA_DATA_EXTENTS, extents))
{
atts.GetTrueDataExtents(var_list[i])->Set(extents);
atts.GetOriginalDataExtents(var_list[i])->Set(extents);
}
}
}
......@@ -951,7 +954,7 @@ avtDatabase::PopulateDataObjectInformation(avtDataObject_p &dob,
double extents[6]; // 6 is probably too much, but better to be safe
extents[0] = vmd->minDataExtents;
extents[1] = vmd->maxDataExtents;
atts.GetTrueDataExtents(var_list[i])->Set(extents);
atts.GetOriginalDataExtents(var_list[i])->Set(extents);
}
else
{
......@@ -959,7 +962,7 @@ avtDatabase::PopulateDataObjectInformation(avtDataObject_p &dob,
if (GetExtentsFromAuxiliaryData(spec, var_list[i],
AUXILIARY_DATA_DATA_EXTENTS, extents))
{
atts.GetTrueDataExtents(var_list[i])->Set(extents);
atts.GetOriginalDataExtents(var_list[i])->Set(extents);
}
}
}
......@@ -1013,8 +1016,8 @@ avtDatabase::PopulateDataObjectInformation(avtDataObject_p &dob,
double extents[2];
extents[0] = 0.;
extents[1] = 1.;
atts.GetEffectiveDataExtents(var_list[i])->Set(extents);
atts.GetTrueDataExtents(var_list[i])->Set(extents);
atts.GetDesiredDataExtents(var_list[i])->Set(extents);
atts.GetOriginalDataExtents(var_list[i])->Set(extents);
}
const avtCurveMetaData *cmd = GetMetaData(ts)->GetCurve(var_list[i]);
......@@ -1034,7 +1037,7 @@ avtDatabase::PopulateDataObjectInformation(avtDataObject_p &dob,
double extents[6]; // 6 is probably too much, but better to be safe
extents[0] = cmd->minDataExtents;
extents[1] = cmd->maxDataExtents;
atts.GetTrueDataExtents(var_list[i])->Set(extents);
atts.GetOriginalDataExtents(var_list[i])->Set(extents);
}
else
{
......@@ -1042,7 +1045,7 @@ avtDatabase::PopulateDataObjectInformation(avtDataObject_p &dob,
if (GetExtentsFromAuxiliaryData(spec, var_list[i],
AUXILIARY_DATA_DATA_EXTENTS, extents))
{
atts.GetTrueDataExtents(var_list[i])->Set(extents);
atts.GetOriginalDataExtents(var_list[i])->Set(extents);
}
}
}
......
......@@ -3726,11 +3726,13 @@ avtGenericDatabase::MaterialSelect(vtkDataSet *ds, avtMaterial *mat,
//
stringVector labelStrings;
cerr << "Type = " << type << ", mat = " << AVT_MATERIAL << endl;
if (type == AVT_MATERIAL)
{
if (needInternalSurfaces)
{
labelStrings = labels;
cerr << "Adding mixed" << endl;
// add the one for the "mixed material"
labelStrings.push_back("mixed");
}
......@@ -3744,6 +3746,7 @@ avtGenericDatabase::MaterialSelect(vtkDataSet *ds, avtMaterial *mat,
//
char buff[32];
string label;
cerr << "Num selected = " << numSelected << endl;
sprintf(buff, "%d;", numSelected);
label += buff;
for (int i = 0; i < numSelected; i++)
......@@ -3754,6 +3757,7 @@ avtGenericDatabase::MaterialSelect(vtkDataSet *ds, avtMaterial *mat,
else
label += string(buff) + labels[i] + ";";
}
cerr << "Label = " << label << endl;
labelStrings.push_back(label);
}
}
......@@ -3789,6 +3793,7 @@ avtGenericDatabase::MaterialSelect(vtkDataSet *ds, avtMaterial *mat,
}
}
cerr << "We have " << numOutput << " with " << labelStrings.size() << " strings" << endl;
avtDataTree_p outDT = new avtDataTree(numOutput, out_ds, dom, labelStrings);
for (int i = 0 ; i < numOutput ; i++)
{
......
......@@ -66,6 +66,7 @@
#include <DebugStream.h>
#include <ExpressionException.h>
#include <snprintf.h>
#include <TimingsManager.h>
using namespace std;
......@@ -76,15 +77,20 @@ using namespace std;
// Creation: June 9, 2002
//
// Modifications:
//
// Kathleen Bonnell, Mon Jun 28 07:48:55 PDT 2004
// Initialize currentTimeState.
//
// Hank Childs, Thu Aug 26 16:36:30 PDT 2010
// Initialize calculateExtents.
//
// ****************************************************************************
avtExpressionFilter::avtExpressionFilter()
{
outputVariableName = NULL;
currentTimeState = 0;
calculateExtents = false;
}
......@@ -208,6 +214,10 @@ avtExpressionFilter::SetOutputVariableName(const char *name)
// Hank Childs, Sun Jan 13 13:46:15 PST 2008
// Add support for derived types that cannot handle singleton constants.
//
// Hank Childs, Thu Aug 26 13:47:30 PDT 2010
// Change extents names. Only calculate extents if we need it for that
// variable.
//
// ****************************************************************************
void
......@@ -220,9 +230,13 @@ avtExpressionFilter::PreExecute(void)
}
avtDatasetToDatasetFilter::PreExecute();
double exts[2] = {FLT_MAX, -FLT_MAX};
GetOutput()->GetInfo().GetAttributes().GetCumulativeTrueDataExtents()
->Set(exts);
if (calculateExtents)
{
double exts[2] = {FLT_MAX, -FLT_MAX};
GetOutput()->GetInfo().GetAttributes().
GetThisProcsOriginalDataExtents(outputVariableName)->Set(exts);
}
}
......@@ -253,6 +267,9 @@ avtExpressionFilter::PreExecute(void)
// Hank Childs, Tue Aug 30 13:30:28 PDT 2005
// Update the extents in the data attributes.
//
// Hank Childs, Thu Aug 26 16:36:30 PDT 2010
// Only calculate extents if we need extents for that variable.
//
// ****************************************************************************
void
......@@ -262,7 +279,12 @@ avtExpressionFilter::PostExecute(void)
avtDatasetToDatasetFilter::PostExecute();
OutputSetActiveVariable(outputVariableName);
UpdateExtents(GetDataTree());
if (calculateExtents)
{
int t1 = visitTimer->StartTimer();
UpdateExtents(GetDataTree());
visitTimer->StopTimer(t1, "Calculating extents for expression");
}
}
......@@ -296,6 +318,9 @@ avtExpressionFilter::PostExecute(void)
// Make the use of isfinite conditional, since not all platforms support
// it (IRIX64 6.5 with MIPSpro 7.41, solaris with gcc 3.2).
//
// Hank Childs, Thu Aug 26 13:47:30 PDT 2010
// Change extents names.
//
// ****************************************************************************
void
......@@ -409,7 +434,7 @@ avtExpressionFilter::UpdateExtents(avtDataTree_p tree)
avtDataAttributes &outatts = GetOutput()->GetInfo().GetAttributes();
outatts.GetCumulativeTrueDataExtents(outputVariableName)->Merge(exts);
outatts.GetThisProcsOriginalDataExtents(outputVariableName)->Merge(exts);
// Update component extents in array variables
if (outatts.GetVariableType(outputVariableName) == AVT_ARRAY_VAR)
......@@ -563,16 +588,16 @@ avtExpressionFilter::SetExpressionAttributes(const avtDataAttributes &inputAtts,
// ****************************************************************************
avtContract_p
avtExpressionFilter::ModifyContract(avtContract_p spec)
avtExpressionFilter::ModifyContract(avtContract_p contract)
{
avtContract_p rv = spec;
avtContract_p rv = contract;
avtDataRequest_p ds = spec->GetDataRequest();
avtDataRequest_p ds = contract->GetDataRequest();
if (ds->HasSecondaryVariable(outputVariableName))
{
avtDataRequest_p newds = new avtDataRequest(ds);
newds->RemoveSecondaryVariable(outputVariableName);
rv = new avtContract(spec, newds);
rv = new avtContract(contract, newds);
}
return rv;
......@@ -768,13 +793,23 @@ avtExpressionFilter::Recenter(vtkDataSet *ds, vtkDataArray *arr,
// Programmer: Kathleen Bonnell
// Creation: June 25, 2004
//
// Modifications:
//
// Hank Childs, Thu Aug 26 16:36:30 PDT 2010
// Initialize calculateExtents.
//
// ****************************************************************************
void
avtExpressionFilter::ExamineContract(avtContract_p spec)
avtExpressionFilter::ExamineContract(avtContract_p contract)
{
avtDatasetToDatasetFilter::ExamineContract(spec);
currentTimeState = spec->GetDataRequest()->GetTimestep();
if (contract->ShouldCalculateVariableExtents(outputVariableName))
calculateExtents = true;
else
calculateExtents = false;
avtDatasetToDatasetFilter::ExamineContract(contract);
currentTimeState = contract->GetDataRequest()->GetTimestep();
}
......
......@@ -118,6 +118,9 @@ class ExprNode;
// Kathleen Bonnell, Fri May 8 13:44:16 PDT 2009
// Added method GetNumericVal (moved from avtCylindricalRadiusExpression.h.
//
// Hank Childs, Thu Aug 26 16:36:30 PDT 2010
// Add data member for whether or not to calculate the extents.
//
// ****************************************************************************
class EXPRESSION_API avtExpressionFilter : virtual public
......@@ -147,6 +150,7 @@ class EXPRESSION_API avtExpressionFilter : virtual public
protected:
char *outputVariableName;
int currentTimeState;
bool calculateExtents;
virtual bool IsPointVariable();
......
......@@ -94,6 +94,7 @@ avtCMFEExpression::avtCMFEExpression()
varDim = 1;;
isNodal = false;
onDemandProcessing = false;
calculateMeshExtents = false;
}
......@@ -364,6 +365,10 @@ avtCMFEExpression::ProcessArguments(ArgsExpr *args,
//
// Mark C. Miller, Wed Jun 17 14:23:25 PDT 2009
// Replaced CATCH(...) with CATCHALL
//
// Hank Childs, Thu Aug 26 23:36:03 PDT 2010
// Pass along Booleans for which extents we should calculate.
//
// ****************************************************************************
void
......@@ -418,6 +423,8 @@ avtCMFEExpression::Execute()
spec->GetDataRequest()->SetTimestep(actualTimestep);
spec->GetDataRequest()->SetDesiredGhostDataType(ghostNeeds);
spec->SetOnDemandStreaming(onDemandProcessing);
spec->SetCalculateMeshExtents(calculateMeshExtents);
spec->SetCalculateVariableExtentsList(varExtentsList);
for (int i = 0 ; i < dataSels.size() ; i++)
spec->GetDataRequest()->AddDataSelectionRefPtr(dataSels[i]);
......@@ -647,6 +654,9 @@ avtCMFEExpression::GetTimestate(ref_ptr<avtDatabase> dbp)
// Hank Childs, Tue Mar 24 13:18:10 CDT 2009
// Store the data selections so we can put them in the new contract.
//
// Hank Childs, Thu Aug 26 23:36:03 PDT 2010
// Store what extents should be calculated.
//
// ****************************************************************************
void
......@@ -663,6 +673,8 @@ avtCMFEExpression::ExamineContract(avtContract_p spec)
for (int i = 0 ; i < numSels ; i++)
dataSels.push_back(spec->GetDataRequest()->GetDataSelection(i));
onDemandProcessing = spec->DoingOnDemandStreaming();
calculateMeshExtents = spec->ShouldCalculateMeshExtents();
varExtentsList = spec->GetCalculateVariableExtentsList();
}
......@@ -86,6 +86,9 @@ class avtDatabase;
// Hank Childs, Tue Mar 24 13:18:10 CDT 2009
// Add data member for data selections.
//
// Hank Childs, Thu Aug 26 23:36:03 PDT 2010
// Add data members for extents calculations.
//
// ****************************************************************************
class EXPRESSION_API avtCMFEExpression : public avtExpressionFilter
......@@ -122,6 +125,8 @@ class EXPRESSION_API avtCMFEExpression : public avtExpressionFilter
int varDim;
bool isNodal;
std::vector<std::string> varnames;
std::vector<std::string> varExtentsList;
bool calculateMeshExtents;
virtual void PreExecute(void);
virtual void Execute(void);
......
......@@ -178,6 +178,9 @@ avtExecuteThenTimeLoopFilter::FinalizeTimeLoop()
// Hank Childs, Wed Jan 6 16:13:00 PST 2010
// Only merge the extents if they have the same dimension.
//
// Hank Childs, Thu Aug 26 13:47:30 PDT 2010
// Change extents names.
//
// ****************************************************************************
void
......@@ -219,21 +222,21 @@ avtExecuteThenTimeLoopFilter::Execute(void)
avtDataAttributes &inAtts = ds->GetInfo().GetAttributes();
if (outAtts.GetSpatialDimension() == inAtts.GetSpatialDimension())
{
outAtts.GetTrueSpatialExtents()->Merge(*(inAtts.GetTrueSpatialExtents()));
outAtts.GetCumulativeTrueSpatialExtents()->Merge(*(inAtts.GetCumulativeTrueSpatialExtents()));
outAtts.GetEffectiveSpatialExtents()->Merge(*(inAtts.GetEffectiveSpatialExtents()));
outAtts.GetCurrentSpatialExtents()->Merge(*(inAtts.GetCurrentSpatialExtents()));
outAtts.GetCumulativeCurrentSpatialExtents()->Merge(*(inAtts.GetCumulativeCurrentSpatialExtents()));
outAtts.GetOriginalSpatialExtents()->Merge(*(inAtts.GetOriginalSpatialExtents()));
outAtts.GetThisProcsOriginalSpatialExtents()->Merge(*(inAtts.GetThisProcsOriginalSpatialExtents()));
outAtts.GetDesiredSpatialExtents()->Merge(*(inAtts.GetDesiredSpatialExtents()));
outAtts.GetActualSpatialExtents()->Merge(*(inAtts.GetActualSpatialExtents()));
outAtts.GetThisProcsActualSpatialExtents()->Merge(*(inAtts.GetThisProcsActualSpatialExtents()));
}
for (int j = 0 ; j < outAtts.GetNumberOfVariables() ; j++)
{
const char *vname = outAtts.GetVariableName(j).c_str();
outAtts.GetTrueDataExtents(vname)->Merge(*(inAtts.GetTrueDataExtents(vname)));
outAtts.GetCumulativeTrueDataExtents(vname)->Merge(*(inAtts.GetCumulativeTrueDataExtents(vname)));
outAtts.GetEffectiveDataExtents(vname)->Merge(*(inAtts.GetEffectiveDataExtents(vname)));
outAtts.GetCurrentDataExtents(vname)->Merge(*(inAtts.GetCurrentDataExtents(vname)));
outAtts.GetCumulativeCurrentDataExtents(vname)->Merge(*(inAtts.GetCumulativeCurrentDataExtents(vname)));
outAtts.GetOriginalDataExtents(vname)->Merge(*(inAtts.GetOriginalDataExtents(vname)));
outAtts.GetThisProcsOriginalDataExtents(vname)->Merge(*(inAtts.GetThisProcsOriginalDataExtents(vname)));
outAtts.GetDesiredDataExtents(vname)->Merge(*(inAtts.GetDesiredDataExtents(vname)));
outAtts.GetActualDataExtents(vname)->Merge(*(inAtts.GetActualDataExtents(vname)));
outAtts.GetThisProcsActualDataExtents(vname)->Merge(*(inAtts.GetThisProcsActualDataExtents(vname)));
}
avtCallback::ResetTimeout(5*60);
......
......@@ -201,6 +201,9 @@ avtExpressionEvaluatorFilter::Execute(void)
new avtDataRequest(lastUsedSpec->GetDataRequest());
new_dataRequest->SetTimestep(currentTimeState);
contract = new avtContract(contract, new_dataRequest);
contract->SetCalculateVariableExtentsList(
lastUsedSpec->GetCalculateVariableExtentsList());
contract->SetCalculateMeshExtents(lastUsedSpec->ShouldCalculateMeshExtents());
contract->SetOnDemandStreaming(onDemandProcessing);
bottom->Update(contract);
GetOutput()->Copy(*(bottom->GetOutput()));
......@@ -394,8 +397,7 @@ avtExpressionEvaluatorFilter::AdditionalPipelineFilters(void)
// ****************************************************************************
avtContract_p
avtExpressionEvaluatorFilter::ModifyContract(
avtContract_p spec)
avtExpressionEvaluatorFilter::ModifyContract(avtContract_p spec)
{
pipelineState.Clear();
int i;
......
......@@ -101,6 +101,11 @@ avtNeighborExpression::~avtNeighborExpression()
// Programmer: Akira Haddox
// Creation: June 27, 2002
//
// Modifications:
//
// Hank Childs, Thu Aug 26 13:47:30 PDT 2010
// Change extents names.
//
// ****************************************************************************
vtkDataSet *
......@@ -191,7 +196,7 @@ avtNeighborExpression::ExecuteData(vtkDataSet *in_ds, int, std::string)
exts[0] = range[0];
exts[1] = range[1];
GetOutput()->GetInfo().GetAttributes().GetTrueDataExtents()->Merge(exts);
GetOutput()->GetInfo().GetAttributes().GetOriginalDataExtents()->Merge(exts);
data->Delete();
verts->Delete();
......
......@@ -260,6 +260,10 @@ avtTimeIteratorExpression::ModifyContract(avtContract_p c)
// Also add a barrier, since otherwise one processor may finish well before
// the another (like 30 minutes before) and ultimately timeout.
//
// Hank Childs, Thu Aug 26 23:36:03 PDT 2010
// Don't calculate extents for each of the time slices.
// Also remove check added by Allen Sanderson.
//
// ****************************************************************************
void
......@@ -267,6 +271,7 @@ avtTimeIteratorExpression::Execute(void)
{
FinalizeTimeLoop();
avtContract_p contract = ConstructContractWithVarnames();
contract->DisableExtentsCalculations();
// Store off the original expression list.
ParsingExprList *pel = ParsingExprList::Instance();
......@@ -279,26 +284,6 @@ avtTimeIteratorExpression::Execute(void)
if (*dbp == NULL)
EXCEPTION1(InvalidFilesException, db.c_str());
avtDatabaseMetaData *md = dbp->GetMetaData(0, false, true);
if (md->GetCycles().size() == 0 || !md->AreAllCyclesAccurateAndValid())
{
avtCallback::IssueWarning("VisIt cannot choose a time state "
"for comparing databases based on a cycle, because the "
"cycles are not believed to be accurate.");
// ARS - Comment what should be done after the warning?
return;
}
if (md->GetTimes().size() == 0 || !md->AreAllTimesAccurateAndValid())
{
avtCallback::IssueWarning("VisIt cannot choose a time state "
"for comparing databases based on a time, because the "
"times are not believed to be accurate.");
// ARS - Comment what should be done after the warning?
return;
}
// The first EEF already set up its expressions ... we need a new one
// to set up filters for the CMFE expressions.
avtExpressionEvaluatorFilter myeef;
......
......@@ -48,13 +48,16 @@
# Eric Brugger, Wed Jun 30 12:59:41 PDT 2010
# I added avtXRayFilter.
#
# Hank Childs, Thu Aug 26 13:47:30 PDT 2010
# Renamed avtCurrentExtentFilter to avtActualExtentsFilter.
#
#****************************************************************************/
SET(AVTFILTERS_SOURCES
avtActualExtentsFilter.C
avtCondenseDatasetFilter.C
avtContourFilter.C
avtCoordSystemConvert.C
avtCurrentExtentFilter.C
avtCurveConstructorFilter.C
avtCustomTransform.C
avtDisplaceFilter.C
......
......@@ -37,36 +37,45 @@
*****************************************************************************/
// ************************************************************************* //
// avtCurrentExtentFilter.h //
// avtActualExtentsFilter.h //
// ************************************************************************* //
#include <avtCurrentExtentFilter.h>
#include <avtActualExtentsFilter.h>
#include <avtDataAttributes.h>
#include <avtDatasetExaminer.h>
#include <avtExtents.h>
#include <TimingsManager.h>
// ****************************************************************************
// Method: avtCurrentExtentFilter::Execute
// Method: avtActualExtentsFilter::Execute
//
// Purpose:
// This filter simply calculates extents. Do that here.
//
// Programmer: Kathleen Bonnell
// Creation: October 2, 2001
//
// Modifications:
//
// Hank Childs, Thu Aug 26 16:36:30 PDT 2010
// Call UpdateExtents.
//
// ****************************************************************************
void
avtCurrentExtentFilter::Execute(void)
avtActualExtentsFilter::Execute(void)
{
UpdateExtents();
SetOutputDataTree(GetInputDataTree());
}
// ****************************************************************************
// Method: avtCurrentExtentFilter::UpdateDataObjectInfo
// Method: avtActualExtentsFilter::UpdateExtents
//
// Purpose: Retrieves the actual data/spatial extents from the
// input and stores them in output's info.
......@@ -88,11 +97,15 @@ avtCurrentExtentFilter::Execute(void)
// Kathleen Bonnell, Thu Mar 11 11:16:17 PST 2004
// DataExtents now always have only 2 components.
//
// Hank Childs, Thu Aug 26 13:47:30 PDT 2010
// Change extents names. Only calculate the requested variables.
//
// ****************************************************************************
void
avtCurrentExtentFilter::UpdateDataObjectInfo(void)
avtActualExtentsFilter::UpdateExtents(void)
{
int t1 = visitTimer->StartTimer();
avtDataAttributes &atts = GetInput()->GetInfo().GetAttributes();
avtDataAttributes &outAtts = GetOutput()->GetInfo().GetAttributes();
avtDataset_p ds = GetTypedInput();
......@@ -102,25 +115,31 @@ avtCurrentExtentFilter::UpdateDataObjectInfo(void)
for (int i = 0 ; i < nVars ; i++)
{
const char *vname = atts.GetVariableName(i).c_str();
if (! lastContract->ShouldCalculateVariableExtents(vname))
continue;
bool foundDE = avtDatasetExaminer::GetDataExtents(ds, de, vname);
if (foundDE)
{
outAtts.GetCumulativeCurrentDataExtents(vname)->Merge(de);
outAtts.GetThisProcsActualDataExtents(vname)->Merge(de);
}
}
double se[6];
bool foundSE = avtDatasetExaminer::GetSpatialExtents(ds, se);
if (foundSE)
if (lastContract->ShouldCalculateMeshExtents())
{
outAtts.GetCumulativeCurrentSpatialExtents()->Merge(se);
double se[6];
bool foundSE = avtDatasetExaminer::GetSpatialExtents(ds, se);
if (foundSE)
{
outAtts.GetThisProcsActualSpatialExtents()->Merge(se);
}
}
visitTimer->StopTimer(t1, "Calculating the actual extents");
}
// ****************************************************************************
// Method: avtCurrentExtentFilter::FilterUnderstandsTransformedRectMesh
// Method: avtActualExtentsFilter::FilterUnderstandsTransformedRectMesh
//
// Purpose:
// If this filter returns true, this means that it correctly deals
......@@ -136,7 +155,7 @@ avtCurrentExtentFilter::UpdateDataObjectInfo(void)
// ****************************************************************************
bool
avtCurrentExtentFilter::FilterUnderstandsTransformedRectMesh()
avtActualExtentsFilter::FilterUnderstandsTransformedRectMesh()
{
// there were some changes made at lower levels which make
// this filter safe
......@@ -145,7 +164,7 @@ avtCurrentExtentFilter::FilterUnderstandsTransformedRectMesh()
// ****************************************************************************
// Method: avtCurrentExtentFilter::ModifyContract
// Method: avtActualExtentsFilter::ModifyContract
//
// Purpose:
// The base class declares that this filter can only work on floats.
......@@ -156,11 +175,17 @@ avtCurrentExtentFilter::FilterUnderstandsTransformedRectMesh()
// Programmer: Hank Childs
// Creation: August 26, 2008
//
// Modifications:
//
// Hank Childs, Thu Aug 26 16:36:30 PDT 2010
// Cache the last contract.
//
// ****************************************************************************
avtContract_p
avtCurrentExtentFilter::ModifyContract(avtContract_p c)
avtActualExtentsFilter::ModifyContract(avtContract_p c)
{
lastContract = c;
return c;
}
......
......@@ -37,11 +37,11 @@
*****************************************************************************/
// ************************************************************************* //
// avtCurrentExtentFilter.h //
// avtActualExtentsFilter.h //
// ************************************************************************* //
#ifndef AVT_CURRENT_EXTENT_FILTER_H
#define AVT_CURRENT_EXTENT_FILTER_H
#ifndef AVT_ACTUAL_EXTENTS_FILTER_H
#define AVT_ACTUAL_EXTENTS_FILTER_H
#include <filters_exports.h>
......@@ -49,10 +49,10 @@
// ****************************************************************************
// Class: avtCurrentExtentFilter
// Class: avtActualExtentsFilter
//
// Purpose: