gridripper::io::BDataReader Class Reference

Binary data file reader. More...

List of all members.

Public Member Functions

 BDataReader (File f) throws IOException
 Constructs a reader for the specified file.
 BDataReader (InputStream in)
 Constructs a reader for the specified input stream.
boolean read () throws IOException
 Reads a time slice.
double getTime ()
 Gets the value of the time coordinate on the current slice.
String getTimeLabel ()
 Gets the name of the time coordinate.
String getXcoordLabel ()
 Gets the name of the space coordinate.
int getMaxI ()
 Gets the maximum grid point index on the base grid.
int getXMultiplier ()
 Gets the scale factor between the finest grid spacing and the base grid spacing.
double getXMin ()
 Gets the x coordinate of the leftmost grid point.
double getDeltaX ()
 Gets the grid spacing on the finest subgrid.
int getNumGridPoints ()
 Gets the total number of grid points on the current time slice.
int getNumComponents ()
 Gets the number of field components (stored for each grid point).
String getComponentName (int i)
 Gets the name of a field component.
IntVector getKxArray ()
 Gets the array of grid point positions.
FloatVector getFloatData ()
 Gets the data on the current time slice as a float array.
DoubleVector getDoubleData ()
 Gets the data on the current time slice as a double array.
void getData (float[] data, int pos)
 Copies the data into a float array.
void getData (double[] data, int pos)
 Copies the data into a float array.
int[][] getTimeStepCounts ()
 Gets time step count info for the grid tree.
int[][] getLastRegridTimes ()
 Gets last regridding time info for the grid tree.
double[] getEnergyLosses ()
 Gets the array of energy losses.

Static Public Member Functions

static void main (String[] args) throws Exception


Detailed Description

Binary data file reader.

Version:
0.5, 06/11/2009
Since:
GridRipper 0.3, 04/23/2005
Author:
Peter Csizmadia

Constructor & Destructor Documentation

gridripper::io::BDataReader::BDataReader ( File  f  )  throws IOException [inline]

Constructs a reader for the specified file.

Parameters:
f the file

gridripper::io::BDataReader::BDataReader ( InputStream  in  )  [inline]

Constructs a reader for the specified input stream.

Parameters:
in the input stream


Member Function Documentation

boolean gridripper::io::BDataReader::read (  )  throws IOException [inline]

Reads a time slice.

Returns:
true after successful reading, false at end of file

double gridripper::io::BDataReader::getTime (  )  [inline]

Gets the value of the time coordinate on the current slice.

Returns:
the time

String gridripper::io::BDataReader::getTimeLabel (  )  [inline]

Gets the name of the time coordinate.

Returns:
the coordinate name

String gridripper::io::BDataReader::getXcoordLabel (  )  [inline]

Gets the name of the space coordinate.

Returns:
the coordinate name

int gridripper::io::BDataReader::getMaxI (  )  [inline]

Gets the maximum grid point index on the base grid.

Returns:
the maximum grid point index

int gridripper::io::BDataReader::getXMultiplier (  )  [inline]

Gets the scale factor between the finest grid spacing and the base grid spacing.

This value is 1 for regular grids.

Returns:
(refinement ratio)^(number of refinement levels)

double gridripper::io::BDataReader::getXMin (  )  [inline]

Gets the x coordinate of the leftmost grid point.

Returns:
the minimum x coordinate

double gridripper::io::BDataReader::getDeltaX (  )  [inline]

Gets the grid spacing on the finest subgrid.

Returns:
the smallest grid spacing

int gridripper::io::BDataReader::getNumGridPoints (  )  [inline]

Gets the total number of grid points on the current time slice.

Returns:
the number of grid points

int gridripper::io::BDataReader::getNumComponents (  )  [inline]

Gets the number of field components (stored for each grid point).

Returns:
the number of field components

String gridripper::io::BDataReader::getComponentName ( int  i  )  [inline]

Gets the name of a field component.

Parameters:
i component index
Returns:
the component name

IntVector gridripper::io::BDataReader::getKxArray (  )  [inline]

Gets the array of grid point positions.

In case of a regular grid, [0, 1, 2, ..., numGridPoints-1] is returned. In case of mesh refinement, the base grid positions (which are always present in the array) are represented by the numbers 0, xmultiplier, 2*xmultiplier, .., (numGridPoints-1)*xmultiplier. Intermediate values represent refined grid points.

Returns:
array of positions

FloatVector gridripper::io::BDataReader::getFloatData (  )  [inline]

Gets the data on the current time slice as a float array.

The returned array has numGridPoints*numComponents elements if the data is stored in floats. Otherwise, the returned object is null.

Returns:
the data array or null

DoubleVector gridripper::io::BDataReader::getDoubleData (  )  [inline]

Gets the data on the current time slice as a double array.

The returned array has numGridPoints*numComponents elements if the data is stored in doubles. Otherwise, the returned object is null.

Returns:
the data array or null

void gridripper::io::BDataReader::getData ( float[]  data,
int  pos 
) [inline]

Copies the data into a float array.

Parameters:
data the output array
pos starting position in the output array

void gridripper::io::BDataReader::getData ( double[]  data,
int  pos 
) [inline]

Copies the data into a float array.

Parameters:
data the output array
pos starting position in the output array

int [][] gridripper::io::BDataReader::getTimeStepCounts (  )  [inline]

Gets time step count info for the grid tree.

Returns:
array of time step counts

int [][] gridripper::io::BDataReader::getLastRegridTimes (  )  [inline]

Gets last regridding time info for the grid tree.

Returns:
array of last regridding times

double [] gridripper::io::BDataReader::getEnergyLosses (  )  [inline]

Gets the array of energy losses.

Returns:
array of energy losses


The documentation for this class was generated from the following file:

Generated on Wed Jun 17 18:47:29 2009 for GridRipper by  doxygen 1.5.6