Commit 4425d054 authored by hrchilds's avatar hrchilds
Browse files

Update from April 16, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@222 18c085ea-50e0-402c-830e-de6fd14e8384
parent 1faa99e2
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1337,13 +1337,13 @@ DatabaseCorrelation::GetInverseCorrelatedTimeState(const std::string &db,
ostream &
operator << (ostream &os, const DatabaseCorrelation &correlation)
{
os << "name = " << correlation.GetName() << endl;
os << "name = " << correlation.GetName().c_str() << endl;
os << "numStates = " << correlation.GetNumStates() << endl;
os << "method = " << DatabaseCorrelation::CorrelationMethod_ToString(correlation.GetMethod()) << endl;
os << "method = " << DatabaseCorrelation::CorrelationMethod_ToString(correlation.GetMethod()).c_str() << endl;
int i, j, index = 0;
for(i = 0; i < correlation.GetDatabaseNames().size(); ++i)
{
os << "database[" << i << "]=" << correlation.GetDatabaseNames()[i] << endl;
os << "database[" << i << "]=" << correlation.GetDatabaseNames()[i].c_str() << endl;
os << " numStates=" << correlation.GetDatabaseNStates()[i] << endl;
os << " times={";
for(j = 0; j < correlation.GetDatabaseNStates()[i]; ++j)
......
......@@ -523,19 +523,21 @@ Definition:
// Creation: Sat Jan 31 19:56:11 PST 2004
//
// Modifications:
//
// Brad Whitlock, Wed Apr 14 11:59:47 PDT 2004
// Fixed for Windows compiler.
//
// ****************************************************************************
ostream &
operator << (ostream &os, const DatabaseCorrelation &correlation)
{
os << "name = " << correlation.GetName() << endl;
os << "name = " << correlation.GetName().c_str() << endl;
os << "numStates = " << correlation.GetNumStates() << endl;
os << "method = " << DatabaseCorrelation::CorrelationMethod_ToString(correlation.GetMethod()) << endl;
os << "method = " << DatabaseCorrelation::CorrelationMethod_ToString(correlation.GetMethod()).c_str() << endl;
int i, j, index = 0;
for(i = 0; i < correlation.GetDatabaseNames().size(); ++i)
{
os << "database[" << i << "]=" << correlation.GetDatabaseNames()[i] << endl;
os << "database[" << i << "]=" << correlation.GetDatabaseNames()[i].c_str() << endl;
os << " numStates=" << correlation.GetDatabaseNStates()[i] << endl;
os << " times={";
for(j = 0; j < correlation.GetDatabaseNStates()[i]; ++j)
......
......@@ -127,6 +127,6 @@ private:
intVector condensedCycles;
};
ostream& operator << (ostream &os, const DatabaseCorrelation &);
STATE_API ostream& operator << (ostream &os, const DatabaseCorrelation &);
#endif
#ifndef QUERYOVERTIMEATTRIBUTES_H
#define QUERYOVERTIMEATTRIBUTES_H
#include <state_exports.h>
#include <string>
#include <AttributeSubject.h>
#include <QueryAttributes.h>
......@@ -19,7 +20,7 @@
//
// ****************************************************************************
class QueryOverTimeAttributes : public AttributeSubject
class STATE_API QueryOverTimeAttributes : public AttributeSubject
{
public:
enum TimeType
......
<?xml version="1.0"?>
<Attribute name="QueryOverTimeAttributes" purpose="Attributes for queries over time." persistent="false" exportAPI="" exportInclude="" codefile="QueryOverTimeAttributes.code">
<Attribute name="QueryOverTimeAttributes" purpose="Attributes for queries over time." persistent="false" exportAPI="STATE_API" exportInclude="state_exports.h" codefile="QueryOverTimeAttributes.code">
<Enum name="TimeType">
Cycle
DTime
......
......@@ -207,6 +207,9 @@ avtSILRestriction::avtSILRestriction(const SILRestrictionAttributes &silatts)
// Hank Childs, Tue Mar 23 07:28:08 PST 2004
// The compact SIL atts now only has atts for the top set that we are using.
//
// Brad Whitlock, Wed Apr 14 12:04:11 PDT 2004
// Fixed for Windows.
//
// ****************************************************************************
avtSILRestriction::avtSILRestriction(avtSIL *sil,
......@@ -219,7 +222,7 @@ avtSILRestriction::avtSILRestriction(avtSIL *sil,
int ns = GetNumSets();
useSet.reserve(ns);
for (int i = 0 ; i < ns ; i++)
for (i = 0 ; i < ns ; i++)
{
useSet.push_back(NoneUsed);
}
......@@ -257,7 +260,7 @@ avtSILRestriction::avtSILRestriction(avtSIL *sil,
if (topSet == -1)
{
debug1 << "Was not able to match up " << topSetName << " with any of "
debug1 << "Was not able to match up " << topSetName.c_str() << " with any of "
<< "the existing top sets." << endl;
EXCEPTION0(ImproperUseException);
}
......
......@@ -2332,6 +2332,9 @@ avtGenericDatabase::MaterialSelect(vtkDataSet *ds, avtMaterial *mat,
// Hank Childs, Fri Apr 9 09:02:57 PDT 2004
// Use the avtMaterial for the correct timestep to get the indices.
//
// Brad Whitlock, Wed Apr 14 12:14:42 PDT 2004
// I fixed it for Windows.
//
// ****************************************************************************
void
......@@ -2355,7 +2358,7 @@ avtGenericDatabase::GetMaterialIndices(avtMaterial *mat, vector<string> &mn,
}
if (!foundMatch)
{
debug1 << "Was unable to match material " << mn[i] << " against "
debug1 << "Was unable to match material " << mn[i].c_str() << " against "
<< "any material for this dataset. It is likely that this "
<< "material exists at another timestep, but not at this "
<< "one." << endl;
......
......@@ -176,7 +176,7 @@ avtRevolvedSurfaceArea::DeriveVariable(vtkDataSet *in_ds)
int ncells = pd_1d_nogz->GetNumberOfCells();
vtkIntArray *orig_cells = (vtkIntArray *)
pd_1d_nogz->GetCellData()->GetArray("_rsa_ncells");
for (int i = 0 ; i < ncells ; i++)
for (i = 0 ; i < ncells ; i++)
{
vtkCell *cell = pd_1d_nogz->GetCell(i);
float area = (float) GetLineArea(cell);
......
......@@ -24,6 +24,9 @@
// Kathleen Bonnell, Wed Nov 12 18:26:21 PST 2003
// Initialize keepAVTandVTK.
//
// Kathleen Bonnell, Wed Apr 14 17:51:36 PDT 2004
// Initialize bypassHeuristic.
//
// ****************************************************************************
avtCondenseDatasetFilter::avtCondenseDatasetFilter()
......@@ -31,6 +34,7 @@ avtCondenseDatasetFilter::avtCondenseDatasetFilter()
rpfPD = vtkPolyDataRelevantPointsFilter::New();
rpfUG = vtkUnstructuredGridRelevantPointsFilter::New();
keepAVTandVTK = false;
bypassHeuristic = false;
}
......@@ -88,6 +92,10 @@ avtCondenseDatasetFilter::~avtCondenseDatasetFilter()
// Kathleen Bonnell, Wed Nov 12 18:26:21 PST 2003
// Allow AVT and VTK variables to be kept if requested.
//
// Kathleen Bonnell, Wed Apr 14 17:51:36 PDT 2004
// Allow execution of relevant points filter to be forced, bypassing
// heurisitic.
//
// ****************************************************************************
vtkDataSet *
......@@ -132,13 +140,14 @@ avtCondenseDatasetFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
int nPoints = no_vars->GetNumberOfPoints();
int nCells = no_vars->GetNumberOfCells();
bool shouldTakeRelevantPoints = true;
if (2*nCells > nPoints)
if (!bypassHeuristic && 2*nCells > nPoints)
{
debug5 << "Relevant points filter stopped by heuristic. Points = "
<< nPoints << ", cells = " << nCells << endl;
shouldTakeRelevantPoints = false;
}
else if (GetInput()->GetInfo().GetAttributes().GetTopologicalDimension()
else if (!bypassHeuristic &&
GetInput()->GetInfo().GetAttributes().GetTopologicalDimension()
== 0)
{
debug5 << "Not taking relevant points because we have a point mesh."
......@@ -146,8 +155,15 @@ avtCondenseDatasetFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
}
else
{
debug5 << "Relevant points filter allowed to execute by heuristic. "
<< "Points = " << nPoints << ", cells = " << nCells << endl;
if (!bypassHeuristic)
{
debug5 << "Relevant points filter allowed to execute by heuristic. "
<< "Points = " << nPoints << ", cells = " << nCells << endl;
}
else
{
debug5 << "Relevant points filter forced to execute." << endl;
}
}
vtkDataSet *out_ds = NULL;
......
......@@ -40,6 +40,10 @@ class vtkDataSet;
// Added a flag that tells this filter to keep avt and vtk data arrays
// around, and a method for setting the flag.
//
// Kathleen Bonnell, Wed Apr 14 17:51:36 PDT 2004
// Added a flag that tells this filter to force usage of relevant points
// filter (bypassHeuristic).
//
// ****************************************************************************
class AVTFILTERS_API avtCondenseDatasetFilter : public avtStreamer
......@@ -54,6 +58,7 @@ class AVTFILTERS_API avtCondenseDatasetFilter : public avtStreamer
virtual void ReleaseData(void);
void KeepAVTandVTK(bool val) {keepAVTandVTK = val; };
void BypassHeuristic(bool val) {bypassHeuristic = val; };
protected:
vtkPolyDataRelevantPointsFilter *rpfPD;
......@@ -63,6 +68,7 @@ class AVTFILTERS_API avtCondenseDatasetFilter : public avtStreamer
private:
bool keepAVTandVTK;
bool bypassHeuristic;
};
......
......@@ -5,7 +5,7 @@
#ifndef AVT_QUERYOVERTIME_FILTER_H
#define AVT_QUERYOVERTIME_FILTER_H
#include <filters_exports.h>
#include <query_exports.h>
#include <avtDatasetToDatasetFilter.h>
......@@ -22,10 +22,12 @@
// Creation: March 19, 2004
//
// Modifications:
// Brad Whitlock, Wed Apr 14 14:56:45 PST 2004
// Fixed for Windows.
//
// ****************************************************************************
class AVTFILTERS_API avtQueryOverTimeFilter : public avtDatasetToDatasetFilter
class QUERY_API avtQueryOverTimeFilter : public avtDatasetToDatasetFilter
{
public:
avtQueryOverTimeFilter(const AttributeGroup*);
......
......@@ -22,6 +22,10 @@
// Kathleen Bonnell, Wed Mar 31 16:07:50 PST 2004
// Add min/max arguments, passed to parent class.
//
// Kathleen Bonnell, Wed Apr 14 18:00:49 PDT 2004
// Tell condense filter to bypass its heuristic and force execution of
// relevant points filter.
//
// ****************************************************************************
avtActualDataMinMaxQuery::avtActualDataMinMaxQuery(bool min, bool max)
......@@ -29,6 +33,7 @@ avtActualDataMinMaxQuery::avtActualDataMinMaxQuery(bool min, bool max)
{
condense = new avtCondenseDatasetFilter;
condense->KeepAVTandVTK(true);
condense->BypassHeuristic(true);
}
......
......@@ -337,7 +337,7 @@ avtMinMaxQuery::PostExecute(void)
minCoord[1] = v1.y;
minCoord[2] = v1.z;
}
if (!scalarCurve)
if (minElementNum == -1)
src->FindElementForPoint(var.c_str(), ts, minDomain,
elementName.c_str(), minCoord, minElementNum);
CreateMinMessage();
......@@ -352,7 +352,7 @@ avtMinMaxQuery::PostExecute(void)
maxCoord[1] = v1.y;
maxCoord[2] = v1.z;
}
if (!scalarCurve)
if (maxElementNum == -1)
src->FindElementForPoint(var.c_str(), ts, maxDomain,
elementName.c_str(), maxCoord, maxElementNum);
CreateMaxMessage();
......
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