JavaView® v2.00.008

jvx.geom
Class PwHodge

java.lang.Object
  |
  +--jv.object.PsObject
        |
        +--jvx.geom.PwHodge
All Implemented Interfaces:
java.lang.Cloneable, java.util.EventListener, PsUpdateIf, java.io.Serializable, java.awt.event.WindowListener

public class PwHodge
extends PsObject
implements java.awt.event.WindowListener

Study hodge splitting of discrete vector fields. An vector field is split in gradient and rotation free parts with a remaining harmonic component.

Version:
11.12.00, 2.30 revised (ep) Made displays available to other classes.
10.12.00, 2.20 revised (ep) May change zero bounds condition for U and W seperately.
06.06.00, 2.10 revised (ep) Moved to seperate workshop.
06.03.00, 2.00 revised (ep) Corrected updates and made various changes.
24.11.99, 1.00 created (kp).
Author:
Konrad Polthier, Eike Preuss
See Also:
Serialized Form

Field Summary
protected  boolean m_autoUpdate
          Minimize at change of surface on/off.
protected  PgVectorField m_coGradW
          Co-gradient of principal function of divergence free part of vector field.
protected  int m_dimOfDomain
          Dimension of domain and vector fields.
protected  PnEnergyMinimizer m_diriU
          Class for minimizing a u-energy functional on surfaces.
protected  PnEnergyMinimizer m_diriW
          Class for minimizing a w-energy functional on surfaces.
protected  PvDisplayIf[] m_display
           
protected  PgElementSet m_domain
          Base geometry is a rectangular grid which carries the vector field.
protected  java.awt.Frame[] m_frames
           
protected  PgVectorField m_gradU
          Gradient of principal function of rotation free part of vector field.
protected  PnHodgeU m_hodgeUEnergy
           
protected  PnHodgeW m_hodgeWEnergy
           
protected  int m_numVF
           
protected  PuInteger m_selectedVF
          Scrollbar for vector field selection in case of multiple vector fields.
protected  PgElementSet[] m_texDomain
          Base geometries for each decomposed vector field including its texture.
protected  PgElementSet m_u
          Principal function of rotation free part of vector field.
protected  PgGraph m_uGraph
          Surface paír of domain and u.
protected  PgVectorField m_v
          Harmonic remainder of vector field.
protected  PgVectorField m_vf
          Vector field, associated with base geometry.
protected  PgElementSet m_w
          Principal function of divergence free part of vector field.
protected  PgGraph m_wGraph
          Surface paír of domain and w.
protected  boolean m_zeroBoundsU
          Boundary condition 'zero gradients' on/off.
protected  boolean m_zeroBoundsW
           
 
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
PwHodge()
           
 
Method Summary
 void close()
           
protected  void computeGradient()
           
protected  void computeHarmonic()
           
protected  void computeJGradient()
           
 PvDisplayIf getDisplay(int dispIndex)
           
 boolean getDisplayVisibility(int dispIndex)
          Handling of the displays that show the vector field components and the potentials.
 PgVectorField getDivergenceFree()
          Call method minimize() before using methods with this comment.
 PgVectorField getHarmonic()
          Call method minimize() before using methods with this comment.
 PgElementSet getPotentialU()
          Call method minimize() before using methods with this comment.
 PgElementSet getPotentialW()
          Call method minimize() before using methods with this comment.
 PgVectorField getRotationFree()
          Call method minimize() before using methods with this comment.
 PgGraph getUGraph()
          Call method minimize() before using methods with this comment.
 PgGraph getWGraph()
          Call method minimize() before using methods with this comment.
 void init()
          If instance has missing name then assign default name 'object_NUMBER' where number is the total number of already created instances.
 void minimize()
          Initiates minimization of the two energies that produce the three parts of the decomposition.
 void setAutoUpdate(boolean flag)
           
 void setDisplaySize(int dispIndex, int width, int height)
           
 void setDisplayVisibility(int dispIndex, boolean visible)
          Handling of the displays that show the vector field components and the potentials.
 void setVectorField(PgElementSet domain, int vfIndex)
          Should be called after the viewer has been already created (e.g. in the start() method of a PjProject class).
 void setZeroBounds(boolean flag)
           
 void setZeroBoundsU(boolean flag)
          Sets zero boundary condition of potential of rotation free part.
 void setZeroBoundsW(boolean flag)
          Sets zero boundary condition of potential of divergence free part.
 void stop()
          Stop minimization explicitly before it is completed.
 boolean update(java.lang.Object event)
          Update the class whenever a child has changed.
 void windowActivated(java.awt.event.WindowEvent e)
           
 void windowClosed(java.awt.event.WindowEvent e)
           
 void windowClosing(java.awt.event.WindowEvent e)
           
 void windowDeactivated(java.awt.event.WindowEvent e)
           
 void windowDeiconified(java.awt.event.WindowEvent e)
           
 void windowIconified(java.awt.event.WindowEvent e)
           
 void windowOpened(java.awt.event.WindowEvent e)
           
 
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, updatePanels
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_dimOfDomain

protected int m_dimOfDomain
Dimension of domain and vector fields.

m_domain

protected PgElementSet m_domain
Base geometry is a rectangular grid which carries the vector field.

m_texDomain

protected PgElementSet[] m_texDomain
Base geometries for each decomposed vector field including its texture.

m_vf

protected PgVectorField m_vf
Vector field, associated with base geometry.

m_diriU

protected PnEnergyMinimizer m_diriU
Class for minimizing a u-energy functional on surfaces.

m_u

protected PgElementSet m_u
Principal function of rotation free part of vector field.

m_uGraph

protected PgGraph m_uGraph
Surface paír of domain and u.

m_gradU

protected PgVectorField m_gradU
Gradient of principal function of rotation free part of vector field.

m_diriW

protected PnEnergyMinimizer m_diriW
Class for minimizing a w-energy functional on surfaces.

m_w

protected PgElementSet m_w
Principal function of divergence free part of vector field.

m_wGraph

protected PgGraph m_wGraph
Surface paír of domain and w.

m_coGradW

protected PgVectorField m_coGradW
Co-gradient of principal function of divergence free part of vector field.

m_v

protected PgVectorField m_v
Harmonic remainder of vector field.

m_selectedVF

protected PuInteger m_selectedVF
Scrollbar for vector field selection in case of multiple vector fields.

m_numVF

protected int m_numVF

m_zeroBoundsU

protected boolean m_zeroBoundsU
Boundary condition 'zero gradients' on/off.

m_zeroBoundsW

protected boolean m_zeroBoundsW

m_hodgeUEnergy

protected PnHodgeU m_hodgeUEnergy

m_hodgeWEnergy

protected PnHodgeW m_hodgeWEnergy

m_autoUpdate

protected boolean m_autoUpdate
Minimize at change of surface on/off.

m_display

protected PvDisplayIf[] m_display

m_frames

protected java.awt.Frame[] m_frames
Constructor Detail

PwHodge

public PwHodge()
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 PsObject

setVectorField

public void setVectorField(PgElementSet domain,
                           int vfIndex)
Should be called after the viewer has been already created (e.g. in the start() method of a PjProject class).
Parameters:
domain - Reference to geometry that is base of vector field. Must be triangulation.
vfIndex - Vector field to decomposite. Should be element based.

setZeroBounds

public void setZeroBounds(boolean flag)

setZeroBoundsU

public void setZeroBoundsU(boolean flag)
Sets zero boundary condition of potential of rotation free part.

setZeroBoundsW

public void setZeroBoundsW(boolean flag)
Sets zero boundary condition of potential of divergence free part.

setAutoUpdate

public void setAutoUpdate(boolean flag)

getRotationFree

public PgVectorField getRotationFree()
Call method minimize() before using methods with this comment.

getDivergenceFree

public PgVectorField getDivergenceFree()
Call method minimize() before using methods with this comment.

getHarmonic

public PgVectorField getHarmonic()
Call method minimize() before using methods with this comment.

getPotentialU

public PgElementSet getPotentialU()
Call method minimize() before using methods with this comment.
Returns:
potential of rotation free part

getPotentialW

public PgElementSet getPotentialW()
Call method minimize() before using methods with this comment.
Returns:
potential of divergence free part

getUGraph

public PgGraph getUGraph()
Call method minimize() before using methods with this comment.
Returns:
potential of rotation free part

getWGraph

public PgGraph getWGraph()
Call method minimize() before using methods with this comment.
Returns:
potential of divergence free part

computeGradient

protected void computeGradient()

computeJGradient

protected void computeJGradient()

computeHarmonic

protected void computeHarmonic()

update

public boolean update(java.lang.Object event)
Update the class whenever a child has changed. Method is usually invoked from the children.
Overrides:
update in class PsObject
Following copied from class: jv.object.PsObject
See Also:
PsObject.setParent(PsUpdateIf), PsObject.getFather(), PsObject.addUpdateListener(PsUpdateIf)

setDisplayVisibility

public void setDisplayVisibility(int dispIndex,
                                 boolean visible)
Handling of the displays that show the vector field components and the potentials.

getDisplayVisibility

public boolean getDisplayVisibility(int dispIndex)
Handling of the displays that show the vector field components and the potentials.

getDisplay

public PvDisplayIf getDisplay(int dispIndex)

setDisplaySize

public void setDisplaySize(int dispIndex,
                           int width,
                           int height)

minimize

public void minimize()
Initiates minimization of the two energies that produce the three parts of the decomposition. As the minimization is done in seperate threads this method perhaps returns without instant effect. The update method of the parent of this PwHodge object is called with this object as argument when the computation of the vector field parts is finished.

stop

public void stop()
Stop minimization explicitly before it is completed.

close

public void close()

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Specified by:
windowClosed in interface java.awt.event.WindowListener

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Specified by:
windowOpened in interface java.awt.event.WindowListener

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Specified by:
windowClosing in interface java.awt.event.WindowListener

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Specified by:
windowActivated in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Specified by:
windowIconified in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Specified by:
windowDeiconified in interface java.awt.event.WindowListener

JavaView® v2.00.008

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