facets_loop Class Reference

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

#include <container.hh>

List of all members.

Public Member Functions

template<class r_option >
 facets_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)

Public Attributes

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 facets_loop class. A facets_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 296 of file container.hh.


Constructor & Destructor Documentation

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

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

Definition at line 1261 of file container.cc.


Member Function Documentation

int facets_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 1336 of file container.cc.

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

Initializes a facets_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 1304 of file container.cc.

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

Initializes a facets_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 1270 of file container.cc.


Member Data Documentation

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

Definition at line 305 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 308 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 311 of file container.hh.


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

Generated on Mon Nov 3 18:02:18 2008 for Voro++ by  doxygen 1.5.7