JavaView® v2.00.008

jvx.numeric
Class PnOde

java.lang.Object
  |
  +--jv.object.PsObject
        |
        +--jvx.numeric.PnOde
All Implemented Interfaces:
java.lang.Cloneable, PsUpdateIf, java.io.Serializable
Direct Known Subclasses:
PnElasticCurvature, PnElasticOde, PnOdeExpr, PnSurfaceOde

public class PnOde
extends PsObject

Basic ode class with solver. User should override the method diffEquation with his own ode and then call solve(PgPolygon).

Version:
02.10.99, 1.10 revised (kp) Moved to jv.numeric from vgp.tutor.ode.
00.00.98, 1.00 created (kp)
Author:
Konrad Polthier
See Also:
Serialized Form

Field Summary
protected  double m_length
           
protected  int m_order
           
protected  double m_stepSize
           
protected  double m_x0
           
protected  double[] m_y0
           
 
Fields inherited from class jv.object.PsObject
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, m_infoPanel, m_name, m_panelList, m_parent, m_tag, m_updateList, NUM_TAGS
 
Constructor Summary
PnOde()
           
 
Method Summary
 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.
 
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, toString, update, updatePanels
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_order

protected int m_order

m_x0

protected double m_x0

m_y0

protected double[] m_y0

m_stepSize

protected double m_stepSize

m_length

protected double m_length
Constructor Detail

PnOde

public PnOde()
Method Detail

init

public void init()
Description copied from class: PsObject
If instance has missing name then assign default name 'object_NUMBER' where number is the total number of already created instances.
Overrides:
init in class PsObject

setOrder

public void setOrder(int order)

setInitialData

public void setInitialData(double x,
                           double[] y,
                           double h,
                           double len)

solve

public void solve(PgPolygon p)

diffEquation

public void diffEquation(double x,
                         double[] y,
                         double[] dy)
Method should be overwritten y an application with problem dependent ODE.

solve

public 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.

rungeKutta

public static void rungeKutta(PnOde anOde,
                              double x,
                              double[] y,
                              double h,
                              double[] yOut)
4th order Runge-Kutta method.

JavaView® v2.00.008

The software JavaView® is copyright protected. All Rights Reserved.