Package gov.nih.mipav.model.structures
Class Voro.c_loop_base
java.lang.Object
gov.nih.mipav.model.structures.Voro.c_loop_base
- Direct Known Subclasses:
Voro.c_loop_all,Voro.c_loop_all_periodic,Voro.c_loop_order,Voro.c_loop_order_periodic,Voro.c_loop_subset
- Enclosing class:
Voro
\brief Base class for looping over particles in a container.
This class forms the base of all classes that can loop over a subset of
particles in a contaner in some order. When initialized, it stores constants
about the corresponding container geometry. It also contains a number of
routines for interrogating which particle currently being considered by the
loop, which are common between all of the derived classes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionint[]A pointer to the particle counts in the associated container data structure.intThe current x-index of the block under consideration by the loop.int[][]A pointer to the particle ID information in the associated container data structure.intThe current index of the block under consideration by the loop.intThe current y-index of the block under consideration by the loop.intThe current z-index of the block under consideration by the loop.intThe number of blocks in the x direction.intA constant, set to the value of nx multiplied by ny, which is used in the routines that step through blocks in sequence.intA constant, set to the value of nx*ny*nz, which is used in the routines that step through blocks in sequence.intThe number of blocks in the y direction.intThe number of blocks in the z direction.double[][]A pointer to the particle position information in the associated container data structure.intThe number of floating point numbers per particle in the associated container data structure.intThe index of the particle under consideration within the current block. -
Constructor Summary
ConstructorsConstructorDescriptionThe constructor copies several necessary constants from the base container class. -
Method Summary
Modifier and TypeMethodDescriptionintpid()Returns the ID of the particle currently being considered by the loop.voidpos(double[] x, double[] y, double[] z) Returns the position vector of the particle currently being considered by the loop.voidpos(int[] pid, double[] x, double[] y, double[] z, double[] r) Returns the ID, position vector, and radius of the particle currently being considered by the loop.doublex()Returns the x position of the particle currently being considered by the loop.doubley()Returns the y position of the particle currently being considered by the loop.doublez()Returns the z position of the particle currently being considered by the loop.
-
Field Details
-
nx
public int nxThe number of blocks in the x direction. -
ny
public int nyThe number of blocks in the y direction. -
nz
public int nzThe number of blocks in the z direction. -
nxy
public int nxyA constant, set to the value of nx multiplied by ny, which is used in the routines that step through blocks in sequence. -
nxyz
public int nxyzA constant, set to the value of nx*ny*nz, which is used in the routines that step through blocks in sequence. -
ps
public int psThe number of floating point numbers per particle in the associated container data structure. -
p
public double[][] pA pointer to the particle position information in the associated container data structure. -
id
public int[][] idA pointer to the particle ID information in the associated container data structure. -
co
public int[] coA pointer to the particle counts in the associated container data structure. -
i
public int iThe current x-index of the block under consideration by the loop. -
j
public int jThe current y-index of the block under consideration by the loop. -
k
public int kThe current z-index of the block under consideration by the loop. -
ijk
public int ijkThe current index of the block under consideration by the loop. -
q
public int qThe index of the particle under consideration within the current block.
-
-
Constructor Details
-
c_loop_base
c_loop_base(Voro.container_poly_radius_poly con) The constructor copies several necessary constants from the base container class. \param[in] con the container class to use. -
c_loop_base
c_loop_base(Voro.container_periodic_poly_radius_poly con) -
c_loop_base
c_loop_base(Voro.container_radius_mono con) -
c_loop_base
c_loop_base(Voro.container_periodic_radius_mono con)
-
-
Method Details
-
pos
public void pos(double[] x, double[] y, double[] z) Returns the position vector of the particle currently being considered by the loop. \param[out] (x,y,z) the position vector of the particle. -
pos
public void pos(int[] pid, double[] x, double[] y, double[] z, double[] r) Returns the ID, position vector, and radius of the particle currently being considered by the loop. \param[out] pid the particle ID. \param[out] (x,y,z) the position vector of the particle. \param[out] r the radius of the particle. If no radius information is available the default radius value is returned. -
x
public double x()Returns the x position of the particle currently being considered by the loop. -
y
public double y()Returns the y position of the particle currently being considered by the loop. -
z
public double z()Returns the z position of the particle currently being considered by the loop. -
pid
public int pid()Returns the ID of the particle currently being considered by the loop.
-