jvx.numeric

## Class PnGeodesicRK

- java.lang.Object
- - jv.object.PsObject
  - - jvx.numeric.PnGeodesicRK

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, PsUpdateIf
  Direct Known Subclasses:
    PnElementRK, PnTranslationRK, PnVertexRK, PnVertexRKIgnoreDirection

      public abstract class PnGeodesicRK
      extends PsObject

  Discrete Runge-Kutta solver on triangular element sets. Element set must be triangulated.
  See Also:
    `PnElementRK`, `PnVertexRK`, `PnVertexRKIgnoreDirection`, `PgElementSet.triangulate(jv.geom.PgElementSet)`, Serialized Form
  Author:
    Eike Preuß
  Version:
    01.03.06, 1.40 revised (ah) Use PnStraightestGeodesic.
    20.02.03, 1.30 revised (ep) New method `eval` that returns the evaluation result in new allocated baryvector.
    22.01.03, 1.20 revised (ep) You can invert the direction of integration with get/setInvertDirection.
    15.01.03, 1.10 revised (ep) Changes with respect to new RK class that ignores the sign (direction) of vector fields.
    11.07.01, 1.05 revised (ep) Speed optimization in the whole thing.
    20.02.00, 1.04 revised (ep) removed "small velocity bug", added StepLength 28.12.99, 1.03 revised (ep) added fast-mode (euler-mode)
    27.12.99, 1.02 revised (ep) corrected handling of |vector| == 0
    21.11.99, 1.01 revised (ep) split into PnGeodesicRK, PnVertexRK, PnElementRK

- - ### Field Summary

    - ### Fields inherited from class jv.object.PsObject

      `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 Summary

    Constructors
    Constructor and Description
    `PnGeodesicRK(PgElementSet geom)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `PdBaryDir` | `eval(int elemInd, PdBary bary)` Wrapper that calls `eval(int, PdBary, PdBaryDir)` with a new barycentric vector.
    `abstract void` | `eval(int elemInd, PdBary bary, PdBaryDir out)` Evaluate vector field on given element at given barycentric coordinate.
    `boolean` | `getInvertDirection()`
    `double` | `getStepLength()` Returns Euclidean length of last Runge-Kutta step.
    `boolean` | `nextStep()` Calculates the next step of actual integration.
    `boolean` | `prepareSolve(PgPolygonOnElementSet outpoly, int iniElem, PdBary iniPoint, double h)` Unless `solve` is used, this method has to be called before integration.
    `void` | `setFirstOrder(boolean flag)` Sets integration method to euler if flag is true, else to 4th-order Runge-Kutta.
    `void` | `setFourthOrder(boolean flag)` Sets integration method to 4th-order Runge-Kutta if flag is true, else to euler.
    `void` | `setGeometry(PgElementSet geom)` Sets underlying geometry.
    `void` | `setInvertDirection(boolean flag)` If set to 'true', the negative vector field is used.
    `void` | `solve(PdBary initPoint, double h, int numIterations, PdBary outPoint)` Solves for outPoint at initPoint.
    `void` | `solve(PdBary initPoint, double h, PdBary outPoint)` Solves for outPoint at initPoint.
    `void` | `solve(PgPolygonOnElementSet outpoly, int iniElem, PdBary iniPoint, double h, int numIterations)` Returns a whole integral line.

    - ### Methods inherited from class jv.object.PsObject

      `addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, init, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, update, updatePanels`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PnGeodesicRK

          public PnGeodesicRK(PgElementSet geom)

  - ### Method Detail

    - #### setGeometry

          public void setGeometry(PgElementSet geom)

      Sets underlying geometry.
      Parameters:
        `geom` - new underlying geometry

    - #### setFirstOrder

          public void setFirstOrder(boolean flag)

      Sets integration method to euler if flag is true, else to 4th-order Runge-Kutta.
      Parameters:
        `flag` - true: euler; false: 4th-order RK

    - #### setFourthOrder

          public void setFourthOrder(boolean flag)

      Sets integration method to 4th-order Runge-Kutta if flag is true, else to euler.
      Parameters:
        `flag` - true: 4th-order RK; false: euler

    - #### solve

          public void solve(PgPolygonOnElementSet outpoly,
                            int iniElem,
                            PdBary iniPoint,
                            double h,
                            int numIterations)

      Returns a whole integral line. To get an integral line of unfixed length step by step, use `prepareSolve`, `nextStep` and `getStepPolygon`.
      Parameters:
        `outpoly` - output polygon
        `iniElem` - initial element index
        `iniPoint` - initial barycentric coordinates
        `h` - stepsize
        `numIterations` - number of iterations
      See Also:
        `prepareSolve(jvx.geom.PgPolygonOnElementSet, int, jv.vecmath.PdBary, double)`, `nextStep()`, `getStepLength()`

    - #### solve

          public void solve(PdBary initPoint,
                            double h,
                            int numIterations,
                            PdBary outPoint)

      Solves for outPoint at initPoint.
      Parameters:
        `initPoint` - input
        `h` - stepsize
        `numIterations` - number of iterations
        `outPoint` - output
      Version:
        01.03.06, 1.00 created (ah)

    - #### solve

          public void solve(PdBary initPoint,
                            double h,
                            PdBary outPoint)

      Solves for outPoint at initPoint.
      Parameters:
        `initPoint` - input
        `h` - stepsize
        `outPoint` - output
      Version:
        01.03.06, 1.00 created (ah)

    - #### prepareSolve

          public boolean prepareSolve(PgPolygonOnElementSet outpoly,
                                      int iniElem,
                                      PdBary iniPoint,
                                      double h)

      Unless `solve` is used, this method has to be called before integration. It initializes all internal variables.
      Parameters:
        `outpoly` - output polygon
        `iniElem` - initial element index
        `iniPoint` - initial barycentric coordinates
        `h` - stepsize
      See Also:
        `solve(PdBary, double, int, PdBary)`

    - #### nextStep

          public boolean nextStep()

      Calculates the next step of actual integration.
      Returns:
        false if the integration stopped by error, the geometry boundary was reached, or the next direction would be of zero length
      See Also:
        `solve(PdBary, double, int, PdBary)`, `prepareSolve(jvx.geom.PgPolygonOnElementSet, int, jv.vecmath.PdBary, double)`, `getStepLength()`
      Version:
        01.03.06, 1.20 revised (ah) Avoid unnecessary copying
        . 01.03.06, 1.10 revised (ah) Use PnStraightestGeodesic

    - #### getStepLength

          public double getStepLength()

      Returns Euclidean length of last Runge-Kutta step.

    - #### setInvertDirection

          public void setInvertDirection(boolean flag)

      If set to 'true', the negative vector field is used. MUST BE SUPPORTED BY EVAL-METHOD OF SUBCLASSES.
      Since:
        JavaView 2.49.004

    - #### getInvertDirection

          public boolean getInvertDirection()

      Since:
        JavaView 2.49.004

    - #### eval

          public abstract void eval(int elemInd,
                                    PdBary bary,
                                    PdBaryDir out)

      Evaluate vector field on given element at given barycentric coordinate.
      Parameters:
        `elemInd` - the element in which the vector field will be evaluated
        `bary` - barycentric coordinates of the point in which the vector field will be evaluated
        `out` - output: in this `PdBaryDir` the evaluated direction will be stored
      See Also:
        `PnElementRK.eval(int, jv.vecmath.PdBary, jv.vecmath.PdBaryDir)`, `PnVertexRK.eval(int, jv.vecmath.PdBary, jv.vecmath.PdBaryDir)`, `PnTranslationRK.eval(int, jv.vecmath.PdBary, jv.vecmath.PdBaryDir)`

    - #### eval

          public PdBaryDir eval(int elemInd,
                                PdBary bary)

      Wrapper that calls `eval(int, PdBary, PdBaryDir)` with a new barycentric vector.
      Since:
        JavaView xx.xx.xxx

"

The software JavaView? is copyright protected. All Rights Reserved.
"