Commit a90c3c50 authored by hrchilds's avatar hrchilds

Update from February 20, 2007

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@813 18c085ea-50e0-402c-830e-de6fd14e8384
parent 808ed79c
......@@ -152,10 +152,14 @@ VariableNamesEqual(const std::string &v1, const std::string &v2)
//
// Jeremy Meredith, Fri Aug 25 17:14:58 EDT 2006
// Added nodesAreCritical and unitCellVectors.
//
// Jeremy Meredith, Thu Feb 15 11:42:44 EST 2007
// Added support for rectilinear grids with an inherent transform.
//
// ****************************************************************************
avtMeshMetaData::avtMeshMetaData()
: AttributeSubject("sssiiiiiibDDs*ii*ssbssssssibbbbbsiiibF")
: AttributeSubject("sssiiiiiibDDs*ii*ssbssssssibbbbbsiiibFbD")
{
blockTitle = "domains";
blockPieceName = "domain";
......@@ -190,6 +194,14 @@ avtMeshMetaData::avtMeshMetaData()
unitCellVectors[j*3+k] = (j==k) ? 1.0 : 0.0;
}
}
rectilinearGridHasTransform = false;
for (int m=0; m<4; m++)
{
for (int n=0; n<4; n++)
{
rectilinearGridTransform[m*4+n] = (m==n) ? 1.0 : 0.0;
}
}
}
// ****************************************************************************
......@@ -256,12 +268,16 @@ avtMeshMetaData::avtMeshMetaData()
//
// Jeremy Meredith, Fri Aug 25 17:14:58 EDT 2006
// Added nodesAreCritical and unitCellVectors.
//
// Jeremy Meredith, Thu Feb 15 11:42:44 EST 2007
// Added support for rectilinear grids with an inherent transform.
//
// ****************************************************************************
avtMeshMetaData::avtMeshMetaData(const double *extents, std::string s, int nb,
int bo, int co, int go, int sd, int td,
avtMeshType mt)
: AttributeSubject("sssiiiiiibDDs*ii*ssbssssssibbbbbsiiibF")
: AttributeSubject("sssiiiiiibDDs*ii*ssbssssssibbbbbsiiibFbD")
{
name = s;
originalName = name;
......@@ -298,6 +314,14 @@ avtMeshMetaData::avtMeshMetaData(const double *extents, std::string s, int nb,
unitCellVectors[j*3+k] = (j==k) ? 1.0 : 0.0;
}
}
rectilinearGridHasTransform = false;
for (int m=0; m<4; m++)
{
for (int n=0; n<4; n++)
{
rectilinearGridTransform[m*4+n] = (m==n) ? 1.0 : 0.0;
}
}
}
......@@ -367,11 +391,15 @@ avtMeshMetaData::avtMeshMetaData(const double *extents, std::string s, int nb,
//
// Jeremy Meredith, Fri Aug 25 17:14:58 EDT 2006
// Added nodesAreCritical and unitCellVectors.
//
// Jeremy Meredith, Thu Feb 15 11:42:44 EST 2007
// Added support for rectilinear grids with an inherent transform.
//
// ****************************************************************************
avtMeshMetaData::avtMeshMetaData(std::string s, int nb, int bo, int co, int go,
int sd, int td, avtMeshType mt)
: AttributeSubject("sssiiiiiibDDs*ii*ssbssssssibbbbbsiiibF")
: AttributeSubject("sssiiiiiibDDs*ii*ssbssssssibbbbbsiiibFbD")
{
name = s;
originalName = name;
......@@ -411,6 +439,14 @@ avtMeshMetaData::avtMeshMetaData(std::string s, int nb, int bo, int co, int go,
unitCellVectors[j*3+k] = (j==k) ? 1.0 : 0.0;
}
}
rectilinearGridHasTransform = false;
for (int m=0; m<4; m++)
{
for (int n=0; n<4; n++)
{
rectilinearGridTransform[m*4+n] = (m==n) ? 1.0 : 0.0;
}
}
}
......@@ -479,10 +515,13 @@ avtMeshMetaData::avtMeshMetaData(std::string s, int nb, int bo, int co, int go,
// Jeremy Meredith, Fri Aug 25 17:14:58 EDT 2006
// Added nodesAreCritical and unitCellVectors.
//
// Jeremy Meredith, Thu Feb 15 11:42:44 EST 2007
// Added support for rectilinear grids with an inherent transform.
//
// ****************************************************************************
avtMeshMetaData::avtMeshMetaData(const avtMeshMetaData &rhs)
: AttributeSubject("sssiiiiiibDDs*ii*ssbssssssibbbbbsiiibF")
: AttributeSubject("sssiiiiiibDDs*ii*ssbssssssibbbbbsiiibFbD")
{
name = rhs.name;
originalName = rhs.originalName;
......@@ -529,6 +568,14 @@ avtMeshMetaData::avtMeshMetaData(const avtMeshMetaData &rhs)
unitCellVectors[j*3+k] = rhs.unitCellVectors[j*3+k];
}
}
rectilinearGridHasTransform = rhs.rectilinearGridHasTransform;
for (int m=0; m<4; m++)
{
for (int n=0; n<4; n++)
{
rectilinearGridTransform[m*4+n]=rhs.rectilinearGridTransform[m*4+n];
}
}
}
......@@ -611,6 +658,9 @@ avtMeshMetaData::~avtMeshMetaData()
// Jeremy Meredith, Fri Aug 25 17:14:58 EDT 2006
// Added nodesAreCritical and unitCellVectors.
//
// Jeremy Meredith, Thu Feb 15 11:42:44 EST 2007
// Added support for rectilinear grids with an inherent transform.
//
// ****************************************************************************
const avtMeshMetaData &
......@@ -661,6 +711,14 @@ avtMeshMetaData::operator=(const avtMeshMetaData &rhs)
unitCellVectors[j*3+k] = rhs.unitCellVectors[j*3+k];
}
}
rectilinearGridHasTransform = rhs.rectilinearGridHasTransform;
for (int m=0; m<4; m++)
{
for (int n=0; n<4; n++)
{
rectilinearGridTransform[m*4+n]=rhs.rectilinearGridTransform[m*4+n];
}
}
return *this;
}
......@@ -722,6 +780,9 @@ avtMeshMetaData::operator=(const avtMeshMetaData &rhs)
// Jeremy Meredith, Fri Aug 25 17:14:58 EDT 2006
// Added nodesAreCritical and unitCellVectors.
//
// Jeremy Meredith, Thu Feb 15 11:42:44 EST 2007
// Added support for rectilinear grids with an inherent transform.
//
// ****************************************************************************
void
......@@ -763,6 +824,8 @@ avtMeshMetaData::SelectAll()
Select(33, (void*)&meshCoordType);
Select(34, (void*)&nodesAreCritical);
Select(35, (void*)unitCellVectors, 9);
Select(36, (void*)&rectilinearGridHasTransform);
Select(37, (void*)&rectilinearGridTransform, 16);
}
......@@ -881,6 +944,9 @@ avtMeshMetaData::SetExtents(const double *extents)
// Jeremy Meredith, Fri Aug 25 17:14:58 EDT 2006
// Added nodesAreCritical and unitCellVectors.
//
// Jeremy Meredith, Thu Feb 15 11:42:44 EST 2007
// Added support for rectilinear grids with an inherent transform.
//
// ****************************************************************************
void
......@@ -1069,6 +1135,24 @@ avtMeshMetaData::Print(ostream &out, int indent) const
<< unitCellVectors[i*3+1] << " "
<< unitCellVectors[i*3+2] << endl;
}
Indent(out, indent);
out << "Rectilinear grids "
<< (rectilinearGridHasTransform ? "do " : "do not ")
<< "have an implicit transform." << endl;
if (rectilinearGridHasTransform)
{
for (int i=0; i<4; i++)
{
Indent(out, indent);
out << " [ "
<< rectilinearGridTransform[i*4+0] << " "
<< rectilinearGridTransform[i*4+1] << " "
<< rectilinearGridTransform[i*4+2] << " "
<< rectilinearGridTransform[i*4+3] << " "
<< "]" << endl;
}
}
}
......
......@@ -75,6 +75,9 @@ class avtSimulationInformation;
// Jeremy Meredith, Fri Aug 25 17:16:38 EDT 2006
// Added nodesAreCritical and unitCellVectors.
//
// Jeremy Meredith, Thu Feb 15 11:44:28 EST 2007
// Added support for rectilinear grids with an inherent transform.
//
//----------------------------------------------------------------------------
struct DBATTS_API avtMeshMetaData : public AttributeSubject
{
......@@ -120,6 +123,8 @@ struct DBATTS_API avtMeshMetaData : public AttributeSubject
avtMeshCoordType meshCoordType;
bool nodesAreCritical;
float unitCellVectors[9];
bool rectilinearGridHasTransform;
double rectilinearGridTransform[16];
public:
avtMeshMetaData();
......
......@@ -563,6 +563,9 @@ avtDatabase::GetOutput(const char *var, int ts)
// Jeremy Meredith, Mon Aug 28 16:45:10 EDT 2006
// Added unit cell vectors. Added nodesAreCritical.
//
// Jeremy Meredith, Thu Feb 15 12:53:11 EST 2007
// Added support for rectilinear grids with an inherent transform.
//
// ****************************************************************************
void
......@@ -626,6 +629,11 @@ avtDatabase::PopulateDataObjectInformation(avtDataObject_p &dob,
atts.SetMeshCoordType(mmd->meshCoordType);
atts.SetNodesAreCritical(mmd->nodesAreCritical);
atts.SetUnitCellVectors(mmd->unitCellVectors);
if (mmd->rectilinearGridHasTransform)
{
atts.SetRectilinearGridHasTransform(true);
atts.SetRectilinearGridTransform(mmd->rectilinearGridTransform);
}
}
//
......
......@@ -286,3 +286,25 @@ avtBinaryMathFilter::GetVariableDimension(void)
}
// ****************************************************************************
// Method: avtBinaryMathFilter::FilterUnderstandsTransformedRectMesh
//
// Purpose:
// If this filter returns true, this means that it correctly deals
// with rectilinear grids having an implied transform set in the
// data attributes. It can do this conditionally if desired.
//
// Arguments:
// none
//
// Programmer: Jeremy Meredith
// Creation: February 15, 2007
//
// ****************************************************************************
bool
avtBinaryMathFilter::FilterUnderstandsTransformedRectMesh()
{
// simple binary math operates only on variables and
// shouldn't be directly affected by coordinates
return true;
}
......@@ -73,6 +73,10 @@ class vtkDataArray;
// Hank Childs, Fri Aug 19 14:04:25 PDT 2005
// Do a better job of determining the variable dimension.
//
// Jeremy Meredith, Thu Feb 15 11:44:28 EST 2007
// Added support for rectilinear grids with an inherent transform.
// Binary math filters can handle these with no modifications.
//
// ****************************************************************************
class EXPRESSION_API avtBinaryMathFilter
......@@ -99,6 +103,8 @@ class EXPRESSION_API avtBinaryMathFilter
};
virtual int GetVariableDimension(void);
virtual bool FilterUnderstandsTransformedRectMesh();
avtCentering centering;
vtkDataSet *cur_mesh;
};
......
......@@ -340,3 +340,25 @@ avtUnaryMathFilter::GetVariableDimension(void)
}
// ****************************************************************************
// Method: avtUnaryMathFilter::FilterUnderstandsTransformedRectMesh
//
// Purpose:
// If this filter returns true, this means that it correctly deals
// with rectilinear grids having an implied transform set in the
// data attributes. It can do this conditionally if desired.
//
// Arguments:
// none
//
// Programmer: Jeremy Meredith
// Creation: February 15, 2007
//
// ****************************************************************************
bool
avtUnaryMathFilter::FilterUnderstandsTransformedRectMesh()
{
// simple unary math operates only on variables and
// shouldn't be directly affected by coordinates
return true;
}
......@@ -70,6 +70,10 @@ class vtkDataArray;
// Hank Childs, Fri Aug 19 14:04:25 PDT 2005
// Do a better job of determining the variable dimension.
//
// Jeremy Meredith, Thu Feb 15 11:44:28 EST 2007
// Added support for rectilinear grids with an inherent transform.
// Unary math filters can handle these with no modifications.
//
// ****************************************************************************
class EXPRESSION_API avtUnaryMathFilter : public avtSingleInputExpressionFilter
......@@ -90,6 +94,8 @@ class EXPRESSION_API avtUnaryMathFilter : public avtSingleInputExpressionFilter
{ return numInInput; };
virtual int GetVariableDimension(void);
virtual bool FilterUnderstandsTransformedRectMesh();
avtCentering centering;
vtkDataSet *cur_mesh;
};
......
......@@ -108,3 +108,36 @@ avtPosCMFEExpression::PerformCMFE(avtDataTree_p output_mesh,
}
// ****************************************************************************
// Method: avtPosCMFEAlgorithm::FilterUnderstandsTransformedRectMesh
//
// Purpose:
// If this filter returns true, this means that it correctly deals
// with rectilinear grids having an implied transform set in the
// data attributes. It can do this conditionally if desired.
//
// Arguments:
// none
//
// Programmer: Jeremy Meredith
// Creation: February 15, 2007
//
// Note:
// Report explicitly that this filter does NOT understand transformed
// rectilinear grids. This method should default to returning false
// anyway, but there are specific reasons this filter cannot yet be
// optimized in this fashion, so ensure that even if other CMFE's change
// to default to true, this one remains false until it can be fixed.
//
// ****************************************************************************
bool
avtPosCMFEExpression::FilterUnderstandsTransformedRectMesh()
{
// This avtPosCMFEAlgorithm is not optimized for transformed
// rectilinear grids. Furthermore, it calls a form of
// avtDatasetExaminer::GetSpatialExtents that also does not
// understand these transformed rectilinear grids. These
// both must be fixed before this can return 'true'.
return false;
}
......@@ -62,6 +62,14 @@ class ConstExpr;
// Programmer: Hank Childs
// Creation: October 10, 2005
//
// Modifications:
// Jeremy Meredith, Thu Jan 18 11:04:51 EST 2007
// Report explicitly that this filter does NOT understand transformed
// rectilinear grids. This method should default to returning false
// anyway, but there are specific reasons this filter cannot yet be
// optimized in this fashion, so ensure that even if other CMFE's change
// to default to true, this one remains false until it can be fixed.
//
// ****************************************************************************
class EXPRESSION_API avtPosCMFEExpression : public avtCMFEExpression
......@@ -79,6 +87,7 @@ class EXPRESSION_API avtPosCMFEExpression : public avtCMFEExpression
const std::string &);
virtual bool UseIdenticalSIL(void) { return false; };
virtual bool HasDefaultVariable(void) { return true; };
virtual bool FilterUnderstandsTransformedRectMesh();
};
......
......@@ -204,3 +204,25 @@ avtConditionalFilter::DeriveVariable(vtkDataSet *in_ds)
}
// ****************************************************************************
// Method: avtConditionalFilter::FilterUnderstandsTransformedRectMesh
//
// Purpose:
// If this filter returns true, this means that it correctly deals
// with rectilinear grids having an implied transform set in the
// data attributes. It can do this conditionally if desired.
//
// Arguments:
// none
//
// Programmer: Jeremy Meredith
// Creation: February 15, 2007
//
// ****************************************************************************
bool
avtConditionalFilter::FilterUnderstandsTransformedRectMesh()
{
// simple conditionals operate only on variables and
// shouldn't be directly affected by coordinates
return true;
}
......@@ -61,6 +61,10 @@
// Moved inlined constructor and destructor definitions to .C files
// because certain compilers have problems with them.
//
// Jeremy Meredith, Thu Feb 15 11:44:28 EST 2007
// Added support for rectilinear grids with an inherent transform.
// Simple conditionals can handle these with no modifications.
//
// ****************************************************************************
class EXPRESSION_API avtConditionalFilter
......@@ -78,6 +82,8 @@ class EXPRESSION_API avtConditionalFilter
protected:
virtual vtkDataArray *DeriveVariable(vtkDataSet *);
virtual bool FilterUnderstandsTransformedRectMesh();
};
......
......@@ -212,11 +212,16 @@ avtArrayDecomposeFilter::ProcessArguments(ArgsExpr *args,
// Programmer: Hank Childs
// Creation: July 21, 2005
//
// Modifications:
// Jeremy Meredith, Thu Feb 15 12:02:51 EST 2007
// Call inherited PreExecute before everything else.
//
// ****************************************************************************
void
avtArrayDecomposeFilter::PreExecute(void)
{
avtSingleInputExpressionFilter::PreExecute();
issuedWarning = false;
}
......
......@@ -105,12 +105,16 @@ avtDistanceToBestFitLineFilter::~avtDistanceToBestFitLineFilter()
// Creation: Fri Nov 18 16:17:07 PST 2005
//
// Modifications:
// Jeremy Meredith, Thu Feb 15 11:55:03 EST 2007
// Call inherited PreExecute before everything else.
//
// ****************************************************************************
void
avtDistanceToBestFitLineFilter::PreExecute(void)
{
avtBinaryMathFilter::PreExecute();
sums[N_SUM] = 0.;
sums[X_SUM] = 0.;
sums[Y_SUM] = 0.;
......
......@@ -95,11 +95,16 @@ avtNeighborEvaluatorFilter::~avtNeighborEvaluatorFilter()
// Programmer: Hank Childs
// Creation: January 20, 2005
//
// Modifications:
// Jeremy Meredith, Thu Feb 15 11:55:03 EST 2007
// Call inherited PreExecute before everything else.
//
// ****************************************************************************
void
avtNeighborEvaluatorFilter::PreExecute(void)
{
avtSingleInputExpressionFilter::PreExecute();
haveIssuedWarning = false;
}
......
......@@ -823,3 +823,32 @@ avtExpressionEvaluatorFilter::ExamineSpecification(avtPipelineSpecification_p ps
currentTimeState = pspec->GetDataSpecification()->GetTimestep();
}
// ****************************************************************************
// Method: avtExpressionEvaluatorFilter::FilterUnderstandsTransformedRectMesh
//
// Purpose:
// If this filter returns true, this means that it correctly deals
// with rectilinear grids having an implied transform set in the
// data attributes. It can do this conditionally if desired.
//
// Arguments:
// none
//
// Programmer: Jeremy Meredith
// Creation: February 15, 2007
//
// ****************************************************************************
bool
avtExpressionEvaluatorFilter::FilterUnderstandsTransformedRectMesh()
{
// If all of the created filters can understand a transformed
// rectilinear mesh, then return true.
vector<avtExpressionFilter*> &filters = pipelineState.GetFilters();
for (int i=0; i<filters.size(); i++)
{
if (!filters[i]->FilterUnderstandsTransformedRectMesh())
return false;
}
return true;
}
......@@ -112,6 +112,9 @@ typedef avtDDF * (*GetDDFCallback)(void *, const char *);
// Hank Childs, Sun Feb 19 09:54:19 PST 2006
// Add support for DDFs.
//
// Jeremy Meredith, Thu Feb 15 11:44:28 EST 2007
// Added support for rectilinear grids with an inherent transform.
//
// ****************************************************************************
class EXPRESSION_API avtExpressionEvaluatorFilter
......@@ -153,6 +156,7 @@ class EXPRESSION_API avtExpressionEvaluatorFilter
PerformRestriction(avtPipelineSpecification_p);
virtual int AdditionalPipelineFilters(void);
virtual void ExamineSpecification(avtPipelineSpecification_p);
virtual bool FilterUnderstandsTransformedRectMesh();
protected:
ExprPipelineState pipelineState;
......
......@@ -259,17 +259,20 @@ avtVerdictFilter::DeriveVariable(vtkDataSet *in_ds)
// Hank Childs, Thu Oct 17 08:07:53 PDT 2002
// Update for new verdict interface.
//
// Jeremy Meredith, Thu Feb 15 11:54:16 EST 2007
// Execute inherited PreExecute unconditionally before everything else.
//
// ****************************************************************************
void
avtVerdictFilter::PreExecute()
{
avtExpressionFilter::PreExecute();
#ifdef HAVE_VERDICT
if (!RequiresSizeCalculation())
return;
avtExpressionFilter::PreExecute();
VerdictSizeData.Clear();
avtDataTree_p tree = GetInputDataTree();
......
......@@ -344,3 +344,26 @@ avtCondenseDatasetFilter::ReleaseData(void)
}
// ****************************************************************************
// Method: avtCondenseDatasetFilter::FilterUnderstandsTransformedRectMesh
//
// Purpose:
// If this filter returns true, this means that it correctly deals
// with rectilinear grids having an implied transform set in the
// data attributes. It can do this conditionally if desired.
//
// Arguments:
// none
//
// Programmer: Jeremy Meredith
// Creation: February 15, 2007
//
// ****************************************************************************
bool
avtCondenseDatasetFilter::FilterUnderstandsTransformedRectMesh()
{
// the condense filter should need to do nothing special
// to handle these
return true;
}
......@@ -81,6 +81,9 @@ class vtkDataSet;
// Added a flag that tells this filter to force usage of relevant points
// filter (bypassHeuristic).
//
// Jeremy Meredith, Thu Feb 15 11:44:28 EST 2007
// Added support for rectilinear grids with an inherent transform.
//
// ****************************************************************************
class AVTFILTERS_API avtCondenseDatasetFilter : public avtStreamer
......@@ -102,6 +105,7 @@ class AVTFILTERS_API avtCondenseDatasetFilter : public avtStreamer
vtkUnstructuredGridRelevantPointsFilter *rpfUG;
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string);
virtual bool FilterUnderstandsTransformedRectMesh();
private:
bool keepAVTandVTK;
......
......@@ -117,3 +117,25 @@ avtCurrentExtentFilter::RefashionDataObjectInfo(void)
}
}
// ****************************************************************************
// Method: avtCurrentExtentFilter::FilterUnderstandsTransformedRectMesh
//
// Purpose:
// If this filter returns true, this means that it correctly deals
// with rectilinear grids having an implied transform set in the
// data attributes. It can do this conditionally if desired.
//
// Arguments:
// none
//
// Programmer: Jeremy Meredith
// Creation: February 15, 2007
//
// ****************************************************************************
bool
avtCurrentExtentFilter::FilterUnderstandsTransformedRectMesh()
{
// there were some changes made at lower levels which make
// this filter safe
return true;
}
......@@ -56,6 +56,10 @@
// Programmer: Kathleen Bonnell
// Creation: October 2, 2001
//
// Modifications:
// Jeremy Meredith, Thu Feb 15 11:44:28 EST 2007
// Added support for rectilinear grids with an inherent transform.
//
// ****************************************************************************
class AVTFILTERS_API avtCurrentExtentFilter : public avtDatasetToDatasetFilter
......@@ -71,6 +75,7 @@ class AVTFILTERS_API avtCurrentExtentFilter : public avtDatasetToDatasetFilter
protected:
virtual void Execute(void);
virtual void RefashionDataObjectInfo(void);
virtual bool FilterUnderstandsTransformedRectMesh();
};
......
......@@ -1310,3 +1310,29 @@ avtFacelistFilter::PerformRestriction(avtPipelineSpecification_p in_spec)
}
// ****************************************************************************
// Method: avtFacelistFilter::FilterUnderstandsTransformedRectMesh
//
// Purpose:
// If this filter returns true, this means that it correctly deals
// with rectilinear grids having an implied transform set in the
// data attributes. It can do this conditionally if desired.
//
// Arguments:
// none