|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--jv.object.PsObject
|
+--jvx.numeric.PnFunction
|
+--jvx.numeric.PnEnergy
Energy functional on triangulated surfaces including gradient and hessian computations.
Surface must contain all boundary information. Domain is only used by some energy functionals to compute the stiffness matrix.
| 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 |
| Constructor Summary | |
PnEnergy()
|
|
| Method Summary | |
double |
eval(PdVector coord)
Compute Area energy of a coord vector using the stiffness matrix of a PnArea instance. |
PdVector |
evalGradient(PdVector coord,
PdVector gradient)
Evaluate Area gradient of a coord vector using the stiffness matrix of a PnArea instance. |
abstract PdMatrix |
evalHessian(PdMatrix hessian)
Subclass must supply method to compute hessian of energy. |
int |
getNumOfVariables()
Get number of free variables of energy. |
PdVector[] |
getSpectrum(PdVector eValue,
PdVector[] eVector)
Compute eigenvalues and eigenvectors of normalized hessian. |
boolean |
getZeroGradientAtBounds()
|
void |
init()
If instance has missing name then assign default name 'object_NUMBER' where number is the total number of already created instances. |
void |
initSurface(PgElementSet domain,
PgElementSet surface)
Method called from energyMinimizer.minimizeStep() to update the stiffness matrix after conjugate gradient method has returned. |
boolean |
setSurface(PgElementSet domain,
PgElementSet surface)
Set domain and surface, and initialize energy structure. |
void |
setZeroGradientAtBounds(boolean flag)
Constraints the gradient at the boundary to zero or makes it free again. |
void |
testEigenvalues()
|
| Methods inherited from class jvx.numeric.PnFunction |
enableEvaluation, isEvaluable |
| Methods inherited from class jv.object.PsObject |
addInspector, addUpdateListener, assureInspector, 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, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PnEnergy()
| Method Detail |
public void init()
PsObjectinit in class PsObject
public void initSurface(PgElementSet domain,
PgElementSet surface)
public int getNumOfVariables()
getNumOfVariables in class PnFunction
public boolean setSurface(PgElementSet domain,
PgElementSet surface)
public double eval(PdVector coord)
eval in class PnFunctioncoord - Coordinate vector with list of doublesvgp.discrete.harmonic.PnAreaEnergypublic void setZeroGradientAtBounds(boolean flag)
true, i.e. constrained gradient.public boolean getZeroGradientAtBounds()
setZeroGradientAtBounds(boolean)
public PdVector evalGradient(PdVector coord,
PdVector gradient)
null may be passed. In this case the gradient information is
store in an internal variable which is returned as gradient. Handle with care and do not
modify size returned gradient.
If no special boundary constraints are set, then you may use setZeroGradientAtBounds(boolean) to set the gradient zero at the boundary (or free again).
evalGradient in class PnFunctioncoord - Coordinate vector with list of doublesgradient - Gradient vector to be modified, maybe null.vgp.discrete.harmonic.PnAreaEnergypublic abstract PdMatrix evalHessian(PdMatrix hessian)
evalHessian in class PnFunctionhessian - Hessian of energy with square size
public PdVector[] getSpectrum(PdVector eValue,
PdVector[] eVector)
eValue - Vector to store the eigenvalues. Size will be adjusted.eVector - Possibly empty array to store the eigenvectors. Will be returned.public void testEigenvalues()
|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||