jvx.numeric
Class PnAreaVolEnergy
- java.lang.Object
-
- jv.object.PsObject
-
- jvx.numeric.PnFunction
-
- jvx.numeric.PnEnergy
-
- jvx.numeric.PnDiriEnergy
-
- jvx.numeric.PnAreaVolEnergy
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, PsUpdateIf
public class PnAreaVolEnergy extends PnDiriEnergy
Dirichlet energy with volume term is used to minimize area under a volume constraint.- See Also:
- Serialized Form
- Author:
- Konrad Polthier
- Version:
- 04.09.02, 1.00 revised (kp)
04.09.02, 1.00 created (kp)
-
-
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 PnAreaVolEnergy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubleeval(PdVector coord)Compute Area energy of a coord vector using the stiffness matrix of a PnArea instance.PdVectorevalGradient(PdVector coord, PdVector gradient)Evaluate Area gradient of a coord vector using the stiffness matrix of a PnArea instance.PdMatrixevalHessian(PdMatrix hessian)Compute full hessian of Diri energy of a coord vector using the stiffness matrix.voidinit()If instance has missing name then assign default name 'Object_NUMBER' where number is the total number of already created instances.booleansetSurface(PgElementSet domain, PgElementSet surface)Set domain and surface, and initialize energy structure.booleanupdate(java.lang.Object event)Update the class whenever a child has changed.-
Methods inherited from class jvx.numeric.PnDiriEnergy
initSurface
-
Methods inherited from class jvx.numeric.PnEnergy
computeNormalizedHessian, getConstrain, getNumOfVariables, getSpectrum, getZeroGradientAtBounds, isEnabledConstrainMatrix, isUseConstrainMatrix, setConstrain, setEnabledConstrainMatrix, setUseConstrainMatrix, setZeroGradientAtBounds, 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, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanels
-
-
-
-
Method Detail
-
init
public void init()
Description copied from class:PsObjectIf instance has missing name then assign default name 'Object_NUMBER' where number is the total number of already created instances.- Overrides:
initin classPnDiriEnergy
-
setSurface
public boolean setSurface(PgElementSet domain, PgElementSet surface)
Set domain and surface, and initialize energy structure. Method is called from outside whenever domain or surface has been updated.- Overrides:
setSurfacein classPnDiriEnergy- Parameters:
domain- additional geometry used to specify mapssurface- geometry which is usually optimized
-
update
public boolean update(java.lang.Object event)
Update the class whenever a child has changed. Method is usually invoked from the children.- Specified by:
updatein interfacePsUpdateIf- Overrides:
updatein classPsObject- Parameters:
event- carries a lot of information- Returns:
- true if event has been handled, otherwise false
- See Also:
PsObject.setParent(PsUpdateIf),PsObject.getFather(),PsObject.addUpdateListener(PsUpdateIf)
-
eval
public double eval(PdVector coord)
Compute Area energy of a coord vector using the stiffness matrix of a PnArea instance. Method uses the array m_store of PnArea for intermediate storage and modifies its entries.- Overrides:
evalin classPnEnergy- Parameters:
coord- Coordinate vector with list of doubles- Returns:
- double Energy of coordinate vector
- See Also:
PnAreaEnergy- Author:
- Konrad Polthier
- Version:
- 04.09.02, 1.00 revised (kp)
04.09.02, 1.00 created (kp)
-
evalGradient
public PdVector evalGradient(PdVector coord, PdVector gradient)
Evaluate Area gradient of a coord vector using the stiffness matrix of a PnArea instance. Along boundary gradient is modified to fulfill any boundary constraints. Special feature for outside calls: If outside wants to evaluate the gradient without allocating gradient, then instead of gradient anullmay 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).- Overrides:
evalGradientin classPnEnergy- Parameters:
coord- Coordinate vector with list of doublesgradient- Gradient vector to be modified, maybenull.- See Also:
PnAreaEnergy- Author:
- Konrad Polthier
- Version:
- 04.09.02, 1.00 revised (kp)
04.09.02, 1.00 created (kp)
-
evalHessian
public PdMatrix evalHessian(PdMatrix hessian)
Compute full hessian of Diri energy of a coord vector using the stiffness matrix. If argument isnull, then a new matrix of full size is created and returned. Size of argument is enlarged if necessary. Boundary and deleted vertices are not considered.- Overrides:
evalHessianin classPnDiriEnergy- Parameters:
hessian- Empty hessian of energy- Returns:
- Hessian of energy
- Author:
- Konrad Polthier
- Version:
- 04.09.02, 1.00 revised (kp)
04.09.02, 1.00 created (kp)
-
-
"