public class SolverRep extends java.lang.Object implements SolutionReadyListener
Constructor and Description |
---|
SolverRep(ODEWorkspace odews)
Constructor for creating an new Solver component.
|
Modifier and Type | Method and Description |
---|---|
void |
errorCondition(java.lang.Exception e)
Error handling for solution ready listeners, and send appropriate
messages to users.
|
void |
errorCondition(java.lang.String e)
Error handling for solution ready listeners, and send appropriate
messages to users.
|
ODE |
getCurrentODE()
Returns the active ODE.
|
SolverParameters |
getParameters()
Returns the current solver parameters.
|
void |
reload()
Reload the ODEWorkspace, so reset some values
|
void |
resetSolveSpan()
Set both solve spans to 0.
|
void |
setIC(ODEVar var,
double val)
Set an initial condition of a variable.
|
void |
setParameters(SolverParameters params)
Set the current solver parameters to the given one.
|
void |
solutionReady(double[][] sol)
Respond when solving is done - probably solve backward if we are in orbit
mode, or simply enable buttons on input panel.
|
boolean |
solve()
Solve uses the current ode and solving parameters to generate a solution.
|
void |
solveBackward()
Solve backward for a curve.
|
void |
solveForward()
Solve forward for a curve.
|
void |
solveOrbit()
Solve for an orbit, which is one curve forward, one backward.
|
void |
stopSolve()
If a current solver thread is running, cancelSolve kills it, ending the
solve.
|
void |
updateODE(ODE newODE)
Update to a new ODE.
|
public SolverRep(ODEWorkspace odews)
odews
- the ODEWorkspace owning this Solver Componentpublic ODE getCurrentODE()
public SolverParameters getParameters()
public void setParameters(SolverParameters params)
params
- the solver parameters to set topublic void updateODE(ODE newODE)
newODE
- the new ODE to set topublic void setIC(ODEVar var, double val)
var
- the variable to set the initial conditionval
- the value to set topublic void resetSolveSpan()
public boolean solve()
public void solveForward()
public void solveBackward()
public void solveOrbit()
public void stopSolve()
public void reload()
public void solutionReady(double[][] sol)
solutionReady
in interface SolutionReadyListener
public void errorCondition(java.lang.Exception e)
errorCondition
in interface SolutionReadyListener
e
- the exception to be handledpublic void errorCondition(java.lang.String e)
errorCondition
in interface SolutionReadyListener
e
- string describing error condition