jvx.numeric
Class PnGeodesicRK
java.lang.Object
|
+--jv.object.PsObject
|
+--jvx.numeric.PnGeodesicRK
- All Implemented Interfaces:
- java.lang.Cloneable, PsUpdateIf, java.io.Serializable
- Direct Known Subclasses:
- PnElementRK, PnTranslationRK, PnVertexRK
- public class PnGeodesicRK
- extends PsObject
Discret Runge-Kutta method on ElementSets.
ElementSet must be triangulated.
- Version:
- 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
- See Also:
PgElementSet.triangulate(jv.geom.PgElementSet), Serialized Form
| Fields inherited from class jv.object.PsObject |
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, NUM_TAGS |
|
Method Summary |
void |
eval(int elemInd,
PdBary bary,
PdBaryDir out)
Evaluate vector field on given element at given barycentric coordinate.
|
double |
getStepLength()
|
PgPolygonOnElementSet |
getStepPolygon()
|
boolean |
nextStep()
Calculates the next step of actual integration. |
boolean |
prepareSolve(PgPolygonOnElementSet outpoly,
int iniElem,
PdBary iniPoint,
double h)
If not method 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 |
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, hasInspector, hasTag, hasUpdateListener, init, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, toString, update, updatePanels |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PnGeodesicRK
public PnGeodesicRK(PgElementSet geom)
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: here the polygon is savediniElem - initial element indexiniPoint - initial barycentric coordinatesh - stepsizenumIterations - length of polygon is h*numIterations- See Also:
prepareSolve(jvx.geom.PgPolygonOnElementSet, int, jv.vecmath.PdBary, double),
nextStep(),
getStepPolygon()
prepareSolve
public boolean prepareSolve(PgPolygonOnElementSet outpoly,
int iniElem,
PdBary iniPoint,
double h)
- If not method
solve is used, this method has to be
called before integration. It initializes all internal variables.
- Parameters:
outpoly - output: here the polygon is savediniElem - initial element indexiniPoint - initial barycentric coordinatesh - stepsize- See Also:
solve(jvx.geom.PgPolygonOnElementSet, int, jv.vecmath.PdBary, double, int)
nextStep
public boolean nextStep()
- Calculates the next step of actual integration.
- Returns:
- false if integration stopped by error or
because edge was reached or next direction
would be of zero length
- See Also:
solve(jvx.geom.PgPolygonOnElementSet, int, jv.vecmath.PdBary, double, int),
prepareSolve(jvx.geom.PgPolygonOnElementSet, int, jv.vecmath.PdBary, double),
getStepPolygon()
getStepPolygon
public PgPolygonOnElementSet getStepPolygon()
- Returns:
- polygon that had been added to the integral line at last integration step
getStepLength
public double getStepLength()
- Returns:
- euklidian length of last runge-kutta step
eval
public void eval(int elemInd,
PdBary bary,
PdBaryDir out)
- Evaluate vector field on given element at given barycentric coordinate.
Implementation in PnGeodesicRK does nothing. Has to be overwritten in subclasses.
- Parameters:
elemInd - the element in which the vector field will be evaluatedbary - barycentric coordinates of the point in which the vector field will be evaluatedout - 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)
The software JavaView® is copyright protected. All Rights Reserved.