|
||||||||||
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 Complex[] |
dh
Derivative time level n @see #h |
protected Complex[] |
dhm
Derivative time level n-1 @see #hm |
protected Complex[] |
dhp
Derivative time level n+1 @see #hp |
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 Complex[] |
h
Complex Function time level n |
protected Complex[] |
hm
Complex Function time level n-1 |
protected Complex[] |
hp
Complex 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 |
private double |
lastTimeStep
The last time step used |
protected Mesh |
mesh
The underlaying mesh of the solution |
protected java.lang.String |
method
Numerical method name @see #setMethod |
protected java.lang.String |
pde
The PDE to be solved @see #setPde |
protected Complex[] |
s
Complex/spectrum time level n |
protected java.lang.String |
scheme
Numerical scheme name @see #setScheme |
protected Complex[] |
sm
Complex/spectrum time level n-1 |
protected Complex[] |
sp
Complex/spectrum time level n+1 |
protected double |
time
Absolute time @see #setTime |
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()
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,
PhysData physData)
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,
PhysData physData)
Take the solution backward one step to initialize schemes with 3 time levels. |
void |
rescale()
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 |
setPde(java.lang.String pde)
Set the PDE 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 |
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 pde
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 Complex[] hm
protected Complex[] h
protected Complex[] hp
protected Complex[] dhm
protected Complex[] dh
protected Complex[] dhp
protected Complex[] sm
protected Complex[] s
protected Complex[] sp
protected Mesh mesh
protected double[] x
protected double[] dx
protected double[] initialMoments
protected int xSize
protected int ySize
protected int xOffset
protected int yOffset
private int lastStep
private double lastTimeStep
protected double x_0
protected double x_1
protected double y_0
protected double y_1
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()
public void setPde(java.lang.String pde)
pde
- The name of the equationjbone.ADVECTION
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 increment
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, PhysData physData)
runData
- List of run parametersphysData
- Physical parameters (e.g. potential)
RunData
,
PhysData
public abstract boolean previous(RunData runData, PhysData physData)
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
jbone.pdeNames
,
jbone.schemeNames
public void rescale()
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 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 headerspublic void output(int step)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |