Commit 89a31988 authored by hrchilds's avatar hrchilds

Merge avtStreamlineWrapper into avtStreamline. avtStreamlineFilter now...

Merge avtStreamlineWrapper into avtStreamline.  avtStreamlineFilter now operates directly on avtStreamlines.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@11574 18c085ea-50e0-402c-830e-de6fd14e8384
parent 4b690075
......@@ -36,6 +36,9 @@
#
# Modifications:
#
# Hank Childs, Fri Jun 4 17:03:43 CDT 2010
# Remove avtStreamlineWrapper.
#
#****************************************************************************/
SET(AVTFILTERS_SOURCES
......@@ -76,7 +79,6 @@ avtSLAlgorithm.C
avtSmoothPolyDataFilter.C
avtStreamlineFilter.C
avtStreamlinePolyDataFilter.C
avtStreamlineWrapper.C
avtSummationFilter.C
avtSurfaceFilter.C
avtTiledImageCompositor.C
......
This diff is collapsed.
......@@ -66,11 +66,14 @@ class SlaveInfo;
// Dave Pugmire, Wed Mar 18 17:17:40 EDT 2009
// Allow masters to share work loads.
//
// Dave Pugmire, Mon Mar 23 12:48:12 EDT 2009
// Change how timings are reported/calculated.
// Dave Pugmire, Mon Mar 23 12:48:12 EDT 2009
// Change how timings are reported/calculated.
//
// Dave Pugmire, Fri Sep 25 15:35:32 EDT 2009
// New counters.
// Dave Pugmire, Fri Sep 25 15:35:32 EDT 2009
// New counters.
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
......@@ -81,11 +84,11 @@ class avtMasterSlaveSLAlgorithm : public avtParSLAlgorithm
int maxCount);
virtual ~avtMasterSlaveSLAlgorithm();
virtual void Initialize(std::vector<avtStreamlineWrapper *> &);
virtual void Initialize(std::vector<avtStreamline *> &);
virtual const char* AlgoName() const {return "MasterSlave";}
virtual void ResetStreamlinesForContinueExecute();
virtual void AddStreamlines(std::vector<avtStreamlineWrapper*> &sls);
virtual void AddStreamlines(std::vector<avtStreamline*> &sls);
static avtMasterSlaveSLAlgorithm* Create(avtStreamlineFilter *slFilter,
int maxCount,
......@@ -166,7 +169,7 @@ class avtMasterSLAlgorithm : public avtMasterSlaveSLAlgorithm
virtual ~avtMasterSLAlgorithm();
virtual const char* AlgoName() const {return "MasterSlave";}
virtual void Initialize(std::vector<avtStreamlineWrapper *> &);
virtual void Initialize(std::vector<avtStreamline *> &);
protected:
virtual void RunAlgorithm();
......@@ -193,7 +196,7 @@ class avtMasterSLAlgorithm : public avtMasterSlaveSLAlgorithm
int master;
std::vector<SlaveInfo> slaveInfo, masterInfo;
std::vector<int> slDomCnts, domLoaded, slackers;
std::list<avtStreamlineWrapper *> activeSLs;
std::list<avtStreamline *> activeSLs;
void SendAllSlavesMsg(int msg);
void SendAllSlavesMsg(std::vector<int> &msg);
......@@ -247,7 +250,7 @@ class avtSlaveSLAlgorithm : public avtMasterSlaveSLAlgorithm
int masterRank);
virtual ~avtSlaveSLAlgorithm();
virtual void Initialize(std::vector<avtStreamlineWrapper *> &);
virtual void Initialize(std::vector<avtStreamline *> &);
virtual void SendStatus(bool forceSend=false);
virtual void UpdateStatus();
......@@ -257,7 +260,7 @@ class avtSlaveSLAlgorithm : public avtMasterSlaveSLAlgorithm
int master, numTerminated, timeout;
bool workToDo;
std::vector<int> status, prevStatus;
std::list<avtStreamlineWrapper *> activeSLs, oobSLs;
std::list<avtStreamline *> activeSLs, oobSLs;
void ProcessMessages(bool &done, bool &newMsg);
void HandleLatencyTimer(int activeSLCnt,
......
......@@ -114,10 +114,13 @@ avtParDomSLAlgorithm::~avtParDomSLAlgorithm()
// Establish how many streamlines there are once each proc determines if a
// seed is in the domain.
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
void
avtParDomSLAlgorithm::Initialize(vector<avtStreamlineWrapper *> &seedPts)
avtParDomSLAlgorithm::Initialize(vector<avtStreamline *> &seedPts)
{
int numRecvs = nProcs-1;
if (numRecvs > 64)
......@@ -139,19 +142,22 @@ avtParDomSLAlgorithm::Initialize(vector<avtStreamlineWrapper *> &seedPts)
//
// Modifications:
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
void
avtParDomSLAlgorithm::AddStreamlines(std::vector<avtStreamlineWrapper*> &sls)
avtParDomSLAlgorithm::AddStreamlines(std::vector<avtStreamline*> &sls)
{
//Get the SLs that I own.
for (int i = 0; i < sls.size(); i++)
{
avtStreamlineWrapper *s = sls[i];
avtStreamline *s = sls[i];
if (OwnDomain(s->domain))
{
avtVector endPt;
s->GetCurrentLocation(endPt);
s->CurrentLocation(endPt);
if (PointInDomain(endPt, s->domain))
activeSLs.push_back(s);
......@@ -168,7 +174,7 @@ avtParDomSLAlgorithm::AddStreamlines(std::vector<avtStreamlineWrapper*> &sls)
for (int i = 0; i < numSeedPoints; i++)
idBuffer[i] = 0;
list<avtStreamlineWrapper *>::iterator s;
list<avtStreamline *>::iterator s;
for (s = activeSLs.begin(); s != activeSLs.end(); ++s)
idBuffer[(*s)->id]++;
......@@ -191,7 +197,7 @@ avtParDomSLAlgorithm::AddStreamlines(std::vector<avtStreamlineWrapper*> &sls)
/*
debug5<<"Init_totalNumStreamlines= "<<totalNumStreamlines<<endl;
debug5<<"My SLs: "<<endl;
list<avtStreamlineWrapper *>::iterator s;
list<avtStreamline *>::iterator s;
for (s = activeSLs.begin(); s != activeSLs.end(); ++s)
debug5<<"ID "<<(*s)->id<<" dom= "<<(*s)->domain<<endl;
*/
......@@ -284,8 +290,8 @@ avtParDomSLAlgorithm::PreRunAlgorithm()
// integration was not handled correctly after the code refactor. Added
// HandleOOBSL().
//
// Dave Pugmire, Fri Feb 6 08:43:00 EST 2009
// Change numTerminated to numSLChange.
// Dave Pugmire, Fri Feb 6 08:43:00 EST 2009
// Change numTerminated to numSLChange.
//
// Dave Pugmire, Wed Apr 1 11:21:05 EDT 2009
// Remove ExchangeSLs() method.
......@@ -293,6 +299,9 @@ avtParDomSLAlgorithm::PreRunAlgorithm()
// Dave Pugmire, Thu Sep 24 13:52:59 EDT 2009
// Replace Execute() with RunAlgorithm().
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
void
......@@ -304,15 +313,15 @@ avtParDomSLAlgorithm::RunAlgorithm()
while (totalNumStreamlines > 0)
{
//Integrate upto maxCnt streamlines.
list<avtStreamlineWrapper *>::iterator s;
list<avtStreamline *>::iterator s;
int cnt = 0;
while (cnt < maxCnt && !activeSLs.empty())
{
avtStreamlineWrapper *s = activeSLs.front();
avtStreamline *s = activeSLs.front();
activeSLs.pop_front();
IntegrateStreamline(s);
if (s->status == avtStreamlineWrapper::TERMINATE)
if (s->status == avtStreamline::STATUS_TERMINATE)
{
debug5<<"TerminatedSL: "<<s->id<<endl;
terminatedSLs.push_back(s);
......@@ -362,10 +371,13 @@ avtParDomSLAlgorithm::RunAlgorithm()
// Dave Pugmire, Tue Nov 3 09:15:41 EST 2009
// Bug fix. Set the new domain before communicating SL.
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
void
avtParDomSLAlgorithm::HandleOOBSL(avtStreamlineWrapper *s)
avtParDomSLAlgorithm::HandleOOBSL(avtStreamline *s)
{
// The integrated streamline could lie in multiple domains.
// Duplicate the SL and send to the proper owner.
......@@ -384,7 +396,7 @@ avtParDomSLAlgorithm::HandleOOBSL(avtStreamlineWrapper *s)
}
else
{
vector<avtStreamlineWrapper *> sls;
vector<avtStreamline *> sls;
sls.push_back(s);
SendSLs(domRank, sls);
//debug5<<"Handle OOB: id= "<<s->id<<" "<<s->domain<<" --> "<<domRank<<endl;
......@@ -403,6 +415,8 @@ avtParDomSLAlgorithm::HandleOOBSL(avtStreamlineWrapper *s)
//
// Modifications:
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
......@@ -411,7 +425,7 @@ avtParDomSLAlgorithm::ResetStreamlinesForContinueExecute()
{
while (! terminatedSLs.empty())
{
avtStreamlineWrapper *s = terminatedSLs.front();
avtStreamline *s = terminatedSLs.front();
terminatedSLs.pop_front();
activeSLs.push_back(s);
......
......@@ -62,8 +62,8 @@
// integration was not handled correctly after the code refactor. Added
// HandleOOBSL().
//
// Dave Pugmire, Fri Feb 6 08:43:00 EST 2009
// Change numTerminated to numSLChange.
// Dave Pugmire, Fri Feb 6 08:43:00 EST 2009
// Change numTerminated to numSLChange.
//
// Dave Pugmire, Wed Apr 1 11:21:05 EDT 2009
// Remove ExchangeSLs.
......@@ -77,6 +77,9 @@
// Hank Childs, Fri Feb 19 16:20:45 CST 2010
// Add PreRunAlgorithm.
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
class avtParDomSLAlgorithm : public avtParSLAlgorithm
......@@ -85,8 +88,8 @@ class avtParDomSLAlgorithm : public avtParSLAlgorithm
avtParDomSLAlgorithm(avtStreamlineFilter *slFilter, int maxCount);
virtual ~avtParDomSLAlgorithm();
virtual void Initialize(std::vector<avtStreamlineWrapper *> &);
virtual void AddStreamlines(std::vector<avtStreamlineWrapper*> &sls);
virtual void Initialize(std::vector<avtStreamline *> &);
virtual void AddStreamlines(std::vector<avtStreamline*> &sls);
virtual void ResetStreamlinesForContinueExecute();
virtual const char* AlgoName() const {return "ParallelStaticDomains";}
......@@ -94,11 +97,11 @@ class avtParDomSLAlgorithm : public avtParSLAlgorithm
virtual void RunAlgorithm();
virtual void PreRunAlgorithm();
void ExchangeTermination();
void HandleOOBSL(avtStreamlineWrapper *s);
void HandleOOBSL(avtStreamline *s);
int numSLChange, totalNumStreamlines;
std::list<avtStreamlineWrapper *> activeSLs;
std::list<avtStreamline *> activeSLs;
int maxCnt;
};
......
This diff is collapsed.
......@@ -63,8 +63,8 @@
// Dave Pugmire, Tue Mar 17 12:02:10 EDT 2009
// Create a new RecvSLs method that doesn't check for domain inclusion.
//
// Dave Pugmire, Mon Mar 23 12:48:12 EDT 2009
// Change how timings are reported/calculated.
// Dave Pugmire, Mon Mar 23 12:48:12 EDT 2009
// Change how timings are reported/calculated.
//
// Dave Pugmire, Wed Apr 1 11:21:05 EDT 2009
// Message size and number of receives as member data. Add msgID to track msgs.
......@@ -73,6 +73,9 @@
// Replace Execute() with RunAlgorithm(). Add a Pre/Post RunAlgorithm.
// Add code to exchange communicated SLs after all processing is complete.
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
class avtParSLAlgorithm : public avtSLAlgorithm
......@@ -81,7 +84,7 @@ class avtParSLAlgorithm : public avtSLAlgorithm
avtParSLAlgorithm(avtStreamlineFilter *slFilter);
virtual ~avtParSLAlgorithm();
virtual void Initialize(std::vector<avtStreamlineWrapper *> &,
virtual void Initialize(std::vector<avtStreamline *> &,
int, int);
virtual void PostExecute();
......@@ -97,19 +100,19 @@ class avtParSLAlgorithm : public avtSLAlgorithm
void SendAllMsg(std::vector<int> &msg);
void RecvMsgs(std::vector<std::vector<int> > &msgs);
void SendSLs(int dst,
std::vector<avtStreamlineWrapper*> &);
std::vector<avtStreamline*> &);
bool DoSendSLs(int dst,
std::vector<avtStreamlineWrapper*> &);
int RecvSLs(std::list<avtStreamlineWrapper*> &);
int RecvSLs(std::list<avtStreamlineWrapper*> &,
std::vector<avtStreamline*> &);
int RecvSLs(std::list<avtStreamline*> &);
int RecvSLs(std::list<avtStreamline*> &,
int &earlyTerminations);
bool ExchangeSLs(std::list<avtStreamlineWrapper *> &,
std::vector<std::vector<avtStreamlineWrapper *> >&,
bool ExchangeSLs(std::list<avtStreamline *> &,
std::vector<std::vector<avtStreamline *> >&,
int &earlyTerminations );
void MergeTerminatedSLSequences();
int rank, nProcs;
std::list<avtStreamlineWrapper *> communicatedSLs;
std::list<avtStreamline *> communicatedSLs;
std::map<MPI_Request, unsigned char*> sendSLBufferMap, recvSLBufferMap;
std::map<MPI_Request, int *> sendIntBufferMap, recvIntBufferMap;
......
......@@ -48,8 +48,8 @@
using namespace std;
static bool slDomainCompare(const avtStreamlineWrapper *slA,
const avtStreamlineWrapper *slB)
static bool slDomainCompare(const avtStreamline *slA,
const avtStreamline *slB)
{
return slA->sortKey < slB->sortKey;
}
......@@ -118,14 +118,17 @@ avtSLAlgorithm::~avtSLAlgorithm()
// Hank Childs, Thu Jun 3 10:22:16 PDT 2010
// Use new name "GetCurrentLocation".
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
vtkDataSet *
avtSLAlgorithm::GetDomain(avtStreamlineWrapper *slSeg)
avtSLAlgorithm::GetDomain(avtStreamline *sl)
{
avtVector pt;
slSeg->GetCurrentLocation(pt);
return GetDomain(slSeg->domain, pt.x, pt.y, pt.z);
sl->CurrentLocation(pt);
return GetDomain(sl->domain, pt.x, pt.y, pt.z);
}
// ****************************************************************************
......@@ -159,10 +162,15 @@ avtSLAlgorithm::GetDomain(const DomainType &dom, double X, double Y, double Z)
// Programmer: Dave Pugmire
// Creation: January 27, 2009
//
// Modifications:
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
void
avtSLAlgorithm::IntegrateStreamline(avtStreamlineWrapper *s)
avtSLAlgorithm::IntegrateStreamline(avtStreamline *s)
{
int timerHandle = visitTimer->StartTimer();
......@@ -186,10 +194,13 @@ avtSLAlgorithm::IntegrateStreamline(avtStreamlineWrapper *s)
// Dave Pugmire, Mon Feb 23 13:38:49 EST 2009
// Initialize the initial domain load count and timer.
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
void
avtSLAlgorithm::Initialize(vector<avtStreamlineWrapper *> &seedPts)
avtSLAlgorithm::Initialize(vector<avtStreamline *> &seedPts)
{
numSeedPoints = seedPts.size();
......@@ -234,6 +245,9 @@ avtSLAlgorithm::Execute()
// Dave Pugmire, Tue Mar 24 08:15:04 EDT 2009
// Report stats if timer is enabled.
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
void
......@@ -241,7 +255,7 @@ avtSLAlgorithm::PostExecute()
{
debug1<<"avtSLAlgorithm::PostExecute()\n";
vector<avtStreamlineWrapper *> v;
vector<avtStreamline *> v;
while (! terminatedSLs.empty())
{
......@@ -275,13 +289,16 @@ avtSLAlgorithm::PostExecute()
// Dave Pugmire, Tue Aug 11 13:44:44 EDT 2009
// Fix compiler warning.
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
void
avtSLAlgorithm::SortStreamlines(list<avtStreamlineWrapper *> &sl)
avtSLAlgorithm::SortStreamlines(list<avtStreamline *> &sl)
{
int timerHandle = visitTimer->StartTimer();
list<avtStreamlineWrapper*>::iterator s;
list<avtStreamline*>::iterator s;
//Set sortkey to -domain. (So that loaded domains sort first).
for (s=sl.begin(); s != sl.end(); ++s)
......@@ -315,13 +332,16 @@ avtSLAlgorithm::SortStreamlines(list<avtStreamlineWrapper *> &sl)
// Dave Pugmire, Tue Mar 10 12:41:11 EDT 2009
// Generalized domain to include domain/time. Pathine cleanup.
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
void
avtSLAlgorithm::SortStreamlines(vector<avtStreamlineWrapper *> &sl)
avtSLAlgorithm::SortStreamlines(vector<avtStreamline *> &sl)
{
int timerHandle = visitTimer->StartTimer();
vector<avtStreamlineWrapper*>::iterator s;
vector<avtStreamline*>::iterator s;
//Set sortkey to -domain. (So that loaded domains sort first).
for (s=sl.begin(); s != sl.end(); ++s)
......@@ -348,13 +368,15 @@ avtSLAlgorithm::SortStreamlines(vector<avtStreamlineWrapper *> &sl)
//
// Modifications:
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
void
avtSLAlgorithm::GetTerminatedSLs(vector<avtStreamlineWrapper *> &v)
avtSLAlgorithm::GetTerminatedSLs(vector<avtStreamline *> &v)
{
list<avtStreamlineWrapper *>::const_iterator s;
list<avtStreamline *>::const_iterator s;
for (s=terminatedSLs.begin(); s != terminatedSLs.end(); ++s)
v.push_back(*s);
......@@ -372,12 +394,15 @@ avtSLAlgorithm::GetTerminatedSLs(vector<avtStreamlineWrapper *> &v)
//
// Modifications:
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
void
avtSLAlgorithm::DeleteStreamlines(std::vector<int> &slIDs)
{
list<avtStreamlineWrapper *>::iterator s;
list<avtStreamline *>::iterator s;
vector<int>::const_iterator i;
for (s=terminatedSLs.begin(); s != terminatedSLs.end(); ++s)
......
......@@ -44,7 +44,7 @@
#define AVT_SL_ALGORITHM_H
#include <avtStreamlineFilter.h>
#include "avtStreamlineWrapper.h"
#include "avtStreamline.h"
// ****************************************************************************
// Class: avtSLAlgorithm
......@@ -87,6 +87,9 @@
// Dave Pugmire, Tue May 25 10:15:35 EDT 2010
// Added DeleteStreamlines method.
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
class avtSLAlgorithm
......@@ -96,12 +99,12 @@ class avtSLAlgorithm
virtual ~avtSLAlgorithm();
//Execution of the algorithm.
virtual void Initialize(std::vector<avtStreamlineWrapper *> &);
virtual void Initialize(std::vector<avtStreamline *> &);
void Execute();
virtual void ResetStreamlinesForContinueExecute() = 0;
virtual void PostExecute();
virtual void GetTerminatedSLs(vector<avtStreamlineWrapper *> &v);
virtual void AddStreamlines(std::vector<avtStreamlineWrapper*> &sls) = 0;
virtual void GetTerminatedSLs(vector<avtStreamline *> &v);
virtual void AddStreamlines(std::vector<avtStreamline*> &sls) = 0;
virtual void DeleteStreamlines(std::vector<int> &slIDs);
protected:
......@@ -110,7 +113,7 @@ class avtSLAlgorithm
virtual void PostRunAlgorithm() {}
avtStreamlineFilter *streamlineFilter;
std::list<avtStreamlineWrapper *> terminatedSLs;
std::list<avtStreamline *> terminatedSLs;
int numDomains, numTimeSteps, numSeedPoints;
virtual const char* AlgoName() const = 0;
......@@ -118,8 +121,8 @@ class avtSLAlgorithm
avtIVPSolver * GetSolver() {return streamlineFilter->solver; }
virtual bool PointInDomain(avtVector &pt, DomainType &dom)
{ return streamlineFilter->avtStreamlineFilter::PointInDomain(pt, dom); }
virtual void IntegrateStreamline(avtStreamlineWrapper *slSeg);
vtkDataSet *GetDomain(avtStreamlineWrapper *slSeg);
virtual void IntegrateStreamline(avtStreamline *sl);
vtkDataSet *GetDomain(avtStreamline *sl);
vtkDataSet *GetDomain(const DomainType &dom,
double X=0, double Y=0, double Z=0);
virtual bool DomainLoaded(DomainType &dom) const
......@@ -132,8 +135,8 @@ class avtSLAlgorithm
int DomCacheSize() const { return streamlineFilter->cacheQLen; }
//Utility functions.
virtual void SortStreamlines(std::list<avtStreamlineWrapper *> &);
virtual void SortStreamlines(std::vector<avtStreamlineWrapper *> &);
virtual void SortStreamlines(std::list<avtStreamline *> &);
virtual void SortStreamlines(std::vector<avtStreamline *> &);
//Statistics and timers.
class SLStatistics
{
......
......@@ -97,7 +97,7 @@ avtSerialSLAlgorithm::~avtSerialSLAlgorithm()
// ****************************************************************************
void
avtSerialSLAlgorithm::Initialize(vector<avtStreamlineWrapper *> &seedPts)
avtSerialSLAlgorithm::Initialize(vector<avtStreamline *> &seedPts)
{
avtSLAlgorithm::Initialize(seedPts);
......@@ -118,10 +118,13 @@ avtSerialSLAlgorithm::Initialize(vector<avtStreamlineWrapper *> &seedPts)
// Hank Childs, Thu Jun 3 10:22:16 PDT 2010
// Use new name "GetCurrentLocation".
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
void
avtSerialSLAlgorithm::AddStreamlines(vector<avtStreamlineWrapper *> &sls)
avtSerialSLAlgorithm::AddStreamlines(vector<avtStreamline *> &sls)
{
int nSeeds = sls.size();
int i0 = 0, i1 = nSeeds;
......@@ -157,8 +160,8 @@ avtSerialSLAlgorithm::AddStreamlines(vector<avtStreamlineWrapper *> &sls)
avtVector endPt;
for ( int i = i0; i < i1; i++)
{
avtStreamlineWrapper *s = sls[i];
s->GetCurrentLocation(endPt);
avtStreamline *s = sls[i];
s->CurrentLocation(endPt);
if (PointInDomain(endPt, s->domain))
activeSLs.push_back(s);
else
......@@ -193,6 +196,9 @@ avtSerialSLAlgorithm::AddStreamlines(vector<avtStreamlineWrapper *> &sls)
// Dave Pugmire, Thu Dec 3 13:28:08 EST 2009
// Move some initialization into RunAlgorithm.
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
void
......@@ -205,7 +211,7 @@ avtSerialSLAlgorithm::RunAlgorithm()
SortStreamlines(activeSLs);
if (!activeSLs.empty())
{
avtStreamlineWrapper *s = activeSLs.front();
avtStreamline *s = activeSLs.front();
GetDomain(s);
}
......@@ -214,7 +220,7 @@ avtSerialSLAlgorithm::RunAlgorithm()
// Integrate all loaded domains.
while (! activeSLs.empty())
{
avtStreamlineWrapper *s = activeSLs.front();
avtStreamline *s = activeSLs.front();
activeSLs.pop_front();
if (DomainLoaded(s->domain))
......@@ -229,7 +235,7 @@ avtSerialSLAlgorithm::RunAlgorithm()
GetDomain(s);
#endif
IntegrateStreamline(s);
if (s->status == avtStreamlineWrapper::TERMINATE)
if (s->status == avtStreamline::STATUS_TERMINATE)
terminatedSLs.push_back(s);
else
oobSLs.push_back(s);
......@@ -247,7 +253,7 @@ avtSerialSLAlgorithm::RunAlgorithm()
oobSLs.clear();
SortStreamlines(activeSLs);
avtStreamlineWrapper *s = activeSLs.front();
avtStreamline *s = activeSLs.front();
GetDomain(s);
}
......@@ -265,6 +271,8 @@ avtSerialSLAlgorithm::RunAlgorithm()
//
// Modifications:
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
......@@ -273,7 +281,7 @@ avtSerialSLAlgorithm::ResetStreamlinesForContinueExecute()
{
while (! terminatedSLs.empty())
{
avtStreamlineWrapper *s = terminatedSLs.front();
avtStreamline *s = terminatedSLs.front();
terminatedSLs.pop_front();
activeSLs.push_back(s);
......
......@@ -62,6 +62,9 @@
// Dave Pugmire, Thu Sep 24 13:52:59 EDT 2009
// Change Execute to RunAlgorithm.
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
class avtSerialSLAlgorithm : public avtSLAlgorithm
......@@ -71,13 +74,13 @@ class avtSerialSLAlgorithm : public avtSLAlgorithm
virtual ~avtSerialSLAlgorithm();
virtual const char* AlgoName() const {return "Serial";}
virtual void Initialize(std::vector<avtStreamlineWrapper *> &);
virtual void Initialize(std::vector<avtStreamline *> &);
virtual void ResetStreamlinesForContinueExecute();
virtual void AddStreamlines(std::vector<avtStreamlineWrapper*> &sls);
virtual void AddStreamlines(std::vector<avtStreamline*> &sls);
protected:
virtual void RunAlgorithm();
std::list<avtStreamlineWrapper *> activeSLs, oobSLs;
std::list<avtStreamline *> activeSLs, oobSLs;
};
......
This diff is collapsed.
......@@ -62,7 +62,7 @@ class vtkTubeFilter;
class vtkPolyData;
class vtkRibbonFilter;
class vtkAppendPolyData;
class avtStreamlineWrapper;
class avtStreamline;
class DomainType;
class avtSLAlgorithm;
......@@ -220,6 +220,9 @@ class avtSLAlgorithm;
// Dave Pugmire, Tue May 25 10:15:35 EDT 2010
// Added DeleteStreamlines method.
//
// Hank Childs, Fri Jun 4 19:58:30 CDT 2010
// Use avtStreamlines, not avtStreamlineWrappers.
//
// ****************************************************************************
class AVTFILTERS_API avtStreamlineFilter :
......@@ -328,8 +331,8 @@ class AVTFILTERS_API avtStreamlineFilter :
virtual void ExamineContract(avtContract_p);
virtual bool CheckOnDemandViability(void);
void IntegrateStreamline(avtStreamlineWrapper *slSeg, int maxSteps=-1);
void IntegrateDomain(avtStreamlineWrapper *slSeg,
void IntegrateStreamline(avtStreamline *sl, int maxSteps=-1);
void IntegrateDomain(avtStreamline *sl,
vtkDataSet *ds,
double *extents,
int maxSteps=-1);
......@@ -349,23 +352,23 @@ class AVTFILTERS_API avtStreamlineFilter :
int GetNextStreamlineID(){ int id = MaxID; MaxID++; return id;}
void CreateStreamlinesFromSeeds(std::vector<avtVector> &pts,
std::vector<avtStreamlineWrapper *> &streamlines,
std::vector<avtStreamline *> &streamlines,
std::vector<std::vector<int> > &ids);
void GetStreamlinesFromInitialSeeds(std::vector<avtStreamlineWrapper *> &sls);
void GetStreamlinesFromInitialSeeds(std::vector<avtStreamline *> &sls);
void AddSeedpoints(std::vector<avtVector> &pts,
std::vector<std::vector<int> > &ids);
void DeleteStreamlines(std::vector<int> &slIDs);
virtual void CreateStreamlineOutput(
vector<avtStreamlineWrapper *> &streamlines)
vector<avtStreamline *> &streamlines)
= 0;
void GetTerminatedStreamlines(vector<avtStreamlineWrapper *> &sls);
void GetTerminatedStreamlines(vector<avtStreamline *> &sls);
// Helper functions.
bool PointInDomain(avtVector &pt, DomainType &domain);
int DomainToRank(DomainType &domain);
void ComputeDomainToRankMapping();
bool OwnDomain(DomainType &domain);
void SetDomain(avtStreamlineWrapper *slSeg);