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

- - ### 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

    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

    - #### solve

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

      Solves for outPoint at initPoint.
      Parameters:
        `initPoint` - input
        `h` - stepsize
        `outPoint` - output

    - #### 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()`

    - #### 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.
"