jvx.numeric
Class PnHodgeU
java.lang.Object
|
+--jv.object.PsObject
|
+--jvx.numeric.PnFunction
|
+--jvx.numeric.PnEnergy
|
+--jvx.numeric.PnDiriEnergy
|
+--jvx.numeric.PnHodgeU
- All Implemented Interfaces:
- java.lang.Cloneable, PsUpdateIf, java.io.Serializable
- public class PnHodgeU
- extends PnDiriEnergy
Energy to obtain principal function u.
- Version:
- 05.09.00, 1.10 revised (ep) Boundary conditions on/off switch added.
05.09.00, 1.05 revised (ep) m_gradFi -> protected and added method getGradFi.
27.03.00, 1.01 revised (ep) Boundary restrictions.
24.11.99, 1.00 revised (kp)
24.11.99, 1.00 created (kp)
- 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 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 |
|
Method Summary |
protected void |
computeGradients()
Compute gradient of Lagrange basis functions of domain triangulation.
|
double |
eval(PdVector coord)
Compute energy of a coord vector using newly initialized stiffness matrix.
|
PdVector |
evalGradient(PdVector coord,
PdVector gradient)
Evaluate Area gradient of a coord vector using the stiffness matrix of a PnArea instance. |
PdMatrix |
evalHessian(PdMatrix hessian)
Compute full hessian of Diri energy of a coord vector using the stiffness matrix.
|
PdVector[][] |
getGradFi()
|
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 |
setVectorField(PgVectorField vf)
Set vector field.
|
void |
setZeroBounds(boolean flag)
Switches boundary condition 'zero gradient' on or off. |
| 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 |
m_vf
protected PgVectorField m_vf
m_gradFi
protected PdVector[][] m_gradFi
m_bndInd
protected PiVector m_bndInd
m_areas
protected PdVector m_areas
- Areas of elements in domain. Computed in method computeGradients.
m_zeroBounds
protected boolean m_zeroBounds
- Boundary condition 'zero gradients' on/off.
PnHodgeU
public PnHodgeU()
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 PnDiriEnergy
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. PnHodgeU should copy surface into domain if in iteration mode
i.e. if dimension of domain and surface are equal.
- Overrides:
initSurface in class PnDiriEnergy
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 PnDiriEnergy
setZeroBounds
public void setZeroBounds(boolean flag)
- Switches boundary condition 'zero gradient' on or off. Default 'on'.
setVectorField
public void setVectorField(PgVectorField vf)
- Set vector field.
Method is called from outside whenever vector field has been updated.
computeGradients
protected void computeGradients()
- Compute gradient of Lagrange basis functions of domain triangulation.
For each element exists an array of three gradients, each gradient has dimension
of vertices in domain triangulation.
Also computes areas of elements in domain.
eval
public double eval(PdVector coord)
- Compute 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 Area gradient of a coord vector using the stiffness matrix of a PnArea instance.
- Overrides:
evalGradient in class PnEnergy
- Parameters:
coord - Coordinate vector with list of doublesgradient - Gradient vector to be modified- See Also:
vgp.discrete.harmonic.PnEnergy
evalHessian
public PdMatrix evalHessian(PdMatrix hessian)
- Compute full hessian of Diri energy of a coord vector using the stiffness matrix.
If argument is
null, 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:
evalHessian in class PnDiriEnergy
- Parameters:
hessian - Empty hessian of Dirichlet energycoord - Coordinate vector with list of doubles- Returns:
- Hessian of Dirichlet energy
- See Also:
vgp.discrete.harmonic.PnDiriEnergy
getGradFi
public PdVector[][] getGradFi()
The software JavaView® is copyright protected. All Rights Reserved.