Voro++

- Main Page
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions
voro::pre_container Class Reference

A class for storing an arbitrary number of particles without radius information, prior to setting up a container geometry. More...

`#include <pre_container.hh>`

Inheritance diagram for voro::pre_container:

## Public Member Functions
| pre_container (double ax_, double bx_, double ay_, double by_, double az_, double bz_, bool xperiodic_, bool yperiodic_, bool zperiodic_)
void | put (int n, double x, double y, double z)
void | import (FILE *fp=stdin)
void | import (const char *filename)
void | setup (container &con)
void | setup (particle_order &vo, container &con)
Public Member Functions inherited from voro::pre_container_base
void | guess_optimal (int &nx, int &ny, int &nz)
| pre_container_base (double ax_, double bx_, double ay_, double by_, double az_, double bz_, bool xperiodic_, bool yperiodic_, bool zperiodic_, int ps_)
| ~pre_container_base ()
int | total_particles ()

## Additional Inherited Members
Data Fields inherited from voro::pre_container_base
const double | ax
const double | bx
const double | ay
const double | by
const double | az
const double | bz
const bool | xperiodic
const bool | yperiodic
const bool | zperiodic
Protected Member Functions inherited from voro::pre_container_base
void | new_chunk ()
void | extend_chunk_index ()
Protected Attributes inherited from voro::pre_container_base
const int | ps
int | index_sz
int ** | pre_id
int ** | end_id
int ** | l_id
int * | ch_id
int * | e_id
double ** | pre_p
double ** | end_p
double * | ch_p

## Detailed Description

The pre_container class is an extension of the pre_container_base class for cases when no particle radius information is available.

Definition at line 101 of file pre_container.hh.

## Constructor & Destructor Documentation

voro::pre_container::pre_container | ( | double | ax_,
|  | double | bx_,
|  | double | ay_,
|  | double | by_,
|  | double | az_,
|  | double | bz_,
|  | bool | xperiodic_,
|  | bool | yperiodic_,
|  | bool | zperiodic_
| ) |  |
| inline

The class constructor sets up the geometry of container, initializing the minimum and maximum coordinates in each direction.

Parameters

  [in] | (ax_,bx_) | the minimum and maximum x coordinates.
  [in] | (ay_,by_) | the minimum and maximum y coordinates.
  [in] | (az_,bz_) | the minimum and maximum z coordinates.
  [in] | (xperiodic_,yperiodic_,zperiodic_ | ) flags setting whether the container is periodic in each coordinate direction.

Definition at line 112 of file pre_container.hh.

## Member Function Documentation

void voro::pre_container::import | ( | FILE * | fp = `stdin` | ) |

Import a list of particles from an open file stream into the container. Entries of four numbers (Particle ID, x position, y position, z position) are searched for. If the file cannot be successfully read, then the routine causes a fatal error.

Parameters

  [in] | fp | the file handle to read from.

Definition at line 190 of file pre_container.cc.

void voro::pre_container::import | ( | const char * | filename | ) |
| inline

Imports particles from a file.

Parameters

  [in] | filename | the name of the file to read from.

Definition at line 119 of file pre_container.hh.

void voro::pre_container::put | ( | int | n,
|  | double | x,
|  | double | y,
|  | double | z
| ) |  |

Stores a particle ID and position, allocating a new memory chunk if necessary. For coordinate directions in which the container is not periodic, the routine checks to make sure that the particle is within the container bounds. If the particle is out of bounds, it is not stored.

Parameters

  [in] | n | the numerical ID of the inserted particle.
  [in] | (x,y,z) | the position vector of the inserted particle.

Definition at line 71 of file pre_container.cc.

void voro::pre_container::setup | ( | container & | con | ) |

Transfers the particles stored within the class to a container class.

Parameters

  [in] | con | the container class to transfer to.

Definition at line 99 of file pre_container.cc.

void voro::pre_container::setup | ( | particle_order & | vo,
|  | container & | con
| ) |  |

Transfers the particles stored within the class to a container class, also recording the order in which particles were stored.

Parameters

  [in] | vo | the ordering class to use.
  [in] | con | the container class to transfer to.

Definition at line 143 of file pre_container.cc.

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

- pre_container.hh
- pre_container.cc