|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object simulations.experiments.BaseExperiment
This is the abstract parent class that all actual experiments should extend. When creating an experiment subclass, you must provide an implementation for the five functions declared here: ConstructEMSource(), getEMSource(), Evolve(), getHue(), and getFlowSpeed() The content of those functions can be whatever you want (and you can have additional functions or sub-classes, such as the Motion class used for calling RungeKuttaIntegration), but they must all be defined in some way. FieldType and FieldMotionType should also be set on a case by case basis, as the renderer uses these values to decide which type of field to draw and what type of motion field to evolve that field. If you end up with no image, or just "static", it may means that the DLIC is trying to draw the electric field of a magnetostatic experiment, or vice versa, and these two variables are the first thing to check.
FallingRingExperiment.ConstructEMSource()
Field Summary | |
double |
eps
If the experiment uses a RungeKuttaIntegration scheme which calculates an internal fractional error estimate to evolve the Motion equations (not implemented at present in 1.0), then eps is the allowed fractional error for the step from t to t+dt for a requested time step dt. |
int |
FieldMotionType
type of motion field for this experiment, where zero is NOT a valid field motion type. |
int |
FieldType
type of field for this experiment, where zero is NOT a valid field type. |
double |
FluidFlowSpeed
the overall speed multiplier if we are showing fluid flow, in pixels per second |
double |
Fnorm
the normalization for the field if we are showing fluid flow |
double |
Fpower
the power dependence on the magnitude of the field is we are showing fluid flow |
int |
numberSmallSteps
The number of Runge Kutta steps taken to get from t to t + dt. |
Constructor Summary | |
BaseExperiment()
|
Method Summary | |
abstract void |
ConstructEMSource()
constructs the EM source consisting of a number of BaseObjects and adds them to the EMCollection for this experiment |
abstract void |
Evolve(double dt)
Evolves the properties of the collection of BaseObjects in the experiment with time |
abstract BaseObject |
getEMSource()
returns the collecton of BaseObjects constructed in ConstructEMSource() |
abstract double |
getFlowSpeed(Vec3 r,
Vec RegionFlow)
|
abstract double |
getHue(double TargetHue,
Vec3 r,
Vec RegionColor)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public int FieldType
public int FieldMotionType
public double Fnorm
public double FluidFlowSpeed
public double Fpower
public int numberSmallSteps
public double eps
Constructor Detail |
public BaseExperiment()
Method Detail |
public abstract void ConstructEMSource()
public abstract BaseObject getEMSource()
public abstract void Evolve(double dt)
public abstract double getHue(double TargetHue, Vec3 r, Vec RegionColor)
public abstract double getFlowSpeed(Vec3 r, Vec RegionFlow)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |