VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Filters/ParallelFlowPaths/vtkPParticleTracerBase.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkParticleTracerBase.h
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   =========================================================================*/
00026 #ifndef vtkPParticleTracerBase_h
00027 #define vtkPParticleTracerBase_h
00028 
00029 #include "vtkSmartPointer.h" // For protected ivars.
00030 #include "vtkParticleTracerBase.h"
00031 
00032 //BTX
00033 #include <vector> // STL Header
00034 //ETX
00035 
00036 #include "vtkFiltersParallelFlowPathsModule.h" // For export macro
00037 
00038 class VTKFILTERSPARALLELFLOWPATHS_EXPORT vtkPParticleTracerBase : public vtkParticleTracerBase
00039 {
00040 public:
00041   vtkTypeMacro(vtkPParticleTracerBase,vtkParticleTracerBase);
00042   void PrintSelf(ostream& os, vtkIndent indent);
00043 
00045 
00047   virtual void SetController(vtkMultiProcessController* controller);
00048   vtkGetObjectMacro(Controller, vtkMultiProcessController);
00050 
00051 protected:
00052   struct  RemoteParticleInfo
00053   {
00054     vtkParticleTracerBaseNamespace::ParticleInformation Current;
00055     vtkParticleTracerBaseNamespace::ParticleInformation Previous;
00056     vtkSmartPointer<vtkPointData> PreviousPD;
00057   };
00058 
00059   typedef std::vector<RemoteParticleInfo>  RemoteParticleVector;
00060 
00061   vtkPParticleTracerBase();
00062   ~vtkPParticleTracerBase();
00063 
00064   virtual int RequestUpdateExtent(vtkInformation* request,
00065                                   vtkInformationVector** inputVector,
00066                                   vtkInformationVector* outputVector);
00067 
00068   //
00069   // Generate output
00070   //
00071   virtual int RequestData(vtkInformation* request,
00072                           vtkInformationVector** inputVector,
00073                           vtkInformationVector* outputVector);
00074 
00075 //
00076 //BTX
00077 
00078   virtual vtkPolyData* Execute(vtkInformationVector** inputVector);
00079   virtual bool SendParticleToAnotherProcess(vtkParticleTracerBaseNamespace::ParticleInformation & info,
00080                                             vtkParticleTracerBaseNamespace::ParticleInformation & previous,
00081                                             vtkPointData*);
00082 
00084 
00088   virtual void AssignSeedsToProcessors(double time,
00089                                        vtkDataSet *source, int sourceID, int ptId,
00090                                        vtkParticleTracerBaseNamespace::ParticleVector &localSeedPoints,
00091                                        int &localAssignedCount);
00093 
00095 
00097   virtual void AssignUniqueIds(
00098     vtkParticleTracerBaseNamespace::ParticleVector &localSeedPoints);
00100 
00103   virtual void SendReceiveParticles(RemoteParticleVector &outofdomain, RemoteParticleVector &received);
00104 
00105   void UpdateParticleListFromOtherProcesses();
00106 
00110   virtual bool IsPointDataValid(vtkDataObject* input);
00111 
00112 
00113 //
00114 //ETX
00115 //
00116 
00117   // MPI controller needed when running in parallel
00118   vtkMultiProcessController* Controller;
00119 
00120   // List used for transmitting between processors during parallel operation
00121   RemoteParticleVector MPISendList;
00122 
00123   RemoteParticleVector Tail; //this is to receive the "tails" of traces from other processes
00124  private:
00125   vtkPParticleTracerBase(const vtkPParticleTracerBase&);  // Not implemented.
00126   void operator=(const vtkPParticleTracerBase&);  // Not implemented.
00127 
00128 };
00129 
00130 #endif