Package ffx.potential.nonbonded
Class SpatialDensityLoop
java.lang.Object
edu.rit.pj.ParallelConstruct
edu.rit.pj.ParallelForLoop
edu.rit.pj.IntegerForLoop
ffx.potential.nonbonded.SpatialDensityLoop
Loop over a list of atoms and assign their density to a grid.
- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Constructor Summary
ConstructorsConstructorDescriptionSpatialDensityLoop
(SpatialDensityRegion region, int nSymm, int[] atomsPerChunk) Constructor for SpatialDensityLoop. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
gridDensity
(int iSymm, int iAtom) gridDensityvoid
run
(int lb, int ub) Execute one chunk of iterations of this parallel for loop.schedule()
Determine this parallel for loop's schedule.void
setNsymm
(int nSymm) setNsymmsetOctant
(int octant) Setter for the fieldoctant
.void
setRegion
(SpatialDensityRegion spatialDensityRegion) setRegion.Methods inherited from class edu.rit.pj.IntegerForLoop
finish, ordered, start, stopLoop
Methods inherited from class edu.rit.pj.ParallelConstruct
getThreadCount, getThreadIndex, isExecutingInParallel, region, team
-
Constructor Details
-
SpatialDensityLoop
Constructor for SpatialDensityLoop.- Parameters:
region
- aSpatialDensityRegion
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. Therun()
method must perform the loop body for indexesfirst
throughlast
inclusive, increasing the loop index by +1 after each iteration.The
run()
method must be overridden in a subclass.- Specified by:
run
in classIntegerForLoop
- Parameters:
lb
- First loop index.ub
- Last loop index.
-
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 (seeIntegerSchedule.runtime()
).- Overrides:
schedule
in classIntegerForLoop
- Returns:
- Schedule for this parallel for loop.
-
setNsymm
public void setNsymm(int nSymm) setNsymm- Parameters:
nSymm
- a int.
-
setOctant
Setter for the fieldoctant
.- Parameters:
octant
- a int.- Returns:
- a
SpatialDensityLoop
object.
-
setRegion
setRegion.- Parameters:
spatialDensityRegion
- aSpatialDensityRegion
object.
-