voropp_loop Class Reference

A class to handle loops on regions of the container handling non-periodic and periodic boundary conditions. More...

#include <container.hh>


Public Member Functions

template<class r_option >
 voropp_loop (container_base< r_option > *q)
int init (fpoint vx, fpoint vy, fpoint vz, fpoint r, fpoint &px, fpoint &py, fpoint &pz)
int init (fpoint xmin, fpoint xmax, fpoint ymin, fpoint ymax, fpoint zmin, fpoint zmax, fpoint &px, fpoint &py, fpoint &pz)
int inc (fpoint &px, fpoint &py, fpoint &pz)

Data Fields

int ip
int jp
int kp


Detailed Description

A class to handle loops on regions of the container handling non-periodic and periodic boundary conditions.

Many of the container routines require scanning over a rectangular sub-grid of blocks, and the routines for handling this are stored in the voropp_loop class. A voropp_loop class can first be initialized to either calculate the subgrid which is within a distance r of a vector (vx,vy,vz), or a subgrid corresponding to a rectangular box. The routine inc() can then be successively called to step through all the blocks within this subgrid.

Definition at line 305 of file container.hh.


Constructor & Destructor Documentation

template<class r_option >
voropp_loop::voropp_loop ( container_base< r_option > *  q  )  [inline]

Creates a voropp_loop object, by pulling the necessary constants about the container geometry from a pointer to the current container class.

Definition at line 1405 of file container.cc.


Member Function Documentation

int voropp_loop::inc ( fpoint px,
fpoint py,
fpoint pz 
) [inline]

Returns the next block to be tested in a loop, and updates the periodicity vector if necessary.

Definition at line 1480 of file container.cc.

int voropp_loop::init ( fpoint  xmin,
fpoint  xmax,
fpoint  ymin,
fpoint  ymax,
fpoint  zmin,
fpoint  zmax,
fpoint px,
fpoint py,
fpoint pz 
) [inline]

Initializes a voropp_loop object, by finding all blocks which overlap the box with corners (xmin,ymin,zmin) and (xmax,ymax,zmax). It returns the first block which is to be tested, and sets the periodic displacement vector (px,py,pz) accordingly.

Definition at line 1448 of file container.cc.

int voropp_loop::init ( fpoint  vx,
fpoint  vy,
fpoint  vz,
fpoint  r,
fpoint px,
fpoint py,
fpoint pz 
) [inline]

Initializes a voropp_loop object, by finding all blocks which are within a distance r of the vector (vx,vy,vz). It returns the first block which is to be tested, and sets the periodic displacement vector (px,py,pz) accordingly.

Definition at line 1414 of file container.cc.


Field Documentation

The current block index in the x direction, referencing a real cell in the range 0 to nx-1.

Definition at line 314 of file container.hh.

The current block index in the y direction, referencing a real cell in the range 0 to ny-1.

Definition at line 317 of file container.hh.

The current block index in the z direction, referencing a real cell in the range 0 to nz-1.

Definition at line 320 of file container.hh.


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

Generated on Mon Aug 17 19:07:58 2009 for Voro++ by  doxygen 1.5.9