Voro++
|
Class for looping over a subset of particles in a container. More...
#include <c_loops.hh>
Public Member Functions | |
template<class c_class > | |
c_loop_subset (c_class &con) | |
void | setup_sphere (double vx, double vy, double vz, double r, bool bounds_test=true) |
void | setup_box (double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, bool bounds_test=true) |
void | setup_intbox (int ai_, int bi_, int aj_, int bj_, int ak_, int bk_) |
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 | |
c_loop_subset_mode | mode |
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 |
This class can loop over a subset of particles in a certain geometrical region within the container. The class can be set up to loop over a rectangular box or sphere. It can also rectangular group of internal computational blocks.
Definition at line 218 of file c_loops.hh.
|
inline |
The constructor copies several necessary constants from the base container class.
[in] | con | the container class to use. |
Definition at line 228 of file c_loops.hh.
|
inline |
Finds the next particle to test.
Definition at line 238 of file c_loops.hh.
void voro::c_loop_subset::setup_box | ( | double | xmin, |
double | xmax, | ||
double | ymin, | ||
double | ymax, | ||
double | zmin, | ||
double | zmax, | ||
bool | bounds_test = true |
||
) |
Initializes the class to loop over all particles in a rectangular box.
[in] | (xmin,xmax) | the minimum and maximum x coordinates of the box. |
[in] | (ymin,ymax) | the minimum and maximum y coordinates of the box. |
[in] | (zmin,zmax) | the minimum and maximum z coordinates of the box. |
[in] | bounds_test | whether to do detailed bounds checking. If this is false then the class will loop over all particles in blocks that overlap the given box. If it is true, the particle will only loop over the particles which actually lie within the box. |
Definition at line 98 of file c_loops.cc.
void voro::c_loop_subset::setup_intbox | ( | int | ai_, |
int | bi_, | ||
int | aj_, | ||
int | bj_, | ||
int | ak_, | ||
int | bk_ | ||
) |
Initializes the class to loop over all particles in a rectangular subgrid of blocks.
[in] | (ai_,bi_) | the subgrid range in the x-direction, inclusive of both ends. |
[in] | (aj_,bj_) | the subgrid range in the y-direction, inclusive of both ends. |
[in] | (ak_,bk_) | the subgrid range in the z-direction, inclusive of both ends. |
Definition at line 44 of file c_loops.cc.
void voro::c_loop_subset::setup_sphere | ( | double | vx, |
double | vy, | ||
double | vz, | ||
double | r, | ||
bool | bounds_test = true |
||
) |
Initializes a c_loop_subset object to scan over all particles within a given sphere.
[in] | (vx,vy,vz) | the position vector of the center of the sphere. |
[in] | r | the radius of the sphere. |
[in] | bounds_test | whether to do detailed bounds checking. If this is false then the class will loop over all particles in blocks that overlap the given sphere. If it is true, the particle will only loop over the particles which actually lie within the sphere. |
Definition at line 24 of file c_loops.cc.
bool voro::c_loop_subset::start | ( | ) |
Starts the loop by finding the first particle within the container to consider.
Definition at line 79 of file c_loops.cc.
c_loop_subset_mode voro::c_loop_subset::mode |
The current mode of operation, determining whether tests should be applied to particles to ensure they are within a certain geometrical object.
Definition at line 223 of file c_loops.hh.