JavaView® v2.00.008

jvx.numeric
Class PnSpringEnergy

java.lang.Object
  |
  +--jv.object.PsObject
        |
        +--jvx.numeric.PnFunction
              |
              +--jvx.numeric.PnEnergy
                    |
                    +--jvx.numeric.PnSpringEnergy
All Implemented Interfaces:
java.lang.Cloneable, PsUpdateIf, java.io.Serializable

public class PnSpringEnergy
extends PnEnergy

Spring energy including gradient computation.

Version:
22.12.99, 1.00 revised (kp)
22.12.99, 1.00 created (kp) Derived from PnAreaEnergy
Author:
Konrad Polthier
See Also:
Serialized Form

Fields inherited from class jvx.numeric.PnEnergy
m_bndList, m_bNormal, m_bTangential, m_dim, m_domain, m_index, m_invIndex, m_noiv, m_nop, m_stiffMatrix, m_store, m_surface
 
Fields inherited from class jvx.numeric.PnFunction
m_bEvaluable
 
Fields inherited from class jv.object.PsObject
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, m_infoPanel, m_name, m_panelList, m_parent, m_tag, m_updateList, NUM_TAGS
 
Constructor Summary
PnSpringEnergy()
           
 
Method Summary
 double eval(PdVector coord)
          Compute conformal energy of a coord vector using newly initialized stiffness matrix.
 PdVector evalGradient(PdVector coord, PdVector gradient)
          Evaluate gradient of a coord vector using the stiffness matrix.
 PdMatrix evalHessian(PdMatrix hessian)
          Subclass must supply method to compute hessian of energy.
 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.
 
Methods inherited from class jvx.numeric.PnEnergy
getNumOfVariables, getSpectrum, testEigenvalues
 
Methods inherited from class jvx.numeric.PnFunction
enableEvaluation, isEvaluable
 
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PnSpringEnergy

public PnSpringEnergy()
Method Detail

init

public void init()
Description copied from class: PsObject
If instance has missing name then assign default name 'object_NUMBER' where number is the total number of already created instances.
Overrides:
init in class PnEnergy

initSurface

public void initSurface(PgElementSet domain,
                        PgElementSet surface)
Method called from energyMinimizer.minimizeStep() to update the stiffness matrix after conjugate gradient method has returned. E.g. PnSpringEnergy should copy surface into domain if in iteration mode i.e. if dimension of domain and surface are equal.
Overrides:
initSurface in class PnEnergy

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:
setSurface in class PnEnergy

eval

public double eval(PdVector coord)
Compute conformal energy of a coord vector using newly initialized stiffness matrix. Method uses the array m_store for intermediate storage and modifies its entries.
Overrides:
eval in class PnEnergy
Parameters:
coord - Coordinate vector with list of doubles
Returns:
double Energy of coordinate vector
See Also:
vgp.discrete.harmonic.PnEnergy

evalGradient

public PdVector evalGradient(PdVector coord,
                             PdVector gradient)
Evaluate gradient of a coord vector using the stiffness matrix.
Overrides:
evalGradient in class PnEnergy
Parameters:
coord - Coordinate vector with list of doubles
gradient - Gradient vector to be modified
See Also:
vgp.discrete.harmonic.PnEnergy

evalHessian

public PdMatrix evalHessian(PdMatrix hessian)
Description copied from class: PnEnergy
Subclass must supply method to compute hessian of energy.
Overrides:
evalHessian in class PnEnergy
Following copied from class: jvx.numeric.PnEnergy
Parameters:
hessian - Hessian of energy with square size

JavaView® v2.00.008

The software JavaView® is copyright protected. All Rights Reserved.