Class Voro.voro_base_wall_list

java.lang.Object
gov.nih.mipav.model.structures.Voro.voro_base_wall_list
Direct Known Subclasses:
Voro.container_base
Enclosing class:
Voro

class Voro.voro_base_wall_list extends Object
\brief A class for storing a list of pointers to walls. This class stores a list of pointers to wall classes. It contains several simple routines that make use of the wall classes (such as telling whether a given position is inside all of the walls or not). It can be used by itself, but also forms part of container_base, for associating walls with this class.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double
    The size of a computational block in the x direction.
    double
    The size of a computational block in the y direction.
    double
    The size of a computational block in the z direction.
    protected int
    The current amount of memory allocated for walls.
    double[]
    An array to hold the minimum distances associated with the worklists.
    int
    The number of blocks in the x direction.
    int
    A finalant, set to the value of nx multiplied by ny, which is used in the routines that step through blocks in sequence.
    int
    A finalant, set to the value of nx*ny*nz, which is used in the routines that step through blocks in sequence.
    int
    The number of blocks in the y direction.
    int
    The number of blocks in the z direction.
    An array holding pointers to wall objects.
    protected int
    A pointer to the limit of the walls array, used to determine when array is full.
    (package private) int
    A pointer to the next free position to add a wall pointer.
    double
    The inverse box length in the x direction.
    double
    The inverse box length in the y direction.
    double
    The inverse box length in the z direction.
  • Constructor Summary

    Constructors
    Constructor
    Description
    The wall_list constructor sets up an array of pointers to wall classes.
    voro_base_wall_list(int nx_, int ny_, int nz_, double boxx_, double boxy_, double boxz_)
    This function is called during container finalruction.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds all of the walls on another wall_list to this class.
    void
    Adds a wall to the list.
    boolean
    apply_walls(Voro.voronoicell_neighbor c, double x, double y, double z)
     
    boolean
    apply_walls(Voro.voronoicell c, double x, double y, double z)
    Cuts a Voronoi cell by all of the walls currently on the list.
    (package private) void
    compute_minimum(double[] minr, double xlo, double xhi, double ylo, double yhi, double zlo, double zhi, int ti, int tj, int tk)
    Computes the minimum distance from a subregion to a given block.
    (package private) boolean
    contains_neighbor(byte[] format)
    Checks to see whether "%n" appears in a format sequence to determine whether neighbor information is required or not.
    (package private) boolean
    contains_neighbor(char[] format)
     
    void
    Deallocates all of the wall classes pointed to by the wall_list.
    void
    The wall_list destructor frees the array of pointers to the wall classes.
    protected void
    Increases the memory allocation for the walls array.
    boolean
    point_inside_walls(double x, double y, double z)
    Determines whether a given position is inside all of the walls on the list.
    protected int
    step_div(int a, int b)
    A custom Double division function that returns consistent stepping for negative numbers.
    protected int
    step_int(double a)
    A custom int function that returns consistent stepping for negative numbers, so that (-1.5, -0.5, 0.5, 1.5) maps to (-2,-1,0,1).
    protected int
    step_mod(int a, int b)
    A custom modulo function that returns consistent stepping for negative numbers.

    Methods inherited from class java.lang.Object

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

    • nx

      public int nx
      The number of blocks in the x direction.
    • ny

      public int ny
      The number of blocks in the y direction.
    • nz

      public int nz
      The number of blocks in the z direction.
    • nxy

      public int nxy
      A finalant, set to the value of nx multiplied by ny, which is used in the routines that step through blocks in sequence.
    • nxyz

      public int nxyz
      A finalant, set to the value of nx*ny*nz, which is used in the routines that step through blocks in sequence.
    • boxx

      public double boxx
      The size of a computational block in the x direction.
    • boxy

      public double boxy
      The size of a computational block in the y direction.
    • boxz

      public double boxz
      The size of a computational block in the z direction.
    • xsp

      public double xsp
      The inverse box length in the x direction.
    • ysp

      public double ysp
      The inverse box length in the y direction.
    • zsp

      public double zsp
      The inverse box length in the z direction.
    • mrad

      public double[] mrad
      An array to hold the minimum distances associated with the worklists. This array is initialized during container finalruction, by the initialize_radii() routine.
    • walls

      public Voro.wall[] walls
      An array holding pointers to wall objects.
    • wep_index

      int wep_index
      A pointer to the next free position to add a wall pointer.
    • wel_index

      protected int wel_index
      A pointer to the limit of the walls array, used to determine when array is full.
    • current_wall_size

      protected int current_wall_size
      The current amount of memory allocated for walls.
  • Constructor Details

    • voro_base_wall_list

      public voro_base_wall_list(int nx_, int ny_, int nz_, double boxx_, double boxy_, double boxz_)
      This function is called during container finalruction. The routine scans all of the worklists in the wl[] array. For a given worklist of blocks labeled \f$w_1\f$ to \f$w_n\f$, it computes a sequence \f$r_0\f$ to \f$r_n\f$ so that $r_i$ is the minimum distance to all the blocks \f$w_{j}\f$ where \f$j>i\f$ and all blocks outside the worklist. The values of \f$r_n\f$ is calculated first, as the minimum distance to any block in the shell surrounding the worklist. The \f$r_i\f$ are then computed in reverse order by considering the distance to \f$w_{i+1}\f$.
    • voro_base_wall_list

      public voro_base_wall_list()
      The wall_list constructor sets up an array of pointers to wall classes.
  • Method Details

    • step_int

      protected int step_int(double a)
      A custom int function that returns consistent stepping for negative numbers, so that (-1.5, -0.5, 0.5, 1.5) maps to (-2,-1,0,1). \param[in] a the number to consider. \return The value of the custom int operation.
    • step_mod

      protected int step_mod(int a, int b)
      A custom modulo function that returns consistent stepping for negative numbers. For example, (-2,-1,0,1,2) step_mod 2 is (0,1,0,1,0). \param[in] (a,b) the input Doubles. \return The value of a modulo b, consistent for negative numbers.
    • step_div

      protected int step_div(int a, int b)
      A custom Double division function that returns consistent stepping for negative numbers. For example, (-2,-1,0,1,2) step_div 2 is (-1,-1,0,0,1). \param[in] (a,b) the input Doubles. \return The value of a div b, consistent for negative numbers.
    • compute_minimum

      void compute_minimum(double[] minr, double xlo, double xhi, double ylo, double yhi, double zlo, double zhi, int ti, int tj, int tk)
      Computes the minimum distance from a subregion to a given block. If this distance is smaller than the value of minr, then it passes \param[in,out] minr a pointer to the current minimum distance. If the distance computed in this function is smaller, then this distance is set to the new one. \param[out] (xlo,ylo,zlo) the lower coordinates of the subregion being considered. \param[out] (xhi,yhi,zhi) the upper coordinates of the subregion being considered. \param[in] (ti,tj,tk) the coordinates of the block.
    • contains_neighbor

      boolean contains_neighbor(byte[] format)
      Checks to see whether "%n" appears in a format sequence to determine whether neighbor information is required or not. \param[in] format the format string to check. \return True if a "%n" is found, false otherwise.
    • contains_neighbor

      boolean contains_neighbor(char[] format)
    • delete

      public void delete()
      The wall_list destructor frees the array of pointers to the wall classes.
    • add_wall

      public void add_wall(Voro.wall w)
      Adds a wall to the list. \param[in] w the wall to add.
    • add_wall

      public void add_wall(Voro.voro_base_wall_list wl)
      Adds all of the walls on another wall_list to this class. \param[in] wl a reference to the wall class.
    • point_inside_walls

      public boolean point_inside_walls(double x, double y, double z)
      Determines whether a given position is inside all of the walls on the list. \param[in] (x,y,z) the position to test. \return True if it is inside, false if it is outside.
    • apply_walls

      public boolean apply_walls(Voro.voronoicell c, double x, double y, double z)
      Cuts a Voronoi cell by all of the walls currently on the list. \param[in] c a reference to the Voronoi cell class. \param[in] (x,y,z) the position of the cell. \return True if the cell still exists, false if the cell is deleted.
    • apply_walls

      public boolean apply_walls(Voro.voronoicell_neighbor c, double x, double y, double z)
    • deallocate

      public void deallocate()
      Deallocates all of the wall classes pointed to by the wall_list.
    • increase_wall_memory

      protected void increase_wall_memory()
      Increases the memory allocation for the walls array.