VTK
|
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 } |
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) | |
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 vtkIdType | GetSeedArrayTupleIndex () |
Get the particle data tuple in a seed array. 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 data. More... | |
vtkIdType | GetLastCellId () |
Get the last traversed cell id. More... | |
vtkDataSet * | GetLastDataSet () |
Get the dataset containing the last traversed cell. More... | |
vtkIdType | GetLastSurfaceCellId () |
Get the last intersected surface cell id. More... | |
vtkDataSet * | GetLastSurfaceDataSet () |
Get the dataset containing the last intersected surface cell. More... | |
void | SetLastCell (vtkDataSet *dataset, vtkIdType cellId) |
Set the last dataset and last cell id. 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... | |
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, vtkIdType numberOfSteps, double previousIntegrationTime) |
Constructor wrapper to create a partially integrated particle in the domain. More... | |
Protected Member Functions | |
vtkLagrangianParticle * | NewInstance (int numberOfVariables, vtkIdType seedId, vtkIdType particleId, vtkIdType seedArrayTupleIndex, double integrationTime, vtkPointData *seedData) |
Constructor wrapper for internal convenience. More... | |
vtkLagrangianParticle (const vtkLagrangianParticle &) | |
vtkLagrangianParticle () | |
void | operator= (const vtkLagrangianParticle &) |
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 41 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
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
Definition at line 61 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 81 of file vtkLagrangianParticle.h.
vtkLagrangianParticle::vtkLagrangianParticle | ( | int | numberOfVariables, |
vtkIdType | seedId, | ||
vtkIdType | particleId, | ||
vtkIdType | seedArrayTupleIndex, | ||
double | integrationTime, | ||
vtkPointData * | seedData | ||
) |
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.
|
protected |
|
protected |
|
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 134 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 153 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 165 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the previous particle position.
Convenience method, giving the same results as GetPrevEquationVariables().
Definition at line 177 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 201 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the previous particle velocity.
Convenience method, giving the result: GetPrevEquationVariables() + 3;
Definition at line 213 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the particle velocity.
Convenience method, giving the result: GetEquationVariables() + 3;
Definition at line 225 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the next particle velocity.
Convenience method, giving the result: GetNextEquationVariables() + 3;
Definition at line 237 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the previous user variables.
Convenience method, giving the result: GetPrevEquationVariables() + 6;
Definition at line 249 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the user variables.
Convenience method, giving the result: GetEquationVariables() + 6;
Definition at line 261 of file vtkLagrangianParticle.h.
|
inline |
Get a pointer to the next user variables.
Convenience method, giving the result: GetNextEquationVariables() + 6;
Definition at line 273 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 particle data tuple in a seed array.
To be used on the output of vtkLagrangianBasicIntegrationModel::GetSeedArray
|
virtual |
Get the number of variables used to initialize EquationVariables.
|
virtual |
Get the number of variables specific to the user.
|
virtual |
Get the particle data.
vtkIdType vtkLagrangianParticle::GetLastCellId | ( | ) |
Get the last traversed cell id.
vtkDataSet* vtkLagrangianParticle::GetLastDataSet | ( | ) |
Get the dataset containing the last traversed cell.
vtkIdType vtkLagrangianParticle::GetLastSurfaceCellId | ( | ) |
Get the last intersected surface cell id.
vtkDataSet* vtkLagrangianParticle::GetLastSurfaceDataSet | ( | ) |
Get the dataset containing the last intersected surface cell.
void vtkLagrangianParticle::SetLastCell | ( | vtkDataSet * | dataset, |
vtkIdType | cellId | ||
) |
Set the last dataset and last cell id.
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.
|
protected |
Constructor wrapper for internal convenience.
|
protected |
|
protected |
Definition at line 460 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 464 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 468 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 472 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 473 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 474 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 481 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 491 of file vtkLagrangianParticle.h.
|
protected |
Definition at line 492 of file vtkLagrangianParticle.h.