Class SpatialDensityLoop


public abstract class SpatialDensityLoop extends IntegerForLoop
Loop over a list of atoms and assign their density to a grid.
Since:
1.0
Author:
Michael J. Schnieders
  • Constructor Details

    • SpatialDensityLoop

      public SpatialDensityLoop(SpatialDensityRegion region, int nSymm, int[] atomsPerChunk)
      Constructor for SpatialDensityLoop.
      Parameters:
      region - a SpatialDensityRegion object.
      nSymm - a int.
      atomsPerChunk - an array of int.
  • Method Details

    • gridDensity

      public abstract void gridDensity(int iSymm, int iAtom)
      gridDensity
      Parameters:
      iSymm - a int.
      iAtom - a int.
    • run

      public void run(int lb, int ub)
      Execute one chunk of iterations of this parallel for loop. The run() method must perform the loop body for indexes first through last inclusive, increasing the loop index by +1 after each iteration.

      The run() method must be overridden in a subclass.

      Specified by:
      run in class IntegerForLoop
      Parameters:
      lb - First loop index.
      ub - Last loop index.
    • schedule

      public IntegerSchedule schedule()
      Determine this parallel for loop's schedule. The schedule determines how the loop iterations are apportioned among the parallel team threads. For further information, see class IntegerSchedule.

      The schedule() method may be overridden in a subclass to return the desired schedule. If not overridden, the default is a runtime schedule (see IntegerSchedule.runtime()).

      Overrides:
      schedule in class IntegerForLoop
      Returns:
      Schedule for this parallel for loop.
    • setNsymm

      public void setNsymm(int nSymm)
      setNsymm
      Parameters:
      nSymm - a int.
    • setOctant

      public SpatialDensityLoop setOctant(int octant)
      Setter for the field octant.
      Parameters:
      octant - a int.
      Returns:
      a SpatialDensityLoop object.
    • setRegion

      public void setRegion(SpatialDensityRegion spatialDensityRegion)
      setRegion.
      Parameters:
      spatialDensityRegion - a SpatialDensityRegion object.