|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Solution
Solution -- Is an abstract class containing all the solutions and solvers.
FluidSolution
,
ParticleSolution
Field Summary | |
protected double[] |
df
Derivative time level n @see #f |
protected double[] |
dfm
Derivative time level n-1 @see #fm |
protected double[] |
dfp
Derivative time level n+1 @see #fp |
protected double[] |
dg
Extra Derivative time level n @see #g |
protected double[] |
dgm
Extra Derivative time level n-1 @see #gm |
protected double[] |
dgp
Extra Derivative time level n+1 @see #gp |
protected double[] |
dx
The mesh intervals @see #mesh |
protected double[] |
f
Function time level n |
protected double[] |
f0
Function time level 0 (IC) @see #f |
protected double[] |
fm
Function time level n-1 |
protected double[] |
fp
Function time level n+1 |
protected double[] |
g
Extra Function time level n |
protected double[] |
gm
Extra Function time level n-1 |
protected double[] |
gp
Extra Function time level n+1 |
protected java.lang.String |
ic
Initial condition name @see #setIC |
protected double[] |
initialMoments
Store initial moments |
private int |
lastStep
The current step in the time discretization |
protected Mesh |
mesh
The underlying mesh for the solution |
protected java.lang.String |
method
Numerical method name @see #setMethod |
protected java.lang.String |
scheme
Numerical scheme name @see #setScheme |
protected double |
time
Absolute time @see #setTime |
protected java.lang.String |
topic
The topic to be solved @see #setTopic |
protected double[] |
x
The mesh points @see #mesh |
protected double |
x_0
x of lower left corner of plot area |
protected double |
x_1
x of upper right corner of plot area |
protected int |
xOffset
Horizontal offset of plot area |
protected int |
xSize
Horizontal scale of plot area |
protected double |
y_0
y of lower left corner of plot area |
protected double |
y_1
y of upper right corner of plot area |
protected int |
yOffset
Vertical offset of plot area |
protected int |
ySize
Vertical scale of plot area |
Constructor Summary | |
Solution(RunData runData)
Creates an instance of a Solution object with all the attributes. |
Method Summary | |
protected double |
calculateMoments(int m)
Internal function to calculate the initial moments of f[] or their deviation from the beginning of the evolution. |
abstract void |
discretize(ShapeFunction function)
Discretize the initial shape and initialize the moments |
double |
getTime()
Get the current physical time |
double |
getValue(double arg)
Linear interpolation of the solution. |
double |
getValue(int index)
Gives the value of the function for an index |
int[] |
getWinSize()
Returns window size |
abstract boolean |
hasOption(java.lang.String option)
Tells whether the solution implements a option |
boolean |
incTime(double time)
Increment the current physical time |
protected double[] |
limits(boolean headers)
Calculates the solution boundaries. |
double[] |
measure(int x,
int y)
Get physical coordinates from mouse coordinates |
double |
momentsDeviation(int m)
Calculates the deviation from the m:th initial moment. |
abstract boolean |
next(RunData runData)
Advance the solution forward one step in time. |
void |
output(int step)
Print the solution in ASCII to java console |
void |
plot(java.awt.Canvas plotArea,
java.awt.Image offScrImage,
boolean headers)
Plots the solution |
abstract boolean |
previous(RunData runData)
Take the solution backward one step to initialize schemes with 3 time levels. |
void |
rescale(boolean headers)
Set the corners of the plot area |
void |
setIC(java.lang.String ic)
Set the initial condision as a string. |
void |
setMethod(java.lang.String method)
Set the numerical method as a string. |
void |
setScheme(java.lang.String scheme)
Set the numerical scheme as a string. |
boolean |
setTime(double time)
Set the current physical time |
void |
setTopic(java.lang.String topic)
Set the topic as a string. |
void |
updateHeaders(RunData runData,
int step)
Updates the information for the headers |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String topic
protected java.lang.String method
protected java.lang.String scheme
protected java.lang.String ic
protected double time
protected double[] f0
protected double[] fm
protected double[] f
protected double[] fp
protected double[] dfm
protected double[] df
protected double[] dfp
protected double[] gm
protected double[] g
protected double[] gp
protected double[] dgm
protected double[] dg
protected double[] dgp
protected Mesh mesh
protected double[] x
protected double[] dx
protected double[] initialMoments
protected int xSize
protected int ySize
protected int xOffset
protected int yOffset
protected double x_0
protected double x_1
protected double y_0
protected double y_1
private int lastStep
Constructor Detail |
public Solution(RunData runData)
runData
- The run time parametersMethod Detail |
protected double calculateMoments(int m)
m
- The order of the moment
momentsDeviation(int)
public double momentsDeviation(int m)
m
- The order of the moment
protected double[] limits(boolean headers)
public void setTopic(java.lang.String topic)
topic
- The name of the equationvmarket.RNDWALK
public void setMethod(java.lang.String method)
method
- The name of the numerical method
public void setScheme(java.lang.String scheme)
scheme
- The name of the numerical scheme
public void setIC(java.lang.String ic)
ic
- The name of the initial condition
public boolean setTime(double time)
time
- Current time
public boolean incTime(double time)
time
- Current time to add
public double getTime()
public abstract void discretize(ShapeFunction function)
function
- The initial shape to be approximatedpublic void updateHeaders(RunData runData, int step)
runData
- List of run parametersstep
- The current step in the simulationplot(java.awt.Canvas, java.awt.Image, boolean)
public abstract boolean next(RunData runData)
runData
- List of run parameters
RunData
public abstract boolean previous(RunData runData)
runData
- List of run parameters
RunData
public double getValue(int index)
index
- The index for which to get the value
public double getValue(double arg)
arg
- Argument
public abstract boolean hasOption(java.lang.String option)
option
- The the option to implement
vmarket.topicNames
,
vmarket.schemeNames
public void rescale(boolean headers)
public int[] getWinSize()
plot(java.awt.Canvas, java.awt.Image, boolean)
public double[] measure(int x, int y)
x
- horizontal mouse coordinatey
- vertical mouse coordinateplot(java.awt.Canvas, java.awt.Image, boolean)
public void output(int step)
public void plot(java.awt.Canvas plotArea, java.awt.Image offScrImage, boolean headers)
plotArea
- The plot areaoffScrImage
- The off screen image to draw onheaders
- Whether to draw headers
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |