neighbor_track Class Reference

A class passed to the voronoicell_base template to switch on the neighbor computation. More...

#include <cell.hh>

Public Member Functions

 neighbor_track (voronoicell_base< neighbor_track > *ivc)
 ~neighbor_track ()
void allocate (int i, int m)
void add_memory_vertices (int i)
void add_memory_vorder (int i)
void init ()
void init_octahedron ()
void init_tetrahedron ()
void set_pointer (int p, int n)
void copy (int a, int b, int c, int d)
void set (int a, int b, int c)
void set_aux1 (int k)
void copy_aux1 (int a, int b)
void copy_aux1_shift (int a, int b)
void set_aux2_copy (int a, int b)
void copy_pointer (int a, int b)
void set_to_aux1 (int j)
void set_to_aux2 (int j)
void print_edges (int i)
void allocate_aux1 (int i)
void switch_to_aux1 (int i)
void copy_to_aux1 (int i, int m)
void set_to_aux1_offset (int k, int m)
void neighbors (ostream &os, bool later)
void label_facets ()
void check_facets ()

Data Fields

int ** mne
int ** ne
voronoicell_base
< neighbor_track > * 
vc

Detailed Description

A class passed to the voronoicell_base template to switch on the neighbor computation.

This class encapsulates all the routines which are required to carry out the neighbor tracking. If the voronoicell_base template is instantiated with this class, then the neighbor computation is enabled. All these routines are simple and declared inline, so they should be directly integrated into the functions in the voronoicell class during compilation, without zero function call overhead.

Definition at line 331 of file cell.hh.


Constructor & Destructor Documentation

neighbor_track::neighbor_track ( voronoicell_base< neighbor_track > *  ivc  ) 

This constructs the neighbor_track class, within a current voronoicell_neighbor class. It allocates memory for neighbor storage in a similar way to the voronoicell constructor.

Parameters:
[in] ivc a pointer to the parent voronoicell_neighbor class.

Definition at line 2316 of file cell.cc.

neighbor_track::~neighbor_track (  ) 

The destructor for the neighbor_track class deallocates the arrays for neighbor tracking.

Definition at line 2327 of file cell.cc.


Member Function Documentation

void neighbor_track::add_memory_vertices ( int  i  )  [inline]

This increases the size of the ne[] array.

Parameters:
[in] i the new size of the array.

Definition at line 2342 of file cell.cc.

void neighbor_track::add_memory_vorder ( int  i  )  [inline]

This increases the size of the maximum allowable vertex order in the neighbor tracking.

Parameters:
[in] i the new size of the neighbor vertex order array.

Definition at line 2352 of file cell.cc.

void neighbor_track::allocate ( int  i,
int  m 
) [inline]

This allocates a single array for neighbor tracking.

Parameters:
[in] i the vertex order of the array to be extended.
[in] m the size of the array to be extended.

Definition at line 2336 of file cell.cc.

void neighbor_track::allocate_aux1 ( int  i  )  [inline]

This allocates a new array and sets the auxiliary pointer to it.

Definition at line 2467 of file cell.cc.

void neighbor_track::check_facets (  )  [inline]

This routine checks to make sure the neighbor information of each face is consistent.

Definition at line 2490 of file cell.cc.

void neighbor_track::copy ( int  a,
int  b,
int  c,
int  d 
) [inline]

This is a basic operation to copy ne[c][d] to ne[a][b].

Definition at line 2410 of file cell.cc.

void neighbor_track::copy_aux1 ( int  a,
int  b 
) [inline]

This is a basic operation to copy a neighbor into paux1.

Definition at line 2426 of file cell.cc.

void neighbor_track::copy_aux1_shift ( int  a,
int  b 
) [inline]

This is a basic operation to copy a neighbor into paux1 with a shift. It is used in the delete_connection() routine of the voronoicell class.

Definition at line 2432 of file cell.cc.

void neighbor_track::copy_pointer ( int  a,
int  b 
) [inline]

This is a basic routine to copy ne[b] into ne[a].

Definition at line 2444 of file cell.cc.

void neighbor_track::copy_to_aux1 ( int  i,
int  m 
) [inline]

This routine copies neighbor information into the auxiliary pointer.

Definition at line 2479 of file cell.cc.

void neighbor_track::init (  )  [inline]

This initializes the neighbor information for a rectangular box and is called during the initialization routine for the voronoicell class.

Definition at line 2361 of file cell.cc.

void neighbor_track::init_octahedron (  )  [inline]

This initializes the neighbor information for an octahedron. The eight initial faces are assigned ID numbers from -1 to -8.

Definition at line 2378 of file cell.cc.

void neighbor_track::init_tetrahedron (  )  [inline]

This initializes the neighbor information for an tetrahedron. The four initial faces are assigned ID numbers from -1 to -4.

Definition at line 2392 of file cell.cc.

void neighbor_track::label_facets (  )  [inline]

This routine labels the facets in an arbitrary order, starting from one.

Definition at line 2537 of file cell.cc.

void neighbor_track::neighbors ( ostream &  os,
bool  later 
) [inline]

This routine provides a list of plane IDs.

Parameters:
[in] os an output stream to write to.
[in] later a boolean value to determine whether or not to write a space character before the first entry.

Definition at line 2515 of file cell.cc.

void neighbor_track::print_edges ( int  i  )  [inline]

This prints out the neighbor information for vertex i.

Definition at line 2459 of file cell.cc.

void neighbor_track::set ( int  a,
int  b,
int  c 
) [inline]

This is a basic operation to carry out ne[a][b]=c.

Definition at line 2415 of file cell.cc.

void neighbor_track::set_aux1 ( int  k  )  [inline]

This is a basic operation to set the auxiliary pointer paux1.

Parameters:
[in] k the order of the vertex to point to.

Definition at line 2421 of file cell.cc.

void neighbor_track::set_aux2_copy ( int  a,
int  b 
) [inline]

This routine sets the second auxiliary pointer to a new section of memory, and then copies existing neighbor information into it.

Definition at line 2438 of file cell.cc.

void neighbor_track::set_pointer ( int  p,
int  n 
) [inline]

This is a basic operation to set a new pointer in the ne[] array.

Parameters:
[in] p the index in the ne[] array to set.
[in] n the order of the vertex.

Definition at line 2405 of file cell.cc.

void neighbor_track::set_to_aux1 ( int  j  )  [inline]

This sets ne[j] to the first auxiliary pointer.

Definition at line 2449 of file cell.cc.

void neighbor_track::set_to_aux1_offset ( int  k,
int  m 
) [inline]

This sets ne[k] to the auxiliary pointer with an offset.

Definition at line 2484 of file cell.cc.

void neighbor_track::set_to_aux2 ( int  j  )  [inline]

This sets ne[j] to the second auxiliary pointer.

Definition at line 2454 of file cell.cc.

void neighbor_track::switch_to_aux1 ( int  i  )  [inline]

This deletes a particular neighbor array and switches the pointer to the auxiliary pointer.

Definition at line 2473 of file cell.cc.


Field Documentation

This two dimensional array holds the neighbor information associated with each vertex. mne[p] is a one dimensional array which holds all of the neighbor information for vertices of order p.

Definition at line 337 of file cell.hh.

This is a two dimensional array that holds the neighbor information associated with each vertex. ne[i] points to a one-dimensional array in mne[nu[i]]. ne[i][j] holds the neighbor information associated with the jth edge of vertex i. It is set to the ID number of the plane that made the face that is clockwise from the jth edge.

Definition at line 344 of file cell.hh.

This is a pointer back to the voronoicell class which created this class. It is used to reference the members of that class in computations.

Definition at line 350 of file cell.hh.


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

Generated on Tue Sep 29 11:46:27 2009 for Voro++ by  doxygen 1.6.1