simulations.objects
Class DataInputObject
java.lang.Object
simulations.objects.BaseObject
simulations.objects.DataInputObject
- public class DataInputObject
- extends BaseObject
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
t
public double t
width
public int width
height
public int height
tstore
public double tstore
velocityField
public double[][][] velocityField
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 arrayheight
- The height of the array
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 observerE
- 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()