Class Voro.c_loop_subset

java.lang.Object
gov.nih.mipav.model.structures.Voro.c_loop_base
gov.nih.mipav.model.structures.Voro.c_loop_subset
Enclosing class:
Voro

class Voro.c_loop_subset extends Voro.c_loop_base
\brief Class for looping over a subset of particles in a container. This class can loop over a subset of particles in a certain geometrical region within the container. The class can be set up to loop over a rectangular box or sphere. It can also rectangular group of internal computational blocks.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
     
    private int
     
    private int
     
    private double
     
    private double
     
    private double
     
    private double
     
    private double
     
    private double
     
    private int
     
    private int
     
    private int
     
    private int
     
    private int
     
    private int
     
    private int
     
    private int
     
    private int
     
    private int
     
    private int
     
    The current mode of operation, determining whether tests should be applied to particles to ensure they are within a certain geometrical object.
    private double
     
    private double
     
    private double
     
    private double
     
    private double
     
    private double
     
    private double
     
    private double
     
    private double
     
    private double
     
    private double
     
    private double
     
    private boolean
     
    private double
     
    private boolean
     
    private double
     
    private boolean
     
    private double
     

    Fields inherited from class gov.nih.mipav.model.structures.Voro.c_loop_base

    co, i, id, ijk, j, k, nx, nxy, nxyz, ny, nz, p, ps, q
  • Constructor Summary

    Constructors
    Constructor
    Description
    The constructor copies several necessary constants from the base container class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    inc()
    Finds the next particle to test.
    private boolean
    Returns the next block to be tested in a loop, and updates the periodicity vector if necessary.
    private boolean
    Computes whether the current point is out of bounds, relative to the current loop setup.
    (package private) void
    setup_box(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, boolean bounds_test)
    Initializes the class to loop over all particles in a rectangular box.
    private void
    Sets up all of the common constants used for the loop.
    void
    setup_intbox(int ai_, int bi_, int aj_, int bj_, int ak_, int bk_)
    Initializes the class to loop over all particles in a rectangular subgrid of blocks.
    void
    setup_sphere(double vx, double vy, double vz, double r, boolean bounds_test)
    Initializes a c_loop_subset object to scan over all particles within a given sphere.
    boolean
    Starts the loop by finding the first particle within the container to consider.
    private int
    step_div(int a, int b)
     
    private int
    step_int(double a)
     
    private int
    step_mod(int a, int b)
     

    Methods inherited from class gov.nih.mipav.model.structures.Voro.c_loop_base

    pid, pos, pos, x, y, z

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • mode

      The current mode of operation, determining whether tests should be applied to particles to ensure they are within a certain geometrical object.
    • ax

      private double ax
    • ay

      private double ay
    • az

      private double az
    • sx

      private double sx
    • sy

      private double sy
    • sz

      private double sz
    • xsp

      private double xsp
    • ysp

      private double ysp
    • zsp

      private double zsp
    • xperiodic

      private boolean xperiodic
    • yperiodic

      private boolean yperiodic
    • zperiodic

      private boolean zperiodic
    • px

      private double px
    • py

      private double py
    • pz

      private double pz
    • apx

      private double apx
    • apy

      private double apy
    • apz

      private double apz
    • v0

      private double v0
    • v1

      private double v1
    • v2

      private double v2
    • v3

      private double v3
    • v4

      private double v4
    • v5

      private double v5
    • ai

      private int ai
    • bi

      private int bi
    • aj

      private int aj
    • bj

      private int bj
    • ak

      private int ak
    • bk

      private int bk
    • ci

      private int ci
    • cj

      private int cj
    • ck

      private int ck
    • di

      private int di
    • dj

      private int dj
    • dk

      private int dk
    • inc1

      private int inc1
    • inc2

      private int inc2
  • Constructor Details

    • c_loop_subset

      public c_loop_subset(Voro.container_radius_mono con)
      The constructor copies several necessary constants from the base container class. \param[in] con the container class to use.
  • Method Details

    • setup_sphere

      public void setup_sphere(double vx, double vy, double vz, double r, boolean bounds_test)
      Initializes a c_loop_subset object to scan over all particles within a given sphere. \param[in] (vx,vy,vz) the position vector of the center of the sphere. \param[in] r the radius of the sphere. \param[in] bounds_test whether to do detailed bounds checking. If this is false then the class will loop over all particles in blocks that overlap the given sphere. If it is true, the particle will only loop over the particles which actually lie within the sphere. \return True if there is any valid point to loop over, false otherwise.
    • setup_box

      void setup_box(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, boolean bounds_test)
      Initializes the class to loop over all particles in a rectangular box. \param[in] (xmin,xmax) the minimum and maximum x coordinates of the box. \param[in] (ymin,ymax) the minimum and maximum y coordinates of the box. \param[in] (zmin,zmax) the minimum and maximum z coordinates of the box. \param[in] bounds_test whether to do detailed bounds checking. If this is false then the class will loop over all particles in blocks that overlap the given box. If it is true, the particle will only loop over the particles which actually lie within the box. \return True if there is any valid point to loop over, false otherwise.
    • setup_intbox

      public void setup_intbox(int ai_, int bi_, int aj_, int bj_, int ak_, int bk_)
      Initializes the class to loop over all particles in a rectangular subgrid of blocks. \param[in] (ai_,bi_) the subgrid range in the x-direction, inclusive of both ends. \param[in] (aj_,bj_) the subgrid range in the y-direction, inclusive of both ends. \param[in] (ak_,bk_) the subgrid range in the z-direction, inclusive of both ends. \return True if there is any valid point to loop over, false otherwise.
    • start

      public boolean start()
      Starts the loop by finding the first particle within the container to consider. \return True if there is any particle to consider, false otherwise.
    • inc

      public boolean inc()
      Finds the next particle to test. \return True if there is another particle, false if no more particles are available.
    • step_mod

      private int step_mod(int a, int b)
    • step_div

      private int step_div(int a, int b)
    • step_int

      private int step_int(double a)
    • setup_common

      private void setup_common()
      Sets up all of the common constants used for the loop. \return True if there is any valid point to loop over, false otherwise.
    • next_block

      private boolean next_block()
      Returns the next block to be tested in a loop, and updates the periodicity vector if necessary.
    • out_of_bounds

      private boolean out_of_bounds()
      Computes whether the current point is out of bounds, relative to the current loop setup. \return True if the point is out of bounds, false otherwise.