VTK
9.1.0
|
Basis class for Lagrangian particles. More...
#include <vtkLagrangianParticle.h>
Public Types | |
enum | ParticleTermination { PARTICLE_TERMINATION_NOT_TERMINATED = 0 , PARTICLE_TERMINATION_SURF_TERMINATED , PARTICLE_TERMINATION_FLIGHT_TERMINATED , PARTICLE_TERMINATION_SURF_BREAK , PARTICLE_TERMINATION_OUT_OF_DOMAIN , PARTICLE_TERMINATION_OUT_OF_STEPS , PARTICLE_TERMINATION_OUT_OF_TIME , PARTICLE_TERMINATION_TRANSFERRED , PARTICLE_TERMINATION_ABORTED } |
An enum to inform about a reason for termination PARTICLE_TERMINATION_NOT_TERMINATED = 0, means the particle have not yet been terminated PARTICLE_TERMINATION_SURF_TERMINATED = 1, means the particle have been terminated during a surface interaction PARTICLE_TERMINATION_FLIGHT_TERMINATED = 2, means the particle have been terminated by the model during a FreeFlightCheck() call PARTICLE_TERMINATION_SURF_BREAK = 3, means the particle have been terminated during a surface interaction by a break, meaning new particles have been created from it. More... | |
enum | SurfaceInteraction { SURFACE_INTERACTION_NO_INTERACTION = 0 , SURFACE_INTERACTION_TERMINATED , SURFACE_INTERACTION_BREAK , SURFACE_INTERACTION_BOUNCE , SURFACE_INTERACTION_PASS , SURFACE_INTERACTION_OTHER } |
An enum to inform about a surface interaction SURFACE_INTERACTION_NO_INTERACTION = 0, no interaction have taken place SURFACE_INTERACTION_TERMINATED = 1, a particle was terminated on interaction SURFACE_INTERACTION_BREAK = 2, a particle broke on interaction, hence terminating it and creating new particles from it SURFACE_INTERACTION_BOUNCE = 3, a particle bounced on interaction SURFACE_INTERACTION_PASS = 4, a particle passed through the surface, hence having no effect on the particle but actually recording it going through SURFACE_INTERACTION_OTHER = 5, another type of undefined interaction happened. More... | |
typedef enum vtkLagrangianParticle::ParticleTermination | ParticleTermination |
An enum to inform about a reason for termination PARTICLE_TERMINATION_NOT_TERMINATED = 0, means the particle have not yet been terminated PARTICLE_TERMINATION_SURF_TERMINATED = 1, means the particle have been terminated during a surface interaction PARTICLE_TERMINATION_FLIGHT_TERMINATED = 2, means the particle have been terminated by the model during a FreeFlightCheck() call PARTICLE_TERMINATION_SURF_BREAK = 3, means the particle have been terminated during a surface interaction by a break, meaning new particles have been created from it. More... | |
typedef enum vtkLagrangianParticle::SurfaceInteraction | SurfaceInteraction |
An enum to inform about a surface interaction SURFACE_INTERACTION_NO_INTERACTION = 0, no interaction have taken place SURFACE_INTERACTION_TERMINATED = 1, a particle was terminated on interaction SURFACE_INTERACTION_BREAK = 2, a particle broke on interaction, hence terminating it and creating new particles from it SURFACE_INTERACTION_BOUNCE = 3, a particle bounced on interaction SURFACE_INTERACTION_PASS = 4, a particle passed through the surface, hence having no effect on the particle but actually recording it going through SURFACE_INTERACTION_OTHER = 5, another type of undefined interaction happened. More... | |
Public Member Functions | |
vtkLagrangianParticle (int numberOfVariables, vtkIdType seedId, vtkIdType particleId, vtkIdType seedArrayTupleIndex, double integrationTime, vtkPointData *seedData, int numberOfTrackedUserData) | |
Constructor to create a particle from a seed. More... | |
vtkLagrangianParticle * | NewParticle (vtkIdType particleId) |
method to create a particle from a parent particle. More... | |
vtkLagrangianParticle * | CloneParticle () |
method to create an exact clone of a particle. More... | |
virtual | ~vtkLagrangianParticle () |
Destructor. More... | |
virtual void | MoveToNextPosition () |
Move the particle to its next position by putting next equation variable to equation variable and clearing next equation variable. More... | |
virtual vtkIdType | GetId () |
Get particle id. More... | |
virtual vtkIdType | GetSeedId () |
Get the particle original seed index in the seed dataset. More... | |
virtual int | GetNumberOfVariables () |
Get the number of variables used to initialize EquationVariables. More... | |
virtual int | GetNumberOfUserVariables () |
Get the number of variables specific to the user. More... | |
virtual vtkPointData * | GetSeedData () |
Get the particle seed data, for reading only. More... | |
virtual vtkIdType | GetSeedArrayTupleIndex () const |
Get the index of the tuple for this particle in the point data returned by GetSeedData method. More... | |
vtkIdType | GetLastSurfaceCellId () |
Get the last intersected surface cell id. More... | |
vtkDataSet * | GetLastSurfaceDataSet () |
Get the dataset containing the last intersected surface cell. More... | |
void | SetLastSurfaceCell (vtkDataSet *dataset, vtkIdType cellId) |
Set the last surface dataset and last surface cell id. More... | |
virtual vtkIdType | GetNumberOfSteps () |
Get particle current number of steps. More... | |
virtual double & | GetStepTimeRef () |
Get reference to step time of this particle. More... | |
virtual double | GetIntegrationTime () |
Get the integration time. More... | |
virtual double | GetPrevIntegrationTime () |
Get the integration time at previous position. More... | |
virtual void | SetIntegrationTime (double time) |
Convenience setter for integration time, do not use unless manual particle shifting One using this method may want to consider modifying EquationVariable[numVals] which contain integrationTime as well, if it matters in their model. More... | |
double | GetPositionVectorMagnitude () |
Compute and return the position vector magnitude. More... | |
virtual void | PrintSelf (ostream &os, vtkIndent indent) |
Print information about the particle. More... | |
double * | GetPrevEquationVariables () |
Get a pointer to Particle variables at its previous position See GetEquationVariables for content description. More... | |
double * | GetEquationVariables () |
Get a pointer to the particle variables array. More... | |
double * | GetNextEquationVariables () |
Get a pointer to the particle variables array at its next position. More... | |
double * | GetPrevPosition () |
Get a pointer to the previous particle position. More... | |
double * | GetPosition () |
Get a pointer to the particle position. More... | |
double * | GetNextPosition () |
Get a pointer to the next particle position. More... | |
double * | GetPrevVelocity () |
Get a pointer to the previous particle velocity. More... | |
double * | GetVelocity () |
Get a pointer to the particle velocity. More... | |
double * | GetNextVelocity () |
Get a pointer to the next particle velocity. More... | |
double * | GetPrevUserVariables () |
Get a pointer to the previous user variables. More... | |
double * | GetUserVariables () |
Get a pointer to the user variables. More... | |
double * | GetNextUserVariables () |
Get a pointer to the next user variables. More... | |
std::vector< double > & | GetPrevTrackedUserData () |
Get a reference to PrevTrackedUserData See GetTrackedUserData for an explanation on how to use it. More... | |
std::vector< double > & | GetTrackedUserData () |
Get a reference to TrackedUserData. More... | |
std::vector< double > & | GetNextTrackedUserData () |
Get a reference to NextTrackedUserData See GetTrackedUserData for an explanation on how to use it. More... | |
vtkLagrangianThreadedData * | GetThreadedData () |
Get/Set a pointer to a vtkLagrangianThreadedData that is considered to be local to the thread. More... | |
void | SetThreadedData (vtkLagrangianThreadedData *threadedData) |
Get/Set a pointer to a vtkLagrangianThreadedData that is considered to be local to the thread. More... | |
virtual void | SetParentId (vtkIdType parentId) |
Set/Get parent particle id. More... | |
virtual vtkIdType | GetParentId () |
Set/Get parent particle id. More... | |
virtual void | SetTermination (int termination) |
Set/Get particle termination. More... | |
virtual int | GetTermination () |
Set/Get particle termination. More... | |
virtual void | SetInteraction (int interaction) |
Set/Get particle interaction. More... | |
virtual int | GetInteraction () |
Set/Get particle interaction. More... | |
virtual void | SetUserFlag (int flag) |
Set/Get user flag. More... | |
virtual int | GetUserFlag () |
Set/Get user flag. More... | |
virtual void | SetPInsertPreviousPosition (bool val) |
Set/Get parallel specific flag, indication to insert or not the previous position after streaming. More... | |
virtual bool | GetPInsertPreviousPosition () |
Set/Get parallel specific flag, indication to insert or not the previous position after streaming. More... | |
virtual void | SetPManualShift (bool val) |
Set/Get parallel specific flag, indication that the particle may be manually shifted after streaming. More... | |
virtual bool | GetPManualShift () |
Set/Get parallel specific flag, indication that the particle may be manually shifted after streaming. More... | |
Static Public Member Functions | |
static vtkLagrangianParticle * | NewInstance (int numberOfVariables, vtkIdType seedId, vtkIdType particleId, vtkIdType seedArrayTupleIndex, double integrationTime, vtkPointData *seedData, int numberOfTrackedUserData, vtkIdType numberOfSteps=0, double previousIntegrationTime=0) |
Constructor wrapper to create a partially integrated particle in the domain. More... | |
Protected Member Functions | |
vtkLagrangianParticle (const vtkLagrangianParticle &)=delete | |
vtkLagrangianParticle ()=delete | |
void | operator= (const vtkLagrangianParticle &)=delete |
Protected Attributes | |
std::vector< double > | PrevEquationVariables |
double * | PrevVelocity |
double * | PrevUserVariables |
std::vector< double > | EquationVariables |
double * | Velocity |
double * | UserVariables |
std::vector< double > | NextEquationVariables |
double * | NextVelocity |
double * | NextUserVariables |
std::vector< double > | PrevTrackedUserData |
std::vector< double > | TrackedUserData |
std::vector< double > | NextTrackedUserData |
vtkLagrangianThreadedData * | ThreadedData = nullptr |
vtkIdType | Id |
vtkIdType | ParentId |
vtkIdType | SeedId |
vtkIdType | NumberOfSteps |
vtkIdType | SeedArrayTupleIndex |
vtkPointData * | SeedData |
double | StepTime |
double | IntegrationTime |
double | PrevIntegrationTime |
int | Termination |
int | Interaction |
int | UserFlag |
vtkDataSet * | LastSurfaceDataSet |
vtkIdType | LastSurfaceCellId |
int | NumberOfVariables |
bool | PInsertPreviousPosition |
bool | PManualShift |
Basis class for Lagrangian particles.
Particle to inject and integrate in the vtkLagrangianParticleTracker. This class does NOT inherit from vtkObject in order to increase performance and reduce memory usage.
Definition at line 46 of file vtkLagrangianParticle.h.
An enum to inform about a reason for termination PARTICLE_TERMINATION_NOT_TERMINATED = 0, means the particle have not yet been terminated PARTICLE_TERMINATION_SURF_TERMINATED = 1, means the particle have been terminated during a surface interaction PARTICLE_TERMINATION_FLIGHT_TERMINATED = 2, means the particle have been terminated by the model during a FreeFlightCheck() call PARTICLE_TERMINATION_SURF_BREAK = 3, means the particle have been terminated during a surface interaction by a break, meaning new particles have been created from it.
PARTICLE_TERMINATION_OUT_OF_DOMAIN = 4, means the particle was terminated when going out of domain, if the surface is watertight this should not happen. PARTICLE_TERMINATION_OUT_OF_STEPS = 5, means the particle was terminated because maximum number of steps was reached PARTICLE_TERMINATION_OUT_OF_TIME = 6, means the particle was terminated because maximum integration time was reached PARTICLE_TERMINATION_TRANSFERRED = 7, means the particle was terminated because it was transferred to another process to continue the integration
An enum to inform about a surface interaction SURFACE_INTERACTION_NO_INTERACTION = 0, no interaction have taken place SURFACE_INTERACTION_TERMINATED = 1, a particle was terminated on interaction SURFACE_INTERACTION_BREAK = 2, a particle broke on interaction, hence terminating it and creating new particles from it SURFACE_INTERACTION_BOUNCE = 3, a particle bounced on interaction SURFACE_INTERACTION_PASS = 4, a particle passed through the surface, hence having no effect on the particle but actually recording it going through SURFACE_INTERACTION_OTHER = 5, another type of undefined interaction happened.
An enum to inform about a reason for termination PARTICLE_TERMINATION_NOT_TERMINATED = 0, means the particle have not yet been terminated PARTICLE_TERMINATION_SURF_TERMINATED = 1, means the particle have been terminated during a surface interaction PARTICLE_TERMINATION_FLIGHT_TERMINATED = 2, means the particle have been terminated by the model during a FreeFlightCheck() call PARTICLE_TERMINATION_SURF_BREAK = 3, means the particle have been terminated during a surface interaction by a break, meaning new particles have been created from it.
PARTICLE_TERMINATION_OUT_OF_DOMAIN = 4, means the particle was terminated when going out of domain, if the surface is watertight this should not happen. PARTICLE_TERMINATION_OUT_OF_STEPS = 5, means the particle was terminated because maximum number of steps was reached PARTICLE_TERMINATION_OUT_OF_TIME = 6, means the particle was terminated because maximum integration time was reached PARTICLE_TERMINATION_TRANSFERRED = 7, means the particle was terminated because it was transferred to another process to continue the integration
Definition at line 67 of file vtkLagrangianParticle.h.
An enum to inform about a surface interaction SURFACE_INTERACTION_NO_INTERACTION = 0, no interaction have taken place SURFACE_INTERACTION_TERMINATED = 1, a particle was terminated on interaction SURFACE_INTERACTION_BREAK = 2, a particle broke on interaction, hence terminating it and creating new particles from it SURFACE_INTERACTION_BOUNCE = 3, a particle bounced on interaction SURFACE_INTERACTION_PASS = 4, a particle passed through the surface, hence having no effect on the particle but actually recording it going through SURFACE_INTERACTION_OTHER = 5, another type of undefined interaction happened.
Enumerator | |
---|---|
SURFACE_INTERACTION_NO_INTERACTION | |
SURFACE_INTERACTION_TERMINATED | |
SURFACE_INTERACTION_BREAK | |
SURFACE_INTERACTION_BOUNCE | |
SURFACE_INTERACTION_PASS | |
SURFACE_INTERACTION_OTHER |
Definition at line 91 of file vtkLagrangianParticle.h.
vtkLagrangianParticle::vtkLagrangianParticle | ( | int | numberOfVariables, |
vtkIdType | seedId, | ||
vtkIdType | particleId, | ||
vtkIdType | seedArrayTupleIndex, | ||
double | integrationTime, | ||
vtkPointData * | seedData, | ||
int | numberOfTrackedUserData | ||
) |
Constructor to create a particle from a seed.
numberOfVariable correspond to the result of vtkLagrangianBasicIntegrationModel::GetNumberOfIndependantVariable() and defines the size of the allocated memory for equation variables. seedId is the index of the seed used to generate the particle seedArrayTupleIndex is the index of the tuple to use to recover associated seed data particle data is a pointer to the pointData associated to all particles.
|
virtual |
Destructor.
|
protecteddelete |
|
protecteddelete |
|
static |
Constructor wrapper to create a partially integrated particle in the domain.
It uses the constructor while setting NumberOfSteps and PreviousIntegrationTime
vtkLagrangianParticle * vtkLagrangianParticle::NewParticle | ( | vtkIdType | particleId | ) |
method to create a particle from a parent particle.
This method should not be used until all particles from seeds have been created. Copy all data from the parentParticle into the particle but take a step to move the particle one step further than the parent
vtkLagrangianParticle * vtkLagrangianParticle::CloneParticle | ( | ) |
method to create an exact clone of a particle.
|
inline |
Get a pointer to Particle variables at its previous position See GetEquationVariables for content description.
Definition at line 146 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the particle variables array.
To be used with vtkInitialValueProblemSolver::ComputeNextStep. returned pointer contains the following: x y z u v w k0 .. kn t x y z is the position of the particle u v w is the velocity of the particle k0 .. kn are user variables t is the time, always the last variables. the number of user variables can be recovered by GetNumberOfUserVariables, but it is always NumberOfVariables - 7.
Definition at line 162 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the particle variables array at its next position.
To be used with vtkInitialValueProblemSolver::ComputeNextStep. See GetEquationVariables for content description
Definition at line 171 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the previous particle position.
Convenience method, giving the same results as GetPrevEquationVariables().
Definition at line 180 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the particle position.
Convenience method, giving the same results as GetEquationVariables().
Definition at line 189 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the next particle position.
Convenience method, giving the same results as GetNextEquationVariables();
Definition at line 198 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the previous particle velocity.
Convenience method, giving the result: GetPrevEquationVariables() + 3;
Definition at line 207 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the particle velocity.
Convenience method, giving the result: GetEquationVariables() + 3;
Definition at line 216 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the next particle velocity.
Convenience method, giving the result: GetNextEquationVariables() + 3;
Definition at line 225 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the previous user variables.
Convenience method, giving the result: GetPrevEquationVariables() + 6;
Definition at line 234 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the user variables.
Convenience method, giving the result: GetEquationVariables() + 6;
Definition at line 243 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the next user variables.
Convenience method, giving the result: GetNextEquationVariables() + 6;
Definition at line 252 of file vtkLagrangianParticle.h.
|
inline |
Get a reference to PrevTrackedUserData See GetTrackedUserData for an explanation on how to use it.
Definition at line 260 of file vtkLagrangianParticle.h.
|
inline |
Get a reference to TrackedUserData.
The tracked user data is a vector of double associated with each position of the particle, but it is not integrated contrary to the UserVariables and EquationVariables. It is, however, automatically tracked from one position to the next, copied when creating new particles with NewInstance and CloneParticle and transferred from one node to the next when particles move from one domain to the another in parallel. If you are using these, you are supposed to compute and set the next tracked user data your implementation of FunctionValues in your model.
Definition at line 274 of file vtkLagrangianParticle.h.
|
inline |
Get a reference to NextTrackedUserData See GetTrackedUserData for an explanation on how to use it.
Definition at line 282 of file vtkLagrangianParticle.h.
|
inline |
Get/Set a pointer to a vtkLagrangianThreadedData that is considered to be local to the thread.
This structure contains multiple objects to be used by the tracker and the model, it also contains a user data that can be used to store any kind of data, structure, class instance that you may need. This is set by the vtkLagrangianParticleTracker and can be initialized/finalized in the model
Definition at line 293 of file vtkLagrangianParticle.h.
|
inline |
Get/Set a pointer to a vtkLagrangianThreadedData that is considered to be local to the thread.
This structure contains multiple objects to be used by the tracker and the model, it also contains a user data that can be used to store any kind of data, structure, class instance that you may need. This is set by the vtkLagrangianParticleTracker and can be initialized/finalized in the model
Definition at line 294 of file vtkLagrangianParticle.h.
|
virtual |
Move the particle to its next position by putting next equation variable to equation variable and clearing next equation variable.
Be sure to have set the StepTime first for accurate IntegrationTime computation
|
virtual |
Get particle id.
|
virtual |
Set/Get parent particle id.
Allow to find the seed particle of any particle.
|
virtual |
Set/Get parent particle id.
Allow to find the seed particle of any particle.
|
virtual |
Get the particle original seed index in the seed dataset.
Allows to track a specific seed along the tracks.
|
virtual |
Get the number of variables used to initialize EquationVariables.
|
virtual |
Get the number of variables specific to the user.
|
virtual |
Get the particle seed data, for reading only.
|
virtual |
Get the index of the tuple for this particle in the point data returned by GetSeedData method.
vtkIdType vtkLagrangianParticle::GetLastSurfaceCellId | ( | ) |
Get the last intersected surface cell id.
vtkDataSet * vtkLagrangianParticle::GetLastSurfaceDataSet | ( | ) |
Get the dataset containing the last intersected surface cell.
void vtkLagrangianParticle::SetLastSurfaceCell | ( | vtkDataSet * | dataset, |
vtkIdType | cellId | ||
) |
Set the last surface dataset and last surface cell id.
|
virtual |
Get particle current number of steps.
|
virtual |
Set/Get particle termination.
Values out of enum range are accepted Values < 100 are system reserved and should not be used
|
virtual |
Set/Get particle termination.
Values out of enum range are accepted Values < 100 are system reserved and should not be used
|
virtual |
Set/Get particle interaction.
Values out of enum range are accepted Values < 100 are system reserved and should not be used
|
virtual |
Set/Get particle interaction.
Values out of enum range are accepted Values < 100 are system reserved and should not be used
|
virtual |
Set/Get user flag.
|
virtual |
Set/Get user flag.
|
virtual |
Set/Get parallel specific flag, indication to insert or not the previous position after streaming.
No effect in serial.
|
virtual |
Set/Get parallel specific flag, indication to insert or not the previous position after streaming.
No effect in serial.
|
virtual |
Set/Get parallel specific flag, indication that the particle may be manually shifted after streaming.
No effect in serial.
|
virtual |
Set/Get parallel specific flag, indication that the particle may be manually shifted after streaming.
No effect in serial.
|
virtual |
Get reference to step time of this particle.
|
virtual |
Get the integration time.
|
virtual |
Get the integration time at previous position.
|
virtual |
Convenience setter for integration time, do not use unless manual particle shifting One using this method may want to consider modifying EquationVariable[numVals] which contain integrationTime as well, if it matters in their model.
double vtkLagrangianParticle::GetPositionVectorMagnitude | ( | ) |
Compute and return the position vector magnitude.
|
virtual |
Print information about the particle.
|
protecteddelete |
|
protected |
Definition at line 457 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 458 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 459 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 461 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 462 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 463 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 465 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 466 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 467 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 469 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 470 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 471 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 473 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 475 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 476 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 477 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 478 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 479 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 480 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 482 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 483 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 484 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 485 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 486 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 487 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 488 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 489 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 490 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 493 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 494 of file vtkLagrangianParticle.h.