|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectSolution
SamplingSolution
MCSSolution
Solves the equation with a Monte Carlo sampling of possible configurations
Solution| Field Summary | |
protected double[] |
currentState
A vector with the current state of each realisation |
protected int |
numberOfRealisations
The number of independent realisations to evolve |
protected java.util.Random |
random
Random number generator |
protected double |
realisationWeight
The weight or probability associated with each initial state |
protected boolean |
solutionUpToDate
Whether the expected solution is up to date |
| Fields inherited from class Solution |
df, dfm, dfp, dg, dgm, dgp, dh, dhm, dhp, dx, f, f0, fm, fp, g, gm, gp, h, hm, hp, ic, initialMoments, mesh, method, pde, s, scheme, sm, sp, time, x, x_0, x_1, xOffset, xSize, y_0, y_1, yOffset, ySize |
| Constructor Summary | |
MCSSolution(RunData runData)
Creates a MCSSolution object. |
|
| Method Summary | |
void |
discretize(ShapeFunction function)
Discretize the initial Shape function and initialize the moments Initializes a new set of particles, the number being determined by the numerical scheme parameter. |
protected void |
expectedRealisation()
Generates a probability distribution and an expectation from the set of sampled values. |
double |
getValue(double arg)
Linear interpolation of the solution. |
double |
getValue(int index)
Gives the value of the function for an index |
boolean |
hasOption(java.lang.String option)
Tells whether the solution implements a option |
double[] |
limits()
Calculates the limits of the solution. |
double |
momentsDeviation(int m)
Calculates the deviation from the m:th initial moment. |
boolean |
next(RunData runData,
PhysData physData)
Advance the solution forward one step in time. |
void |
plot(java.awt.Canvas plotArea,
java.awt.Image offScrImage,
boolean headers)
Plots the solution |
boolean |
previous(RunData runData,
PhysData physData)
Take the solution backward one step to initialize schemes with 3 time levels; not really appropriate in this context. |
| Methods inherited from class Solution |
calculateMoments, getTime, getWinSize, incTime, measure, output, rescale, setIC, setMethod, setPde, setScheme, setTime, updateHeaders |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int numberOfRealisations
protected double realisationWeight
protected double[] currentState
protected boolean solutionUpToDate
protected java.util.Random random
| Constructor Detail |
public MCSSolution(RunData runData)
runData - The run time parametersSolution.next(RunData, PhysData),
Solution.discretize(ShapeFunction)| Method Detail |
public boolean next(RunData runData,
PhysData physData)
next in class SolutionrunData - List of run parametersphysData - Physical parameters (e.g. potential)
RunDatapublic boolean hasOption(java.lang.String option)
hasOption in class Solutionoption - The the option to implement
jbone.pdeNames,
jbone.schemeNames
public void plot(java.awt.Canvas plotArea,
java.awt.Image offScrImage,
boolean headers)
plot in class SolutionplotArea - The plot areaoffScrImage - The off screen image to draw onheaders - Whether to draw headers
public boolean previous(RunData runData,
PhysData physData)
previous in class SolutionrunData - List of run parameters
RunDatapublic void discretize(ShapeFunction function)
discretize in class Solutionfunction - The initial shape to be approximatedSolution.setScheme(java.lang.String)public double momentsDeviation(int m)
momentsDeviation in class Solutionm - The order of the moment
public double[] limits()
limits in class Solutionpublic double getValue(int index)
getValue in class Solutionindex - The index for which to get the value
public double getValue(double arg)
getValue in class Solutionarg - Argument
protected void expectedRealisation()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||