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

Class for looping over a subset of particles in a container. More...

#include <c_loops.hh>

+ Inheritance diagram for voro::c_loop_subset:

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
 

Detailed Description

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.

Constructor & Destructor Documentation

template<class c_class >
voro::c_loop_subset::c_loop_subset ( c_class &  con)
inline

The constructor copies several necessary constants from the base container class.

Parameters
[in]conthe container class to use.

Definition at line 228 of file c_loops.hh.

Member Function Documentation

bool voro::c_loop_subset::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 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.

Parameters
[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_testwhether 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.
Returns
True if there is any valid point to loop over, false otherwise.

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.

Parameters
[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.
Returns
True if there is any valid point to loop over, false otherwise.

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.

Parameters
[in](vx,vy,vz)the position vector of the center of the sphere.
[in]rthe radius of the sphere.
[in]bounds_testwhether 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.
Returns
True if there is any valid point to loop over, false otherwise.

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.

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

Definition at line 79 of file c_loops.cc.

Field Documentation

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.


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