VTK
vtkAMRBaseParticlesReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAMRBaseParticlesReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14  =========================================================================*/
23 #ifndef vtkAMRBaseParticlesReader_h
24 #define vtkAMRBaseParticlesReader_h
25 
26 #include "vtkIOAMRModule.h" // For export macro
28 
29 class vtkInformation;
31 class vtkIndent;
33 class vtkPolyData;
35 class vtkCallbackCommand;
36 
37 class VTKIOAMR_EXPORT vtkAMRBaseParticlesReader :
39 {
40 public:
42  void PrintSelf(ostream &os, vtkIndent indent );
43 
45 
48  vtkGetMacro(Frequency,int);
49  vtkSetMacro(Frequency,int);
51 
53 
56  vtkGetMacro(Controller, vtkMultiProcessController* );
59 
61 
64  vtkSetMacro(FilterLocation,int);
65  vtkGetMacro(FilterLocation,int);
66  vtkBooleanMacro(FilterLocation,int);
68 
69 
71 
75  vtkGetObjectMacro(ParticleDataArraySelection,vtkDataArraySelection);
77 
81  int GetNumberOfParticleArrays();
82 
87  const char* GetParticleArrayName( int index );
88 
90 
93  int GetParticleArrayStatus( const char* name );
94  void SetParticleArrayStatus( const char* name, int status );
96 
97 
98  virtual void SetFileName( const char *fileName );
99  vtkGetStringMacro(FileName);
100 
102 
105  inline void SetMinLocation(
106  const double minx, const double miny, const double minz )
107  {
108  this->MinLocation[ 0 ] = minx;
109  this->MinLocation[ 1 ] = miny;
110  this->MinLocation[ 2 ] = minz;
111  }
113 
115 
118  inline void SetMaxLocation(
119  const double maxx, const double maxy, const double maxz )
120  {
121  this->MaxLocation[ 0 ] = maxx;
122  this->MaxLocation[ 1 ] = maxy;
123  this->MaxLocation[ 2 ] = maxz;
124  }
126 
130  virtual int GetTotalNumberOfParticles() = 0;
131 
132 protected:
134  virtual ~vtkAMRBaseParticlesReader();
135 
142  virtual void ReadMetaData() = 0;
143 
148  virtual vtkPolyData* ReadParticles( const int blkIdx ) = 0;
149 
156  bool CheckLocation( const double x, const double y, const double z );
157 
161  bool IsParallel( );
162 
167  bool IsBlockMine( const int blkIdx );
168 
176  int GetBlockProcessId( const int blkIdx );
177 
182  void Initialize();
183 
185 
191 
197  void InitializeParticleDataSelections();
198 
203  virtual void SetupParticleDataSelections() = 0;
204 
209  static void SelectionModifiedCallback(
210  vtkObject *caller,unsigned long eid,void *clientdata,void *calldata );
211 
213 
216  virtual int RequestData( vtkInformation *request,
217  vtkInformationVector **inputVector,
218  vtkInformationVector *outputVector );
219  virtual int FillOutputPortInformation( int port, vtkInformation *info );
221 
223 
225  double MinLocation[3];
226  double MaxLocation[3];
227 
230 
233  char *FileName;
234 
235 private:
236  vtkAMRBaseParticlesReader( const vtkAMRBaseParticlesReader& ) VTK_DELETE_FUNCTION;
237  void operator=(const vtkAMRBaseParticlesReader& ) VTK_DELETE_FUNCTION;
238 };
239 
240 #endif /* vtkAMRBaseParticlesReader_h */
abstract base class for most VTK objects
Definition: vtkObject.h:59
Store vtkAlgorithm input/output information.
vtkCallbackCommand * SelectionObserver
Standard Array selection variables & methods.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkMultiProcessController * Controller
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
An abstract base class that implements all the common functionality for all particle readers...
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:39
void SetMaxLocation(const double maxx, const double maxy, const double maxz)
Sets the max location.
vtkDataArraySelection * ParticleDataArraySelection
Standard Array selection variables & methods.
Store on/off settings for data arrays for a vtkSource.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetMinLocation(const double minx, const double miny, const double minz)
Sets the min location.
Multiprocessing communication superclass.