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 307 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 setting the necessary constants about the container geometry from a pointer to the current container class.

Parameters:
[in] q a pointer to the current container class.

Definition at line 1352 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.

Parameters:
[in,out] (px,py,pz) the current block on entering the function, which is updated to the next block on exiting the function.

Definition at line 1440 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 a given rectangular box. It calculates the index of the first block that needs to be tested and sets the periodic displacement vector (px,py,pz) accordingly.

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.
[out] (px,py,pz) the periodic displacement vector for the first block to be tested.
Returns:
The index of the first block to be tested.

Definition at line 1405 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 given sphere. It calculates the index of the first block that needs to be tested and sets the periodic displacement vector accordingly.

Parameters:
[in] (vx,vy,vz) the position vector of the center of the sphere.
[in] r the radius of the sphere.
[out] (px,py,pz) the periodic displacement vector for the first block to be tested.
Returns:
The index of the first block to be tested.

Definition at line 1366 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 316 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 319 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 322 of file container.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