A class for storing an arbitrary number of particles, prior to setting up a container geometry.
More...
#include <pre_container.hh>
|
| 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 () |
| |
| PRAGMA_DISABLE_UNSAFE_TYPECAST_WARNINGS int | total_particles () |
| |
A class for storing an arbitrary number of particles, prior to setting up a container geometry.
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.
◆ pre_container_base()
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.
- 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. |
| [in] | ps_ | the number of floating point entries to store for each particle. |
◆ ~pre_container_base()
| voro::pre_container_base::~pre_container_base |
( |
| ) |
|
The destructor frees the dynamically allocated memory.
◆ extend_chunk_index()
| void voro::pre_container_base::extend_chunk_index |
( |
| ) |
|
|
protected |
Extends the index of chunks.
◆ guess_optimal()
| 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
- Parameters
-
| [out] | (nx,ny,nz) | the number of blocks to use. |
◆ new_chunk()
| void voro::pre_container_base::new_chunk |
( |
| ) |
|
|
protected |
Allocates a new chunk of memory for storing particles.
◆ total_particles()
Calculates and returns the total number of particles stored within the class.
- Returns
- The number of particles.
◆ ax
| const double voro::pre_container_base::ax |
The minimum x coordinate of the container.
◆ ay
| const double voro::pre_container_base::ay |
The minimum y coordinate of the container.
◆ az
| const double voro::pre_container_base::az |
The minimum z coordinate of the container.
◆ bx
| const double voro::pre_container_base::bx |
The maximum x coordinate of the container.
◆ by
| const double voro::pre_container_base::by |
The maximum y coordinate of the container.
◆ bz
| const double voro::pre_container_base::bz |
The maximum z coordinate of the container.
◆ ch_id
| int* voro::pre_container_base::ch_id |
|
protected |
A pointer to the next available slot on the current particle ID chunk.
◆ ch_p
| double* voro::pre_container_base::ch_p |
|
protected |
A pointer to the next available slot on the current floating point chunk.
◆ e_id
| int* voro::pre_container_base::e_id |
|
protected |
A pointer to the end of the current integer chunk.
◆ end_id
| int** voro::pre_container_base::end_id |
|
protected |
A pointer to the last allocated integer ID chunk.
◆ end_p
| double** voro::pre_container_base::end_p |
|
protected |
A pointer to the last allocated chunk of floating point information.
◆ index_sz
| int voro::pre_container_base::index_sz |
|
protected |
The size of the chunk index.
◆ l_id
| int** voro::pre_container_base::l_id |
|
protected |
A pointer to the end of the integer ID chunk index, used to determine when the chunk index is full.
◆ pre_id
| int** voro::pre_container_base::pre_id |
|
protected |
A pointer to the chunk index to store the integer particle IDs.
◆ pre_p
| double** voro::pre_container_base::pre_p |
|
protected |
A pointer to the chunk index to store the floating point information associated with particles.
◆ ps
| const int voro::pre_container_base::ps |
|
protected |
The number of doubles associated with a single particle (three for the standard container, four when radius information is stored).
◆ xperiodic
| const bool voro::pre_container_base::xperiodic |
A boolean value that determines if the x coordinate in periodic or not.
◆ yperiodic
| const bool voro::pre_container_base::yperiodic |
A boolean value that determines if the y coordinate in periodic or not.
◆ zperiodic
| const bool voro::pre_container_base::zperiodic |
A boolean value that determines if the z coordinate in periodic or not.
The documentation for this class was generated from the following files: