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 
58  typedef enum ParticleTermination
59  {
60  PARTICLE_TERMINATION_NOT_TERMINATED = 0,
66  PARTICLE_TERMINATION_OUT_OF_TIME
67  } ParticleTermination;
68 
78  typedef enum SurfaceInteraction
79  {
80  SURFACE_INTERACTION_NO_INTERACTION = 0,
85  SURFACE_INTERACTION_OTHER
86  } SurfaceInteraction;
87 
97  vtkLagrangianParticle(int numberOfVariables, vtkIdType seedId, vtkIdType particleId,
98  vtkIdType seedArrayTupleIndex, double integrationTime, vtkPointData* seedData);
99 
104  static vtkLagrangianParticle* NewInstance(int numberOfVariables, vtkIdType seedId,
105  vtkIdType particleId, vtkIdType seedArrayTupleIndex, double integrationTime,
106  vtkPointData* seedData, vtkIdType numberOfSteps, double previousIntegrationTime);
107 
114  vtkLagrangianParticle* NewParticle(vtkIdType particleId);
115 
119  vtkLagrangianParticle* CloneParticle();
120 
124  virtual ~vtkLagrangianParticle();
125 
127 
131  inline double* GetPrevEquationVariables()
132  {
133  return this->PrevEquationVariables;
134  }
136 
138 
150  inline double* GetEquationVariables()
151  {
152  return this->EquationVariables;
153  }
155 
157 
162  inline double* GetNextEquationVariables()
163  {
164  return this->NextEquationVariables;
165  }
167 
169 
174  inline double* GetPrevPosition()
175  {
176  return this->PrevEquationVariables;
177  }
179 
181 
186  inline double* GetPosition()
187  {
188  return this->EquationVariables;
189  }
191 
193 
198  inline double* GetNextPosition()
199  {
200  return this->NextEquationVariables;
201  }
203 
205 
210  inline double* GetPrevVelocity()
211  {
212  return this->PrevVelocity;
213  }
215 
217 
222  inline double* GetVelocity()
223  {
224  return this->Velocity;
225  }
227 
229 
234  inline double* GetNextVelocity()
235  {
236  return this->NextVelocity;
237  }
239 
241 
246  inline double* GetPrevUserVariables()
247  {
248  return this->PrevUserVariables;
249  }
251 
253 
258  inline double* GetUserVariables()
259  {
260  return this->UserVariables;
261  }
263 
265 
270  inline double* GetNextUserVariables()
271  {
272  return this->NextUserVariables;
273  }
275 
282  virtual void MoveToNextPosition();
283 
287  virtual vtkIdType GetId();
288 
290 
294  virtual void SetParentId(vtkIdType parentId);
295  virtual vtkIdType GetParentId();
297 
302  virtual vtkIdType GetSeedId();
303 
309  virtual vtkIdType GetSeedArrayTupleIndex();
310 
314  virtual int GetNumberOfVariables();
315 
319  virtual int GetNumberOfUserVariables();
320 
324  virtual vtkPointData* GetSeedData();
325 
329  vtkIdType GetLastCellId();
330 
334  vtkDataSet* GetLastDataSet();
335 
339  vtkIdType GetLastSurfaceCellId();
340 
344  vtkDataSet* GetLastSurfaceDataSet();
345 
349  void SetLastCell(vtkDataSet* dataset, vtkIdType cellId);
350 
354  void SetLastSurfaceCell(vtkDataSet* dataset, vtkIdType cellId);
355 
359  virtual vtkIdType GetNumberOfSteps();
360 
362 
367  virtual void SetTermination(int termination);
368  virtual int GetTermination();
370 
372 
377  virtual void SetInteraction(int interaction);
378  virtual int GetInteraction();
380 
382 
385  virtual void SetUserFlag(int flag);
386  virtual int GetUserFlag();
388 
390 
395  virtual void SetPInsertPreviousPosition(bool val);
396  virtual bool GetPInsertPreviousPosition();
398 
400 
405  virtual void SetPManualShift(bool val);
406  virtual bool GetPManualShift();
408 
412  virtual double& GetStepTimeRef();
413 
417  virtual double GetIntegrationTime();
418 
422  virtual double GetPrevIntegrationTime();
423 
432  virtual void SetIntegrationTime(double time);
433 
437  double GetPositionVectorMagnitude();
438 
442  virtual void PrintSelf(ostream& os, vtkIndent indent);
443 
444 protected:
445 
449  vtkLagrangianParticle* NewInstance(int numberOfVariables,
450  vtkIdType seedId, vtkIdType particleId, vtkIdType seedArrayTupleIndex,
451  double integrationTime, vtkPointData* seedData);
452 
453  vtkLagrangianParticle(const vtkLagrangianParticle&); // Not implemented
454  vtkLagrangianParticle(); // Not implemented
455  void operator=(const vtkLagrangianParticle&); // Not implemented
456 
458  double* PrevVelocity;
460 
462  double* Velocity;
463  double* UserVariables;
464 
466  double* NextVelocity;
468 
477  double StepTime;
482  int UserFlag;
486 
487  // Parallel related flags
490 };
491 
492 #endif
493 // 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:347
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.
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...