Voro++
|
A class for storing an arbitrary number of particles, prior to setting up a container geometry. More...
#include <pre_container.hh>
Public Member Functions | |
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 () |
Data Fields | |
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 | |
void | new_chunk () |
void | extend_chunk_index () |
Protected Attributes | |
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 |
The pre_container_base class can dynamically import and store an arbitrary number of particles. Once the particles have been read in, an appropriate container class can be set up with the optimal grid size, and the particles can be transferred.
The pre_container_base class is not intended for direct use, but forms the base of the pre_container and pre_container_poly classes, that add routines depending on whether particle radii need to be tracked or not.
Definition at line 31 of file pre_container.hh.
voro::pre_container_base::pre_container_base | ( | double | ax_, |
double | bx_, | ||
double | ay_, | ||
double | by_, | ||
double | az_, | ||
double | bz_, | ||
bool | xperiodic_, | ||
bool | yperiodic_, | ||
bool | zperiodic_, | ||
int | ps_ | ||
) |
The class constructor sets up the geometry of container, initializing the minimum and maximum coordinates in each direction. It allocates an initial chunk into which to store particle information.
[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. |
[in] | ps_ | the number of floating point entries to store for each particle. |
Definition at line 29 of file pre_container.cc.
voro::pre_container_base::~pre_container_base | ( | ) |
The destructor frees the dynamically allocated memory.
Definition at line 41 of file pre_container.cc.
|
protected |
Extends the index of chunks.
Definition at line 219 of file pre_container.cc.
void voro::pre_container_base::guess_optimal | ( | int & | nx, |
int & | ny, | ||
int & | nz | ||
) |
Makes a guess at the optimal grid of blocks to use, computing in a way that
[out] | (nx,ny,nz) | the number of blocks to use. |
Definition at line 57 of file pre_container.cc.
|
protected |
Allocates a new chunk of memory for storing particles.
Definition at line 210 of file pre_container.cc.
|
inline |
Calculates and returns the total number of particles stored within the class.
Definition at line 60 of file pre_container.hh.
const double voro::pre_container_base::ax |
The minimum x coordinate of the container.
Definition at line 34 of file pre_container.hh.
const double voro::pre_container_base::ay |
The minimum y coordinate of the container.
Definition at line 38 of file pre_container.hh.
const double voro::pre_container_base::az |
The minimum z coordinate of the container.
Definition at line 42 of file pre_container.hh.
const double voro::pre_container_base::bx |
The maximum x coordinate of the container.
Definition at line 36 of file pre_container.hh.
const double voro::pre_container_base::by |
The maximum y coordinate of the container.
Definition at line 40 of file pre_container.hh.
const double voro::pre_container_base::bz |
The maximum z coordinate of the container.
Definition at line 44 of file pre_container.hh.
|
protected |
A pointer to the next available slot on the current particle ID chunk.
Definition at line 82 of file pre_container.hh.
|
protected |
A pointer to the next available slot on the current floating point chunk.
Definition at line 93 of file pre_container.hh.
|
protected |
A pointer to the end of the current integer chunk.
Definition at line 84 of file pre_container.hh.
|
protected |
A pointer to the last allocated integer ID chunk.
Definition at line 76 of file pre_container.hh.
|
protected |
A pointer to the last allocated chunk of floating point information.
Definition at line 90 of file pre_container.hh.
|
protected |
The size of the chunk index.
Definition at line 71 of file pre_container.hh.
|
protected |
A pointer to the end of the integer ID chunk index, used to determine when the chunk index is full.
Definition at line 79 of file pre_container.hh.
|
protected |
A pointer to the chunk index to store the integer particle IDs.
Definition at line 74 of file pre_container.hh.
|
protected |
A pointer to the chunk index to store the floating point information associated with particles.
Definition at line 87 of file pre_container.hh.
|
protected |
The number of doubles associated with a single particle (three for the standard container, four when radius information is stored).
Definition at line 67 of file pre_container.hh.
const bool voro::pre_container_base::xperiodic |
A boolean value that determines if the x coordinate in periodic or not.
Definition at line 47 of file pre_container.hh.
const bool voro::pre_container_base::yperiodic |
A boolean value that determines if the y coordinate in periodic or not.
Definition at line 50 of file pre_container.hh.
const bool voro::pre_container_base::zperiodic |
A boolean value that determines if the z coordinate in periodic or not.
Definition at line 53 of file pre_container.hh.