Commit 7e19ce72 authored by whitlocb's avatar whitlocb
Browse files

Revert streamline changes for now.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23135 18c085ea-50e0-402c-830e-de6fd14e8384
parent de9c1deb
/*****************************************************************************
*
* Copyright (c) 2000 - 2014, Lawrence Livermore National Security, LLC
* Copyright (c) 2000 - 2013, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-442911
* All rights reserved.
......@@ -193,14 +193,9 @@ static float random_11()
// Dave Pugmire, Mon Feb 21 08:22:30 EST 2011
// Color by correlation distance.
//
// Brad Whitlock, Thu Feb 27 14:25:05 PST 2014
// Initialize options for extracting time.
// Work partially supported by DOE Grant SC0007548.
//
// ****************************************************************************
avtStreamlineFilter::avtStreamlineFilter() : avtPICSFilter(),
seedVelocity(0,0,0)
avtStreamlineFilter::avtStreamlineFilter() : seedVelocity(0,0,0)
{
coloringMethod = PICS_COLOR_SPEED;
displayMethod = PICS_DISPLAY_LINES;
......@@ -227,9 +222,6 @@ avtStreamlineFilter::avtStreamlineFilter() : avtPICSFilter(),
correlationDistanceAngTol = 0.0;
correlationDistanceMinDist = 0.0;
correlationDistanceDoBBox = false;
extractTime = false;
timeArrayName = "";
}
......@@ -281,46 +273,12 @@ avtStreamlineFilter::GetCommunicationPattern()
return avtPICSFilter::RestoreSequenceAssembleUniformly;
}
// ****************************************************************************
// Method: avtStreamlineFilter::SetExtractTime
//
// Purpose:
// Sets whether we want the filter to extract the streamline time as an
// extra scalar.
//
// Arguments:
// doIt : True if we want the time as a scalar.
// name : The name of the array in which to store the time.
//
// Returns:
//
// Note: Work partially supported by DOE Grant SC0007548.
//
// Programmer: Brad Whitlock
// Creation: Thu Feb 27 14:25:51 PST 2014
//
// Modifications:
//
// ****************************************************************************
void
avtStreamlineFilter::SetExtractTime(bool doIt, const std::string &name)
{
timeArrayName = name;
extractTime = doIt;
}
// ****************************************************************************
// Method: avtStreamlineFilter::GenerateAttributeFields() const
//
// Programmer: Dave Pugmire
// Creation: November 5, 2010
//
// Modifications:
// Brad Whitlock, Thu Feb 27 15:42:06 PST 2014
// Extract time explicitly.
// Work partially supported by DOE Grant SC0007548.
//
// ****************************************************************************
unsigned char
......@@ -372,9 +330,6 @@ avtStreamlineFilter::GenerateAttributeFields() const
if (!scaleTubeRadiusVariable.empty())
attr |= avtStateRecorderIntegralCurve::SAMPLE_SCALAR2;
if (extractTime)
attr |= avtStateRecorderIntegralCurve::SAMPLE_TIME;
return attr;
}
......@@ -1019,11 +974,6 @@ avtStreamlineFilter::PostExecute(void)
// Hank Childs, Sat Jun 5 16:06:26 PDT 2010
// Call the new base class' (avtPICSFilter) method.
//
// Brad Whitlock, Fri Feb 28 12:00:51 PST 2014
// Add some hints about what coloring method was used and what colorVar
// might actually be.
// Work partially supported by DOE Grant SC0007548.
//
// ****************************************************************************
void
......@@ -1046,31 +996,6 @@ avtStreamlineFilter::UpdateDataObjectInfo(void)
atts.SetVariableDimension(1);
atts.SetCentering(AVT_NODECENT);
}
switch(coloringMethod)
{
case PICS_COLOR_SOLID:
atts.AddFilterMetaData("Streamline", "coloringMethod=PICS_COLOR_SOLID");
break;
case PICS_COLOR_SPEED:
atts.AddFilterMetaData("Streamline", "coloringMethod=PICS_COLOR_SPEED");
break;
case PICS_COLOR_VORTICITY:
atts.AddFilterMetaData("Streamline", "coloringMethod=PICS_COLOR_VORTICITY");
break;
case PICS_COLOR_ARCLENGTH:
atts.AddFilterMetaData("Streamline", "coloringMethod=PICS_COLOR_ARCLENGTH");
break;
case PICS_COLOR_TIME:
atts.AddFilterMetaData("Streamline", "coloringMethod=PICS_COLOR_TIME");
break;
case PICS_COLOR_ID:
atts.AddFilterMetaData("Streamline", "coloringMethod=PICS_COLOR_ID");
break;
case PICS_COLOR_VARIABLE:
atts.AddFilterMetaData("Streamline", "coloringMethod=PICS_COLOR_VARIABLE, colorVar=" + coloringVariable);
break;
}
}
typedef struct
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2014, Lawrence Livermore National Security, LLC
* Copyright (c) 2000 - 2013, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-442911
* All rights reserved.
......@@ -225,10 +225,6 @@ class vtkAppendPolyData;
// Dave Pugmire, Fri Jan 14 11:10:44 EST 2011
// Set default communication pattern to RestoreSequenceAssembleUniformly.
//
// Brad Whitlock, Thu Feb 27 14:22:38 PST 2014
// Add options to extract time, id.
// Work partially supported by DOE Grant SC0007548.
//
// ****************************************************************************
class IVP_API avtStreamlineFilter : virtual public avtPICSFilter
......@@ -287,8 +283,6 @@ class IVP_API avtStreamlineFilter : virtual public avtPICSFilter
correlationDistanceDoBBox = doBBox;
}
void SetExtractTime(bool doIt, const std::string &name=std::string());
void SetVelocitiesForLighting(bool v) { storeVelocitiesForLighting = v; };
void SetOpacityVariable(const std::string &var);
void SetScaleTubeRadiusVariable(const std::string &var);
......@@ -343,9 +337,6 @@ class IVP_API avtStreamlineFilter : virtual public avtPICSFilter
bool issueWarningForCriticalPoints;
double criticalPointThreshold;
bool extractTime;
std::string timeArrayName;
avtVector seedVelocity;
std::string SeedInfoString() const;
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2014, Lawrence Livermore National Security, LLC
* Copyright (c) 2000 - 2013, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-442911
* All rights reserved.
......@@ -75,51 +75,12 @@ std::string avtStreamlinePolyDataFilter::scaleRadiusArrayName = "scaleRadius";
// Programmer: Dave Pugmire
// Creation: June 16, 2008
//
// Modifications:
// Brad Whitlock, Fri Feb 28 15:55:19 PST 2014
// Added extractID, idArrayName.
// Work partially supported by DOE Grant SC0007548.
//
// ****************************************************************************
avtStreamlinePolyDataFilter::avtStreamlinePolyDataFilter() : avtStreamlineFilter(),
coordinateSystem(0), phiScalingFlag( false ), phiScaling( 1.0 ),
extractID(false), idArrayName()
avtStreamlinePolyDataFilter::avtStreamlinePolyDataFilter():
coordinateSystem(0), phiScalingFlag( false ), phiScaling( 1.0 )
{
}
avtStreamlinePolyDataFilter::~avtStreamlinePolyDataFilter()
{
}
// ****************************************************************************
// Method: avtStreamlinePolyDataFilter::SetExtractID
//
// Purpose:
// Sets whether we want the filter to extract the streamline id as an
// extra scalar.
//
// Arguments:
// doIt : True if we want the time as a scalar.
// name : The name of the array in which to store the time.
//
// Returns:
//
// Note: Work partially supported by DOE Grant SC0007548.
//
// Programmer: Brad Whitlock
// Creation: Thu Feb 27 14:25:51 PST 2014
//
// Modifications:
//
// ****************************************************************************
void
avtStreamlinePolyDataFilter::SetExtractID(bool doIt, const std::string &name)
{
idArrayName = name;
extractID = doIt;
}
// ****************************************************************************
// Method: avtStreamlineFilter::CreateIntegralCurveOutput
......@@ -181,10 +142,6 @@ avtStreamlinePolyDataFilter::SetExtractID(bool doIt, const std::string &name)
// Dave Pugmire, Mon Feb 21 08:22:30 EST 2011
// Color by correlation distance.
//
// Brad Whitlock, Thu Feb 27 14:25:05 PST 2014
// Extract time and ids as separate arrays if we want to.
// Work partially supported by DOE Grant SC0007548.
//
// ****************************************************************************
void
......@@ -282,8 +239,6 @@ avtStreamlinePolyDataFilter::CreateIntegralCurveOutput(std::vector<avtIntegralCu
vtkFloatArray *scaleTubeRad = NULL;
vtkFloatArray *thetas = NULL;
vtkFloatArray *opacity = NULL;
vtkFloatArray *times = NULL;
vtkFloatArray *ids = NULL;
lines->Allocate(numICs);
points->Allocate(numPts);
......@@ -304,20 +259,6 @@ avtStreamlinePolyDataFilter::CreateIntegralCurveOutput(std::vector<avtIntegralCu
pd->GetPointData()->AddArray(params);
pd->GetPointData()->AddArray(tangents);
if(extractTime)
{
times = vtkFloatArray::New();
times->Allocate(numPts);
times->SetName(timeArrayName.c_str());
pd->GetPointData()->AddArray(times);
}
if(extractID)
{
ids = vtkFloatArray::New();
ids->Allocate(numPts);
ids->SetName(idArrayName.c_str());
pd->GetPointData()->AddArray(ids);
}
if (displayMethod == PICS_DISPLAY_RIBBONS)
{
thetas = vtkFloatArray::New();
......@@ -460,22 +401,14 @@ avtStreamlinePolyDataFilter::CreateIntegralCurveOutput(std::vector<avtIntegralCu
}
if (scaleTubeRad)
scaleTubeRad->InsertTuple1(pIdx, s.scalar2);
// Extract time
if(times != NULL)
times->InsertTuple1(pIdx, s.time);
// Extract ids
if(ids != NULL)
ids->InsertTuple1(pIdx, ic->id);
pIdx++;
}
lines->InsertNextCell(line);
line->Delete();
}
points->Delete();
lines->Delete();
scalars->Delete();
......@@ -485,10 +418,6 @@ avtStreamlinePolyDataFilter::CreateIntegralCurveOutput(std::vector<avtIntegralCu
thetas->Delete();
if (opacity)
opacity->Delete();
if(times != NULL)
times->Delete();
if(ids != NULL)
ids->Delete();
vtkCleanPolyData *clean = vtkCleanPolyData::New();
clean->ConvertLinesToPointsOff();
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2014, Lawrence Livermore National Security, LLC
* Copyright (c) 2000 - 2013, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-442911
* All rights reserved.
......@@ -95,7 +95,7 @@ class IVP_API avtStreamlinePolyDataFilter : public avtStreamlineFilter
{
public:
avtStreamlinePolyDataFilter();
virtual ~avtStreamlinePolyDataFilter();
virtual ~avtStreamlinePolyDataFilter() {}
static std::string colorvarArrayName;
static std::string paramArrayName;
static std::string opacityArrayName;
......@@ -107,8 +107,6 @@ class IVP_API avtStreamlinePolyDataFilter : public avtStreamlineFilter
void SetPhiScaling(bool flag, double pf) {
phiScalingFlag = flag; phiScaling = pf;}
void SetExtractID(bool doIt, const std::string &name=std::string());
protected:
void CreateIntegralCurveOutput(std::vector<avtIntegralCurve *> &streamlines);
float ComputeCorrelationDistance(int idx, avtStateRecorderIntegralCurve *ic,
......@@ -119,7 +117,5 @@ class IVP_API avtStreamlinePolyDataFilter : public avtStreamlineFilter
int coordinateSystem;
bool phiScalingFlag;
double phiScaling;
bool extractID;
std::string idArrayName;
};
#endif
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