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 
61  typedef enum ParticleTermination
62  {
63  PARTICLE_TERMINATION_NOT_TERMINATED = 0,
69  PARTICLE_TERMINATION_OUT_OF_TIME
71 
81  typedef enum SurfaceInteraction
82  {
83  SURFACE_INTERACTION_NO_INTERACTION = 0,
88  SURFACE_INTERACTION_OTHER
90 
100  vtkLagrangianParticle(int numberOfVariables, vtkIdType seedId, vtkIdType particleId,
101  vtkIdType seedArrayTupleIndex, double integrationTime, vtkPointData* seedData);
102 
107  static vtkLagrangianParticle* NewInstance(int numberOfVariables, vtkIdType seedId,
108  vtkIdType particleId, vtkIdType seedArrayTupleIndex, double integrationTime,
109  vtkPointData* seedData, vtkIdType numberOfSteps, double previousIntegrationTime);
110 
117  vtkLagrangianParticle* NewParticle(vtkIdType particleId);
118 
122  vtkLagrangianParticle* CloneParticle();
123 
127  virtual ~vtkLagrangianParticle();
128 
130 
134  inline double* GetPrevEquationVariables()
135  {
136  return this->PrevEquationVariables;
137  }
139 
141 
153  inline double* GetEquationVariables()
154  {
155  return this->EquationVariables;
156  }
158 
160 
165  inline double* GetNextEquationVariables()
166  {
167  return this->NextEquationVariables;
168  }
170 
172 
177  inline double* GetPrevPosition()
178  {
179  return this->PrevEquationVariables;
180  }
182 
184 
189  inline double* GetPosition()
190  {
191  return this->EquationVariables;
192  }
194 
196 
201  inline double* GetNextPosition()
202  {
203  return this->NextEquationVariables;
204  }
206 
208 
213  inline double* GetPrevVelocity()
214  {
215  return this->PrevVelocity;
216  }
218 
220 
225  inline double* GetVelocity()
226  {
227  return this->Velocity;
228  }
230 
232 
237  inline double* GetNextVelocity()
238  {
239  return this->NextVelocity;
240  }
242 
244 
249  inline double* GetPrevUserVariables()
250  {
251  return this->PrevUserVariables;
252  }
254 
256 
261  inline double* GetUserVariables()
262  {
263  return this->UserVariables;
264  }
266 
268 
273  inline double* GetNextUserVariables()
274  {
275  return this->NextUserVariables;
276  }
278 
285  virtual void MoveToNextPosition();
286 
290  virtual vtkIdType GetId();
291 
293 
297  virtual void SetParentId(vtkIdType parentId);
298  virtual vtkIdType GetParentId();
300 
305  virtual vtkIdType GetSeedId();
306 
312  virtual vtkIdType GetSeedArrayTupleIndex();
313 
317  virtual int GetNumberOfVariables();
318 
322  virtual int GetNumberOfUserVariables();
323 
327  virtual vtkPointData* GetSeedData();
328 
332  vtkIdType GetLastCellId();
333 
337  vtkDataSet* GetLastDataSet();
338 
342  vtkIdType GetLastSurfaceCellId();
343 
347  vtkDataSet* GetLastSurfaceDataSet();
348 
352  void SetLastCell(vtkDataSet* dataset, vtkIdType cellId);
353 
357  void SetLastSurfaceCell(vtkDataSet* dataset, vtkIdType cellId);
358 
362  virtual vtkIdType GetNumberOfSteps();
363 
365 
370  virtual void SetTermination(int termination);
371  virtual int GetTermination();
373 
375 
380  virtual void SetInteraction(int interaction);
381  virtual int GetInteraction();
383 
385 
388  virtual void SetUserFlag(int flag);
389  virtual int GetUserFlag();
391 
393 
398  virtual void SetPInsertPreviousPosition(bool val);
399  virtual bool GetPInsertPreviousPosition();
401 
403 
408  virtual void SetPManualShift(bool val);
409  virtual bool GetPManualShift();
411 
415  virtual double& GetStepTimeRef();
416 
420  virtual double GetIntegrationTime();
421 
425  virtual double GetPrevIntegrationTime();
426 
435  virtual void SetIntegrationTime(double time);
436 
440  double GetPositionVectorMagnitude();
441 
445  virtual void PrintSelf(ostream& os, vtkIndent indent);
446 
447 protected:
448 
452  vtkLagrangianParticle* NewInstance(int numberOfVariables,
453  vtkIdType seedId, vtkIdType particleId, vtkIdType seedArrayTupleIndex,
454  double integrationTime, vtkPointData* seedData);
455 
456  vtkLagrangianParticle(const vtkLagrangianParticle&); // Not implemented
457  vtkLagrangianParticle(); // Not implemented
458  void operator=(const vtkLagrangianParticle&); // Not implemented
459 
461  double* PrevVelocity;
463 
465  double* Velocity;
466  double* UserVariables;
467 
469  double* NextVelocity;
471 
480  double StepTime;
485  int UserFlag;
489 
490  // Parallel related flags
493 };
494 
495 #endif
496 // 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:347
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.
ParticleTermination
An enum to inform about a reason for termination PARTICLE_TERMINATION_NOT_TERMINATED = 0...
SurfaceInteraction
An enum to inform about a surface interaction SURFACE_INTERACTION_NO_INTERACTION = 0...
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...