public abstract class PnGeodesicRK extends 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 and Description |
---|
PnGeodesicRK(PgElementSet geom) |
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.
|
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
public PnGeodesicRK(PgElementSet geom)
public void setGeometry(PgElementSet geom)
geom
- new underlying geometrypublic void setFirstOrder(boolean flag)
flag
- true: euler; false: 4th-order RKpublic void setFourthOrder(boolean flag)
flag
- true: 4th-order RK; false: eulerpublic void solve(PgPolygonOnElementSet outpoly, int iniElem, PdBary iniPoint, double h, int numIterations)
prepareSolve
, nextStep
and getStepPolygon
.outpoly
- output polygoniniElem
- initial element indexiniPoint
- initial barycentric coordinatesh
- stepsizenumIterations
- number of iterationsprepareSolve(jvx.geom.PgPolygonOnElementSet, int, jv.vecmath.PdBary, double)
,
nextStep()
,
getStepLength()
public void solve(PdBary initPoint, double h, int numIterations, PdBary outPoint)
initPoint
- inputh
- stepsizenumIterations
- number of iterationsoutPoint
- outputpublic void solve(PdBary initPoint, double h, PdBary outPoint)
initPoint
- inputh
- stepsizeoutPoint
- outputpublic boolean prepareSolve(PgPolygonOnElementSet outpoly, int iniElem, PdBary iniPoint, double h)
solve
is used, this method has to be
called before integration. It initializes all internal variables.outpoly
- output polygoniniElem
- initial element indexiniPoint
- initial barycentric coordinatesh
- stepsizesolve(PdBary, double, int, PdBary)
public boolean nextStep()
solve(PdBary, double, int, PdBary)
,
prepareSolve(jvx.geom.PgPolygonOnElementSet, int, jv.vecmath.PdBary, double)
,
getStepLength()
public double getStepLength()
public void setInvertDirection(boolean flag)
public boolean getInvertDirection()
public abstract void eval(int elemInd, PdBary bary, PdBaryDir out)
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 storedPnElementRK.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)
public PdBaryDir eval(int elemInd, PdBary bary)
eval(int, PdBary, PdBaryDir)
with a new barycentric vector."