VTK
vtkLagrangianParticle.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkLagrangianParticle.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 =========================================================================*/
32 #ifndef vtkLagrangianParticle_h
33 #define vtkLagrangianParticle_h
34 
35 #include "vtkFiltersFlowPathsModule.h" // For export macro
36 #include "vtkSystemIncludes.h" // For PrintSelf signature and vtkType
37 
38 class vtkDataSet;
39 class vtkPointData;
40 
41 class VTKFILTERSFLOWPATHS_EXPORT vtkLagrangianParticle
42 {
43 public:
44 
45  typedef enum ParticleTermination
46  {
47  PARTICLE_TERMINATION_NOT_TERMINATED = 0,
52  PARTICLE_TERMINATION_OUT_OF_STEPS
53  } ParticleTermination;
54 
55  typedef enum SurfaceInteraction
56  {
57  SURFACE_INTERACTION_NO_INTERACTION = 0,
62  SURFACE_INTERACTION_OTHER
63  } SurfaceInteraction;
64 
74  vtkLagrangianParticle(int numberOfVariables, vtkIdType seedId, vtkIdType particleId,
75  vtkIdType seedArrayTupleIndex, double integrationTime, vtkPointData* seedData);
76 
81  static vtkLagrangianParticle* NewInstance(int numberOfVariables, vtkIdType seedId,
82  vtkIdType particleId, vtkIdType seedArrayTupleIndex, double integrationTime,
83  vtkPointData* seedData, vtkIdType numberOfSteps, double previousIntegrationTime);
84 
91  vtkLagrangianParticle* NewParticle(vtkIdType particleId);
92 
96  vtkLagrangianParticle* CloneParticle();
97 
101  virtual ~vtkLagrangianParticle();
102 
104 
108  inline double* GetPrevEquationVariables()
109  {
110  return this->PrevEquationVariables;
111  }
113 
115 
127  inline double* GetEquationVariables()
128  {
129  return this->EquationVariables;
130  }
132 
134 
139  inline double* GetNextEquationVariables()
140  {
141  return this->NextEquationVariables;
142  }
144 
146 
151  inline double* GetPrevPosition()
152  {
153  return this->PrevEquationVariables;
154  }
156 
158 
163  inline double* GetPosition()
164  {
165  return this->EquationVariables;
166  }
168 
170 
175  inline double* GetNextPosition()
176  {
177  return this->NextEquationVariables;
178  }
180 
182 
187  inline double* GetPrevVelocity()
188  {
189  return this->PrevVelocity;
190  }
192 
194 
199  inline double* GetVelocity()
200  {
201  return this->Velocity;
202  }
204 
206 
211  inline double* GetNextVelocity()
212  {
213  return this->NextVelocity;
214  }
216 
218 
223  inline double* GetPrevUserVariables()
224  {
225  return this->PrevUserVariables;
226  }
228 
230 
235  inline double* GetUserVariables()
236  {
237  return this->UserVariables;
238  }
240 
242 
247  inline double* GetNextUserVariables()
248  {
249  return this->NextUserVariables;
250  }
252 
259  virtual void MoveToNextPosition();
260 
264  virtual vtkIdType GetId();
265 
267 
271  virtual void SetParentId(vtkIdType parentId);
272  virtual vtkIdType GetParentId();
274 
279  virtual vtkIdType GetSeedId();
280 
286  virtual vtkIdType GetSeedArrayTupleIndex();
287 
291  virtual int GetNumberOfVariables();
292 
296  virtual int GetNumberOfUserVariables();
297 
301  virtual vtkPointData* GetSeedData();
302 
306  vtkIdType GetLastCellId();
307 
311  vtkDataSet* GetLastDataSet();
312 
316  vtkIdType GetLastSurfaceCellId();
317 
321  vtkDataSet* GetLastSurfaceDataSet();
322 
326  void SetLastCell(vtkDataSet* dataset, vtkIdType cellId);
327 
331  void SetLastSurfaceCell(vtkDataSet* dataset, vtkIdType cellId);
332 
336  virtual vtkIdType GetNumberOfSteps();
337 
339 
344  virtual void SetTermination(int termination);
345  virtual int GetTermination();
347 
349 
354  virtual void SetInteraction(int interaction);
355  virtual int GetInteraction();
357 
359 
362  virtual void SetUserFlag(int flag);
363  virtual int GetUserFlag();
365 
367 
372  virtual void SetPInsertPreviousPosition(bool val);
373  virtual bool GetPInsertPreviousPosition();
375 
377 
382  virtual void SetPManualShift(bool val);
383  virtual bool GetPManualShift();
385 
389  virtual double& GetStepTimeRef();
390 
394  virtual double GetIntegrationTime();
395 
399  virtual double GetPrevIntegrationTime();
400 
409  virtual void SetIntegrationTime(double time);
410 
414  double GetPositionVectorMagnitude();
415 
419  virtual void PrintSelf(ostream& os, vtkIndent indent);
420 
421 protected:
422 
426  vtkLagrangianParticle* NewInstance(int numberOfVariables,
427  vtkIdType seedId, vtkIdType particleId, vtkIdType seedArrayTupleIndex,
428  double integrationTime, vtkPointData* seedData);
429 
430  vtkLagrangianParticle(const vtkLagrangianParticle&); // Not implemented
431  vtkLagrangianParticle(); // Not implemented
432  void operator=(const vtkLagrangianParticle&); // Not implemented
433 
435  double* PrevVelocity;
437 
439  double* Velocity;
440  double* UserVariables;
441 
443  double* NextVelocity;
445 
454  double StepTime;
459  int UserFlag;
463 
464  // Parallel related flags
467 };
468 
469 #endif
470 // VTK-HeaderTest-Exclude: vtkLagrangianParticle.h
represent and manipulate point attribute data
Definition: vtkPointData.h:37
double * GetUserVariables()
Get a pointer to the user variables.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
int vtkIdType
Definition: vtkType.h:345
double * GetNextVelocity()
Get a pointer to the next particle velocity.
a simple class to control print indentation
Definition: vtkIndent.h:39
double * GetNextEquationVariables()
Get a pointer to the particle variables array at its next position.
Basis class for Lagrangian particles.
double * GetPrevPosition()
Get a pointer to the previous particle position.
double * GetEquationVariables()
Get a pointer to the particle variables array.
double * GetPrevVelocity()
Get a pointer to the previous particle velocity.
double * GetNextUserVariables()
Get a pointer to the next user variables.
double * GetNextPosition()
Get a pointer to the next particle position.
double * GetVelocity()
Get a pointer to the particle velocity.
double * GetPosition()
Get a pointer to the particle position.
double * GetPrevUserVariables()
Get a pointer to the previous user variables.
double * GetPrevEquationVariables()
Get a pointer to Particle variables at its previous position See GetEquationVariables for content des...