Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkPStreamTracer.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPStreamTracer.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00036 #ifndef __vtkPStreamTracer_h
00037 #define __vtkPStreamTracer_h
00038 
00039 #include "vtkStreamTracer.h"
00040 
00041 #include "vtkSmartPointer.h" // This is a leaf node. No need to
00042 #include <vtkstd/vector>     // use PIMPL to avoid compile time penalty.
00043 
00044 class vtkInterpolatedVelocityField;
00045 class vtkMultiProcessController;
00046 
00047 class VTK_PARALLEL_EXPORT vtkPStreamTracer : public vtkStreamTracer
00048 {
00049 public:
00050   vtkTypeRevisionMacro(vtkPStreamTracer,vtkStreamTracer);
00051   virtual void PrintSelf(ostream& os, vtkIndent indent);
00052 
00054 
00057   virtual void SetController(vtkMultiProcessController* controller);
00058   vtkGetObjectMacro(Controller, vtkMultiProcessController);
00060 
00062 
00065   vtkGetStringMacro(InputVectorsSelection);
00066   void SelectInputVectors(const char *fieldName) 
00067     {this->SetInputVectorsSelection(fieldName);}
00069   
00070 protected:
00071 
00072   vtkPStreamTracer();
00073   ~vtkPStreamTracer();
00074 
00075   virtual void Execute();
00076   virtual void ExecuteInformation();
00077   virtual void ComputeInputUpdateExtents( vtkDataObject *output );
00078 
00079   vtkMultiProcessController* Controller;
00080 
00081   vtkInterpolatedVelocityField* Interpolator;
00082   void SetInterpolator(vtkInterpolatedVelocityField*);
00083 
00084   // See the implementation for comments
00085   void SendCellPoint(vtkPolyData* data,
00086                      vtkIdType streamId, 
00087                      vtkIdType idx, 
00088                      int sendToId);
00089   void ReceiveCellPoint(vtkPolyData* tomod, int streamId, vtkIdType idx);
00090   void SendFirstPoints();
00091   void ReceiveLastPoints();
00092   void MoveToNextSend();
00093 
00094   virtual void ParallelIntegrate() = 0;
00095 
00096   vtkDataArray* Seeds;
00097   vtkIdList* SeedIds;
00098   vtkIntArray* IntegrationDirections;
00099 
00100 //BTX
00101   typedef vtkstd::vector< vtkSmartPointer<vtkPolyData> > TmpOutputsType;
00102 //ETX
00103 
00104   TmpOutputsType TmpOutputs;
00105 
00106 private:
00107   vtkPStreamTracer(const vtkPStreamTracer&);  // Not implemented.
00108   void operator=(const vtkPStreamTracer&);  // Not implemented.
00109 };
00110 
00111 
00112 #endif
00113 
00114