Voro++
Public Member Functions | Data Fields
voro::c_loop_order Class Reference

Class for looping over all of the particles specified in a pre-assembled particle_order class. More...

#include <c_loops.hh>

+ Inheritance diagram for voro::c_loop_order:

Public Member Functions

template<class c_class >
 c_loop_order (c_class &con, particle_order &vo_)
 
bool start ()
 
bool inc ()
 
- Public Member Functions inherited from voro::c_loop_base
template<class c_class >
 c_loop_base (c_class &con)
 
void pos (double &x, double &y, double &z)
 
void pos (int &pid, double &x, double &y, double &z, double &r)
 
double x ()
 
double y ()
 
double z ()
 
int pid ()
 

Data Fields

particle_ordervo
 
int * cp
 
int * op
 
- Data Fields inherited from voro::c_loop_base
const int nx
 
const int ny
 
const int nz
 
const int nxy
 
const int nxyz
 
const int ps
 
double ** p
 
int ** id
 
int * co
 
int i
 
int j
 
int k
 
int ijk
 
int q
 

Detailed Description

The particle_order class can be used to create a specific order of particles within the container. This class can then loop over these particles in this order. The class is particularly useful in cases where the ordering of the output must match the ordering of particles as they were inserted into the container.

Definition at line 268 of file c_loops.hh.

Constructor & Destructor Documentation

template<class c_class >
voro::c_loop_order::c_loop_order ( c_class &  con,
particle_order vo_ 
)
inline

The constructor copies several necessary constants from the base class, and sets up a reference to the ordering class to use.

Parameters
[in]conthe container class to use.
[in]vo_the ordering class to use.

Definition at line 282 of file c_loops.hh.

Member Function Documentation

bool voro::c_loop_order::inc ( )
inline

Finds the next particle to test.

Returns
True if there is another particle, false if no more particles are available.

Definition at line 298 of file c_loops.hh.

bool voro::c_loop_order::start ( )
inline

Sets the class to consider the first particle.

Returns
True if there is any particle to consider, false otherwise.

Definition at line 287 of file c_loops.hh.

Field Documentation

int* voro::c_loop_order::cp

A pointer to the current position in the ordering class.

Definition at line 273 of file c_loops.hh.

int* voro::c_loop_order::op

A pointer to the end position in the ordering class.

Definition at line 275 of file c_loops.hh.

particle_order& voro::c_loop_order::vo

A reference to the ordering class to use.

Definition at line 271 of file c_loops.hh.


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