Package gov.nih.mipav.model.structures
Class Voro.pre_container_base
- java.lang.Object
-
- gov.nih.mipav.model.structures.Voro.pre_container_base
-
- Direct Known Subclasses:
Voro.pre_container,Voro.pre_container_poly
- Enclosing class:
- Voro
class Voro.pre_container_base extends java.lang.Object\brief 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.
-
-
Field Summary
Fields Modifier and Type Field Description doubleaxThe minimum x coordinate of the container.doubleayThe minimum y coordinate of the container.doubleazThe minimum z coordinate of the container.doublebxThe maximum x coordinate of the container.doublebyThe maximum y coordinate of the container.doublebzThe maximum z coordinate of the container.protected intch_idA pointer to the next available slot on the current particle ID chunk.protected intch_pA pointer to the next available slot on the current floating point chunk.protected inte_idA pointer to the end of the current integer chunk.protected intend_id_outer_indexA pointer to the last allocated integer ID chunk.protected intend_p_outer_indexA pointer to the last allocated chunk of floating point information.protected intindex_szThe size of the chunk index.protected intl_idA pointer to the end of the integer ID chunk index, used to determine when the chunk index is full.protected int[][]pre_idA pointer to the chunk index to store the integer particle IDs.protected double[][]pre_pA pointer to the chunk index to store the floating point information associated with particles.protected intpsThe number of doubles associated with a single particle (three for the standard container, four when radius information is stored).booleanxperiodicA boolean value that determines if the x coordinate in periodic or not.booleanyperiodicA boolean value that determines if the y coordinate in periodic or not.booleanzperiodicA boolean value that determines if the z coordinate in periodic or not.
-
Constructor Summary
Constructors Constructor Description pre_container_base(double ax_, double bx_, double ay_, double by_, double az_, double bz_, boolean xperiodic_, boolean yperiodic_, boolean zperiodic_, int ps_)The class constructor sets up the geometry of container, initializing the minimum and maximum coordinates in each direction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()The destructor frees the dynamically allocated memory.protected voidextend_chunk_index()Extends the index of chunks.voidguess_optimal(int[] nx, int[] ny, int[] nz)Makes a guess at the optimal grid of blocks to use, computing in a way that \param[out] (nx,ny,nz) the number of blocks to use.protected voidnew_chunk()Allocates a new chunk of memory for storing particles.inttotal_particles()Calculates and returns the total number of particles stored within the class.
-
-
-
Field Detail
-
ax
public double ax
The minimum x coordinate of the container.
-
bx
public double bx
The maximum x coordinate of the container.
-
ay
public double ay
The minimum y coordinate of the container.
-
by
public double by
The maximum y coordinate of the container.
-
az
public double az
The minimum z coordinate of the container.
-
bz
public double bz
The maximum z coordinate of the container.
-
xperiodic
public boolean xperiodic
A boolean value that determines if the x coordinate in periodic or not.
-
yperiodic
public boolean yperiodic
A boolean value that determines if the y coordinate in periodic or not.
-
zperiodic
public boolean zperiodic
A boolean value that determines if the z coordinate in periodic or not.
-
ps
protected int ps
The number of doubles associated with a single particle (three for the standard container, four when radius information is stored).
-
index_sz
protected int index_sz
The size of the chunk index.
-
pre_id
protected int[][] pre_id
A pointer to the chunk index to store the integer particle IDs.
-
end_id_outer_index
protected int end_id_outer_index
A pointer to the last allocated integer ID chunk.
-
l_id
protected int l_id
A pointer to the end of the integer ID chunk index, used to determine when the chunk index is full.
-
ch_id
protected int ch_id
A pointer to the next available slot on the current particle ID chunk.
-
e_id
protected int e_id
A pointer to the end of the current integer chunk.
-
pre_p
protected double[][] pre_p
A pointer to the chunk index to store the floating point information associated with particles.
-
end_p_outer_index
protected int end_p_outer_index
A pointer to the last allocated chunk of floating point information.
-
ch_p
protected int ch_p
A pointer to the next available slot on the current floating point chunk.
-
-
Constructor Detail
-
pre_container_base
public pre_container_base(double ax_, double bx_, double ay_, double by_, double az_, double bz_, boolean xperiodic_, boolean yperiodic_, boolean 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. \param[in] (ax_,bx_) the minimum and maximum x coordinates. \param[in] (ay_,by_) the minimum and maximum y coordinates. \param[in] (az_,bz_) the minimum and maximum z coordinates. \param[in] (xperiodic_,yperiodic_,zperiodic_ ) flags setting whether the container is periodic in each coordinate direction. \param[in] ps_ the number of floating point entries to store for each particle.
-
-
Method Detail
-
guess_optimal
public void guess_optimal(int[] nx, int[] ny, int[] nz)Makes a guess at the optimal grid of blocks to use, computing in a way that \param[out] (nx,ny,nz) the number of blocks to use.
-
delete
public void delete()
The destructor frees the dynamically allocated memory.
-
total_particles
public int total_particles()
Calculates and returns the total number of particles stored within the class. \return The number of particles.
-
new_chunk
protected void new_chunk()
Allocates a new chunk of memory for storing particles.
-
extend_chunk_index
protected void extend_chunk_index()
Extends the index of chunks.
-
-