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 voidgridDensity(int iSymm, int iAtom) gridDensityvoidrun(int lb, int ub) Execute one chunk of iterations of this parallel for loop.schedule()Determine this parallel for loop's schedule.voidsetNsymm(int nSymm) setNsymmsetOctant(int octant) Setter for the fieldoctant.voidsetRegion(SpatialDensityRegion spatialDensityRegion) setRegion.Methods inherited from class edu.rit.pj.IntegerForLoop
finish, ordered, start, stopLoopMethods inherited from class edu.rit.pj.ParallelConstruct
getThreadCount, getThreadIndex, isExecutingInParallel, region, team
-
Constructor Details
-
SpatialDensityLoop
Constructor for SpatialDensityLoop.- Parameters:
region- aSpatialDensityRegionobject.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 indexesfirstthroughlastinclusive, increasing the loop index by +1 after each iteration.The
run()method must be overridden in a subclass.- Specified by:
runin 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:
schedulein 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
SpatialDensityLoopobject.
-
setRegion
setRegion.- Parameters:
spatialDensityRegion- aSpatialDensityRegionobject.
-