simulations.objects
Class DataInputObject

java.lang.Object
  extended bysimulations.objects.BaseObject
      extended bysimulations.objects.DataInputObject

public class DataInputObject
extends BaseObject


Field Summary
 int height
           
 double t
           
 double tstore
           
 double[][][] velocityField
           
 int width
           
 
Constructor Summary
DataInputObject(int width, int height)
          This is the object that both reads in the data array and then interpolates between values in the array to produce a field B(x,t) for the DLIC program.
 
Method Summary
 Vec3 Bfield(Vec3 x, Vec3 B)
          The method that returns the input velocity array evalutated at a position x on the screen.
 Vec3 Efield(Vec3 x, Vec3 E)
          The method that returns the E field.
 double[][][] GetArray(int width, int height)
          This method needs to be replaced with a method that reads in a data array of velocities, one data array for each frame in the simulation.
 java.lang.String toString()
           
 
Methods inherited from class simulations.objects.BaseObject
Bfield, Efield, Evolve, Pfield, Pfield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

t

public double t

width

public int width

height

public int height

tstore

public double tstore

velocityField

public double[][][] velocityField
Constructor Detail

DataInputObject

public DataInputObject(int width,
                       int height)
This is the object that both reads in the data array and then interpolates between values in the array to produce a field B(x,t) for the DLIC program.

Parameters:
width - The width of the array
height - The height of the array
Method Detail

Efield

public Vec3 Efield(Vec3 x,
                   Vec3 E)
The method that returns the E field. For the fluid flow purposes here, this is always zero.

Specified by:
Efield in class BaseObject
Parameters:
x - the position of the observer
E - the electric field at the observer's position
Returns:
E the electric field at the observer's position

Bfield

public Vec3 Bfield(Vec3 x,
                   Vec3 B)
The method that returns the input velocity array evalutated at a position x on the screen. This method checks the time and if the time is different from the last time it inputs a new velocity array for the new time by invoking GetArray.

Specified by:
Bfield in class BaseObject
Parameters:
B - the magnetic field at the observer's position
Returns:
B the magnetic field at the observer's position

GetArray

public double[][][] GetArray(int width,
                             int height)
This method needs to be replaced with a method that reads in a data array of velocities, one data array for each frame in the simulation. To test the interface we make up the array values with a for loop.


toString

public java.lang.String toString()