public class PnOde extends PsObject
diffEquation
with his own ode
and then call solve(PgPolygon)
.HAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS
Constructor and Description |
---|
PnOde() |
Modifier and Type | Method and Description |
---|---|
void |
diffEquation(double x,
double[] y,
double[] dy)
Method should be overwritten y an application with problem dependent ODE.
|
void |
init()
If instance has missing name then assign default name 'Object_NUMBER' where
number is the total number of already created instances.
|
static void |
rungeKutta(PnOde anOde,
double x,
double[] y,
double h,
double[] yOut)
4th order Runge-Kutta method.
|
void |
setInitialData(double x,
double[] y,
double h,
double len) |
void |
setOrder(int order) |
void |
solve(PgPolygon p) |
static boolean |
solve(PgPolygon p,
PnOde anOde,
double xStart,
double[] yStart,
double h,
double xLength)
Ode solver of an initial value problem performing a number of RK steps.
|
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, update, updatePanels
public void init()
PsObject
public void setOrder(int order)
public void setInitialData(double x, double[] y, double h, double len)
public void solve(PgPolygon p)
public void diffEquation(double x, double[] y, double[] dy)
public static boolean solve(PgPolygon p, PnOde anOde, double xStart, double[] yStart, double h, double xLength)
public static void rungeKutta(PnOde anOde, double x, double[] y, double h, double[] yOut)
"