Particle Identification and Tracking
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
tracking::particle_base Class Reference

Base class for particles. More...

#include <particle_base.h>

+ Inheritance diagram for tracking::particle_base:
+ Collaboration diagram for tracking::particle_base:

Public Member Functions

 particle_base (int i_ind, int frame=0)
 Default constructor. More...
 
 particle_base (int ind, utilities::Tuplef pos, int frame=0)
 Constructor that takes the position of the particle. More...
 
 particle_base (const particle_base &p)
 Copy constructor. More...
 
 ~particle_base ()
 default Destructor, made virtual More...
 
void print () const
 Pring out a rasonable representation of the partile. More...
 
float get_value (utilities::D_TYPE type, float &val) const
 Returns the float value of type given. More...
 
int get_value (utilities::D_TYPE type, int &val) const
 Returns the int value of type given. More...
 
std::complex< float > get_value (utilities::D_TYPE type, std::complex< float > &val) const
 Returns the complex value of type given. More...
 
template<class T >
get_wrapper_value (utilities::D_TYPE type, T &val) const
 Returns the a value associated with the particle directly from the wrapper, by passing all logic in the particle object. More...
 
const utilities::Tuplefget_position () const
 returns a tuple of the particle's position More...
 
int get_ind () const
 returns the index of the current particle More...
 
int get_frame () const
 returns the frame of the current particle More...
 
float distancesq (const particle_base *part_in) const
 Retruns the distance from this particle to part_in. More...
 
const utilities::Tuplef get_disp (const particle_base *part_in) const
 Returns the uncorrected forward displacement. More...
 
float get_r (const utilities::Tuplef &origin) const
 Returns the distance of the particle from the specified origin. More...
 
float get_theta (const utilities::Tuplef &origin) const
 Returns the angle in the plane from the Y-axis. More...
 
void sort_neighborhood ()
 Sorts the neighborhood vector in ascending order. More...
 
bool no_neighborhood_repeats () const
 checks to make sure the neighborhood does not include any repeats, returns true if the neighborhood is repeat free. More...
 
bool add_to_neighborhood (const particle *in)
 adds a particle to the neighborhood if it is close enough returns true if the particle is added, false otherwise More...
 
void fill_phi_6 ()
 Fills the order parameter with $\Phi_6$. More...
 
std::complex< float > compute_phi_6 () const
 computes and returns the order parameter $\Phi_6$. More...
 
std::complex< float > get_scaler_order_pram () const
 returns the scaler order parameter More...
 
unsigned int get_neighborhood_size () const
 returns the number of particles with in max_neighborhood_range_ of the particle (assuming that these have been initialized More...
 
const std::vector< const
particle * > 
get_neighborhood () const
 returns the neighborhood vector More...
 

Static Public Member Functions

static float get_max_range ()
 returns the maximum neighborhood range More...
 
static void intialize_wrapper_in (const utilities::Wrapper_in *in)
 Intialize the static input wrapper for all particles. More...
 
static void clear_wrapper_in ()
 Cleans up the set wrapper_in. More...
 
static void set_neighborhood_range (float in)
 Sets the maximum neighborhood range, there needs to be something to make sure that this doesn't get changed with out updating the. More...
 
static float get_neighborhood_range ()
 returns the range of the neighborhood More...
 

Protected Attributes

int ind_
 Identifier that comes from the wrapper. More...
 
utilities::Tuplef position_
 New attempt at storing the position data, this has the problem of taking more memory, but it might help the time. More...
 
int frame_
 The frame of the particle. More...
 
std::vector< const particle * > neighborhood_
 Vector of the particles with in max_range_ in the Hash_shelf_ of the particle. More...
 
std::complex< float > s_order_parameter_
 Scaler order parameter, ex phi_6 in 2D. More...
 

Static Protected Attributes

static const
utilities::Wrapper_in
wrapper_in_ = NULL
 object that takes care of all the underling data structures. More...
 
static float max_neighborhood_range_ = 0
 Maximum distance to be part of the neighborhood. More...
 

Private Member Functions

void fill_position ()
 Fills the position members from the wrapper. More...
 
void priv_init ()
 Private initialization function. More...
 
bool lthan (const particle_base *a, const particle_base *b) const
 function for sorting the vectors in ascending order, returns true if the first argument goes before the second argument in the specific strict weak ordering it defines, and false otherwise. More...
 

Detailed Description

Base class for particles.

Defines the basic functions a particle must have. The reason that the wrapper_i class has been split off from this class has been to seperate the implemntation of copeing with data structures coming in from the derived classes of the particles (to carry extra information about the particles for tracking pruposes). Need to roll my own dll class

Constructor & Destructor Documentation

particle_base::particle_base ( int  i_ind,
int  frame = 0 
)

Default constructor.

move to this being the primary constructor, get rid of the other one

References fill_position(), and priv_init().

tracking::particle_base::particle_base ( int  ind,
utilities::Tuplef  pos,
int  frame = 0 
)

Constructor that takes the position of the particle.

tracking::particle_base::particle_base ( const particle_base p)

Copy constructor.

tracking::particle_base::~particle_base ( )
inline

default Destructor, made virtual

Member Function Documentation

bool particle_base::add_to_neighborhood ( const particle in)

adds a particle to the neighborhood if it is close enough returns true if the particle is added, false otherwise

References distancesq(), frame_, max_neighborhood_range_, and neighborhood_.

Referenced by tracking::Hash_shelf::fill_in_neighborhood().

void particle_base::clear_wrapper_in ( )
static

Cleans up the set wrapper_in.

References wrapper_in_.

Referenced by tracking::hash_case::~hash_case(), and tracking::Master_box::~Master_box().

complex< float > particle_base::compute_phi_6 ( ) const

computes and returns the order parameter $\Phi_6$.

Defined by

\[ \Phi_{6}(r_{m}) = \frac{1}{N_{b}}\sum_{n=1}^{N_{b}}e^{6 i\theta_{mn} } \]

References neighborhood_, and position_.

Referenced by fill_phi_6().

float particle_base::distancesq ( const particle_base part_in) const
void particle_base::fill_phi_6 ( )

Fills the order parameter with $\Phi_6$.

See compute_phi_6()

References compute_phi_6(), print(), and s_order_parameter_.

void particle_base::fill_position ( )
private

Fills the position members from the wrapper.

This is done because the position is referenced a lot.

References utilities::D_XPOS, utilities::D_YPOS, utilities::D_ZPOS, frame_, utilities::Wrapper_in::get_value(), ind_, position_, and wrapper_in_.

Referenced by particle_base().

const utilities::Tuplef particle_base::get_disp ( const particle_base part_in) const
int tracking::particle_base::get_frame ( ) const
inline

returns the frame of the current particle

References frame_.

Referenced by tracking::Track_box::output_to_wrapper(), and tracking::Track_shelf::output_to_wrapper().

int tracking::particle_base::get_ind ( ) const
inline

returns the index of the current particle

References ind_.

Referenced by tracking::particle_track::get_value(), tracking::Track_shelf::output_to_wrapper(), and tracking::Hash_shelf::push().

static float tracking::particle_base::get_max_range ( )
inlinestatic

returns the maximum neighborhood range

References max_neighborhood_range_.

Referenced by tracking::Hash_shelf::fill_in_neighborhood().

const std::vector<const particle*> tracking::particle_base::get_neighborhood ( ) const
inline

returns the neighborhood vector

References neighborhood_.

static float tracking::particle_base::get_neighborhood_range ( )
inlinestatic

returns the range of the neighborhood

References max_neighborhood_range_.

Referenced by tracking::hash_box::compute_corr().

unsigned int tracking::particle_base::get_neighborhood_size ( ) const
inline

returns the number of particles with in max_neighborhood_range_ of the particle (assuming that these have been initialized

References neighborhood_.

Referenced by tracking::Track_shelf::compute_corrected_TA_ncuts().

const utilities::Tuplef& tracking::particle_base::get_position ( ) const
inline
float particle_base::get_r ( const utilities::Tuplef origin) const

Returns the distance of the particle from the specified origin.

Parameters
originthe cordinates of the new origin

References position_.

std::complex<float> tracking::particle_base::get_scaler_order_pram ( ) const
inline

returns the scaler order parameter

References s_order_parameter_.

float particle_base::get_theta ( const utilities::Tuplef origin) const

Returns the angle in the plane from the Y-axis.

Parameters
originthe cordinates of the new origin

References position_.

float particle_base::get_value ( utilities::D_TYPE  type,
float &  val 
) const

Returns the float value of type given.

The value is passed out by reference and returned

Parameters
typethe value to be extracted
valreference to the variable to be set. Also sets type of function call

References frame_, utilities::Wrapper_in::get_value(), ind_, utilities::V_FLOAT, utilities::v_type(), and wrapper_in_.

Referenced by tracking::particle_track::get_value().

int particle_base::get_value ( utilities::D_TYPE  type,
int &  val 
) const

Returns the int value of type given.

The value is passed out by reference and returned

Parameters
typethe value to be extracted
valreference to the variable to be set. Also sets type of function call

References utilities::D_FRAME, utilities::D_INDEX, utilities::D_N_SIZE, frame_, utilities::Wrapper_in::get_value(), ind_, neighborhood_, utilities::V_INT, utilities::v_type(), and wrapper_in_.

complex< float > particle_base::get_value ( utilities::D_TYPE  type,
std::complex< float > &  val 
) const

Returns the complex value of type given.

The value is passed out by reference and returned

Parameters
typethe value to be extracted
valreference to the variable to be set. Also sets type of function call

References utilities::D_S_ORDER_PARAMETER, frame_, utilities::Wrapper_in::get_value(), ind_, s_order_parameter_, utilities::V_COMPLEX, utilities::v_type(), and wrapper_in_.

template<class T >
template int particle_base::get_wrapper_value ( utilities::D_TYPE  type,
T &  val 
) const

Returns the a value associated with the particle directly from the wrapper, by passing all logic in the particle object.

References frame_, utilities::Wrapper_in::get_value(), ind_, and wrapper_in_.

Referenced by tracking::Track_shelf::init().

void particle_base::intialize_wrapper_in ( const utilities::Wrapper_in in)
static

Intialize the static input wrapper for all particles.

References wrapper_in_.

Referenced by tracking::hash_case::init(), and tracking::Master_box::priv_init().

bool particle_base::lthan ( const particle_base a,
const particle_base b 
) const
private

function for sorting the vectors in ascending order, returns true if the first argument goes before the second argument in the specific strict weak ordering it defines, and false otherwise.

References distancesq().

bool particle_base::no_neighborhood_repeats ( ) const

checks to make sure the neighborhood does not include any repeats, returns true if the neighborhood is repeat free.

Mostly for debugging

References neighborhood_.

void particle_base::print ( ) const

Pring out a rasonable representation of the partile.

References frame_, ind_, and position_.

Referenced by fill_phi_6(), tracking::particle_track::print_t(), and tracking::Hash_shelf::push().

void particle_base::priv_init ( )
private

Private initialization function.

References wrapper_in_.

Referenced by particle_base().

static void tracking::particle_base::set_neighborhood_range ( float  in)
inlinestatic

Sets the maximum neighborhood range, there needs to be something to make sure that this doesn't get changed with out updating the.

References max_neighborhood_range_.

void particle_base::sort_neighborhood ( )

Sorts the neighborhood vector in ascending order.

References neighborhood_.

Referenced by tracking::Hash_shelf::fill_in_neighborhood().

Member Data Documentation

int tracking::particle_base::frame_
protected

The frame of the particle.

Referenced by add_to_neighborhood(), fill_position(), get_frame(), get_value(), get_wrapper_value(), and print().

int tracking::particle_base::ind_
protected

Identifier that comes from the wrapper.

Referenced by fill_position(), get_ind(), get_value(), get_wrapper_value(), and print().

float particle_base::max_neighborhood_range_ = 0
staticprotected

Maximum distance to be part of the neighborhood.

Referenced by add_to_neighborhood(), get_max_range(), get_neighborhood_range(), and set_neighborhood_range().

std::vector<const particle*> tracking::particle_base::neighborhood_
protected

Vector of the particles with in max_range_ in the Hash_shelf_ of the particle.

Referenced by add_to_neighborhood(), compute_phi_6(), get_neighborhood(), get_neighborhood_size(), get_value(), no_neighborhood_repeats(), and sort_neighborhood().

utilities::Tuplef tracking::particle_base::position_
protected

New attempt at storing the position data, this has the problem of taking more memory, but it might help the time.

This will also make keeping track of the displacements.

Referenced by compute_phi_6(), distancesq(), tracking::particle_track::distancesq_corrected(), fill_position(), tracking::particle_track::get_corrected_disp(), tracking::particle_track::get_corrected_pos(), get_disp(), get_position(), get_r(), get_theta(), and print().

std::complex<float> tracking::particle_base::s_order_parameter_
protected

Scaler order parameter, ex phi_6 in 2D.

Referenced by fill_phi_6(), get_scaler_order_pram(), and get_value().

const Wrapper_in * particle_base::wrapper_in_ = NULL
staticprotected

object that takes care of all the underling data structures.

Referenced by clear_wrapper_in(), fill_position(), get_value(), get_wrapper_value(), intialize_wrapper_in(), and priv_init().


The documentation for this class was generated from the following files: