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 =========================================================================*/
29 #ifndef vtkLagrangianParticle_h
30 #define vtkLagrangianParticle_h
31 
32 #include "vtkFiltersFlowPathsModule.h" // For export macro
33 #include "vtkSystemIncludes.h" // For PrintSelf signature and vtkType
34 
35 class vtkDataSet;
36 class vtkPointData;
37 
38 class VTKFILTERSFLOWPATHS_EXPORT vtkLagrangianParticle
39 {
40 public:
41 
42  typedef enum ParticleTermination
43  {
44  PARTICLE_TERMINATION_NOT_TERMINATED = 0,
49  PARTICLE_TERMINATION_OUT_OF_STEPS
50  } ParticleTermination;
51 
52  typedef enum SurfaceInteraction
53  {
54  SURFACE_INTERACTION_NO_INTERACTION = 0,
59  SURFACE_INTERACTION_OTHER
60  } SurfaceInteraction;
61 
71  vtkLagrangianParticle(int numberOfVariables, vtkIdType seedId, vtkIdType particleId,
72  vtkIdType seedArrayTupleIndex, double integrationTime, vtkPointData* seedData);
73 
78  static vtkLagrangianParticle* NewInstance(int numberOfVariables, vtkIdType seedId,
79  vtkIdType particleId, vtkIdType seedArrayTupleIndex, double integrationTime,
80  vtkPointData* seedData, vtkIdType numberOfSteps, double previousIntegrationTime);
81 
88  vtkLagrangianParticle* NewParticle(vtkIdType particleId);
89 
93  vtkLagrangianParticle* CloneParticle();
94 
98  virtual ~vtkLagrangianParticle();
99 
101 
105  inline double* GetPrevEquationVariables()
106  {
107  return this->PrevEquationVariables;
108  }
110 
112 
124  inline double* GetEquationVariables()
125  {
126  return this->EquationVariables;
127  }
129 
131 
136  inline double* GetNextEquationVariables()
137  {
138  return this->NextEquationVariables;
139  }
141 
143 
148  inline double* GetPrevPosition()
149  {
150  return this->PrevEquationVariables;
151  }
153 
155 
160  inline double* GetPosition()
161  {
162  return this->EquationVariables;
163  }
165 
167 
172  inline double* GetNextPosition()
173  {
174  return this->NextEquationVariables;
175  }
177 
179 
184  inline double* GetPrevVelocity()
185  {
186  return this->PrevVelocity;
187  }
189 
191 
196  inline double* GetVelocity()
197  {
198  return this->Velocity;
199  }
201 
203 
208  inline double* GetNextVelocity()
209  {
210  return this->NextVelocity;
211  }
213 
215 
220  inline double* GetPrevUserVariables()
221  {
222  return this->PrevUserVariables;
223  }
225 
227 
232  inline double* GetUserVariables()
233  {
234  return this->UserVariables;
235  }
237 
239 
244  inline double* GetNextUserVariables()
245  {
246  return this->NextUserVariables;
247  }
249 
256  virtual void MoveToNextPosition();
257 
261  virtual vtkIdType GetId();
262 
264 
268  virtual void SetParentId(vtkIdType parentId);
269  virtual vtkIdType GetParentId();
271 
276  virtual vtkIdType GetSeedId();
277 
283  virtual vtkIdType GetSeedArrayTupleIndex();
284 
288  virtual int GetNumberOfVariables();
289 
293  virtual int GetNumberOfUserVariables();
294 
298  virtual vtkPointData* GetSeedData();
299 
303  vtkIdType GetLastCellId();
304 
308  vtkDataSet* GetLastDataSet();
309 
313  vtkIdType GetLastSurfaceCellId();
314 
318  vtkDataSet* GetLastSurfaceDataSet();
319 
323  void SetLastCell(vtkDataSet* dataset, vtkIdType cellId);
324 
328  void SetLastSurfaceCell(vtkDataSet* dataset, vtkIdType cellId);
329 
333  virtual vtkIdType GetNumberOfSteps();
334 
336 
341  virtual void SetTermination(int termination);
342  virtual int GetTermination();
344 
346 
351  virtual void SetInteraction(int interaction);
352  virtual int GetInteraction();
354 
356 
359  virtual void SetUserFlag(int flag);
360  virtual int GetUserFlag();
362 
364 
369  virtual void SetPInsertPreviousPosition(bool val);
370  virtual bool GetPInsertPreviousPosition();
372 
374 
379  virtual void SetPManualShift(bool val);
380  virtual bool GetPManualShift();
382 
386  virtual double& GetStepTimeRef();
387 
391  virtual double GetIntegrationTime();
392 
396  virtual double GetPrevIntegrationTime();
397 
406  virtual void SetIntegrationTime(double time);
407 
411  double GetPositionVectorMagnitude();
412 
416  virtual void PrintSelf(ostream& os, vtkIndent indent);
417 
418 protected:
419 
423  vtkLagrangianParticle* NewInstance(int numberOfVariables,
424  vtkIdType seedId, vtkIdType particleId, vtkIdType seedArrayTupleIndex,
425  double integrationTime, vtkPointData* seedData);
426 
427  vtkLagrangianParticle(const vtkLagrangianParticle&); // Not implemented
428  vtkLagrangianParticle(); // Not implemented
429  void operator=(const vtkLagrangianParticle&); // Not implemented
430 
432  double* PrevVelocity;
434 
436  double* Velocity;
437  double* UserVariables;
438 
440  double* NextVelocity;
442 
451  double StepTime;
456  int UserFlag;
460 
461  // Parallel related flags
464 };
465 
466 #endif
467 // VTK-HeaderTest-Exclude: vtkLagrangianParticle.h
represent and manipulate point attribute data
Definition: vtkPointData.h:31
double * GetUserVariables()
Get a pointer to the user variables.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
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:33
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...