public class DSArrayStencil extends DSPartitionedStencil
| Modifier and Type | Field and Description | 
|---|---|
protected DataBlock | 
block  | 
protected int | 
dataBytesUsed  | 
protected boolean[] | 
inStencil  | 
protected int | 
lastActiveOffset  | 
protected int | 
lastIndexRequested  | 
protected int | 
size  | 
headerLength, partitioning, partitioningDimensionsArray, partitionListBytesLengthdimensionality, space| Constructor and Description | 
|---|
DSArrayStencil(RegularISPartitioning partitioning)
Construct a stencil that identifies areas of interest using a partitioning. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
clear()
Clear this stencil of all elements. 
 | 
boolean | 
get(IndexSpaceID id)
Return true if the given id maps to an active stencil element, false otherwise. 
 | 
byte[] | 
getData(byte[] data,
       ChomboDataSource cds)
Fill the given byte array with the data contained in the ChomboDataSource
  given to the method. 
 | 
byte[] | 
getData(byte[] data,
       DataSource ds)
Fill the given byte array with the data contained in the active elements
  of this stencil. 
 | 
int | 
getDataBytesUsed()
Return the number of bytes actually used in the last call to getData(). 
 | 
ISBounds | 
getIndexedBounds(ISBounds stencilBounds,
                int index)
Sets the argument ISBounds to the bounds of the specified stencil element. 
 | 
protected long | 
getIndexedOffset(int index)
Return the partition offset corresponding to the given index. 
 | 
static void | 
main(java.lang.String[] argv)  | 
boolean | 
set(IndexSpaceID id)
Set the stencil element containing the id to "active". 
 | 
boolean | 
setElement(IndexSpaceID pid)
Set the stencil element with index corresponding to id to "active. 
 | 
protected void | 
setElementFromOffset(int offset)
Set the element corresponding to the 1D offset to be active. 
 | 
int | 
size()
return number of active elements contained by this stencil 
 | 
java.lang.String | 
toString()
Return a String representing the object. 
 | 
java.lang.String | 
toString(java.lang.String indent)  | 
chooseBytesPerValue, getPartitionDimensions, getPartitionDimensionsArray, getPartitioningDimensions, getPartitionListBytes, getPartitionListBytesLength, inPartitioningBounds, inPartitioningBounds, partitionVolume, setPartitionListFromBytes, volumedim, getIndexedBounds, getSpaceBoundsprotected boolean[] inStencil
protected int size
protected int lastIndexRequested
protected int lastActiveOffset
protected int dataBytesUsed
protected DataBlock block
public DSArrayStencil(RegularISPartitioning partitioning)
public byte[] getData(byte[] data,
             ChomboDataSource cds)
data - The byte buffer to fillcds - ChomboDataSource object referencepublic byte[] getData(byte[] data,
             DataSource ds)
public int getDataBytesUsed()
public boolean set(IndexSpaceID id)
public boolean setElement(IndexSpaceID pid)
setElement in class DSStencilpublic boolean get(IndexSpaceID id)
public ISBounds getIndexedBounds(ISBounds stencilBounds, int index)
getIndexedBounds in class DSStencilprotected final long getIndexedOffset(int index)
getIndexedOffset in class DSPartitionedStencilprotected void setElementFromOffset(int offset)
setElementFromOffset in class DSPartitionedStencilpublic int size()
public void clear()
clear in class DSPartitionedStencilpublic java.lang.String toString()
toString in class DSPartitionedStencilpublic java.lang.String toString(java.lang.String indent)
toString in class DSPartitionedStencilpublic static void main(java.lang.String[] argv)