public class PwHodge extends PjWorkshop
Modifier and Type | Field and Description |
---|---|
static int |
DETECT_SADDLES |
static int |
DETECT_SINKS_SOURCES |
static int |
DETECT_VORTICES |
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
MODE_BUG, MODE_STANDARD, MODE_VALIDATE
Constructor and Description |
---|
PwHodge() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Removes geometry and displays from workshop, and closes super workshop.
|
void |
decompose()
Initiates minimization of the two energies that produce the three parts of the decomposition.
|
int |
getDetectionFlags()
Compare the DETECT_... constants.
|
PvDisplayIf |
getDisplay(int dispIndex)
Returns one of the three displays: rotation-free, divergence-free and harmonic component
and their features.
|
PgVectorField |
getDivergenceFree()
Call method
minimize() before using this method. |
PgVectorField |
getHarmonic()
Call method
minimize() before using this method. |
PgElementSet |
getPotentialU()
Call method
minimize() before using this method. |
PgElementSet |
getPotentialW()
Call method
minimize() before using this method. |
PgVectorField |
getRotationFree()
Call method
minimize() before using this method. |
PgSurfaceGraph |
getUGraph()
Call method
minimize() before using this method. |
int |
getVectorFieldIndex()
Get index of vector field of domain geometry.
|
boolean |
getVisibleComponent(int index) |
boolean |
getVisibleFeat(int index) |
boolean |
getVisibleGraph(int index) |
PgSurfaceGraph |
getWGraph()
Call method
minimize() before using this method. |
boolean |
getZeroBoundsU() |
boolean |
getZeroBoundsV() |
static PgPointSet |
getZExtrema(PgElementSet surface,
java.awt.Color min,
java.awt.Color other,
java.awt.Color max,
double eps)
Extract local extreme with respect to z-direction and return as new point set.
|
void |
init()
Initialize and reset project, stops the running animation if any.
|
boolean |
isEnabledAutoDecompose()
Determines if automatic Hodge decomposition on updates of geometry is enabled.
|
boolean |
isShowingDisplay(int dispIndex)
Handling of the displays that show the vector field components and the potentials.
|
void |
removeGeometry()
Remove the assigned geometry and its backup clone.
|
void |
reset()
TODO: Not implemented yet.
|
void |
selectVectorField(int vfIndex)
Selects a vector field of the underlying domain.
|
void |
setDetectionFlags(int flag)
Sets which features to include in feature detection.
|
void |
setEnabledAutoDecompose(boolean flag)
Automatically compute Hodge decomposition on updates of geometry.
|
void |
setGeometry(PgGeometry geom)
Assign a geometry on which this workshop operates,
and create a backup clone of the geometry.
|
void |
setIconScale(double value)
Scales the icons that are drawn for sinks, sources, vortices and saddles.
|
void |
setVisibleComponent(int index,
boolean visible) |
void |
setVisibleFeat(int index,
boolean visible) |
void |
setVisibleGraph(int index,
boolean visible) |
void |
setZeroBounds(boolean flag)
Whether the two resulting potentials should be zero on the boundary.
|
void |
setZeroBoundsU(boolean flag)
Sets zero boundary condition of potential of rotation free part
(so this vector field is tangential to boundary edges if set).
|
void |
setZeroBoundsV(boolean flag)
Sets zero boundary condition of potential of divergence free part
(so this part is orthogonal to boundary edges if set).
|
void |
showDisplay(int dispIndex,
boolean bVisible)
Handling of the displays that show the vector field components and the potentials.
|
void |
stop()
Stop minimization explicitly before it is completed.
|
boolean |
update(java.lang.Object event)
Update this workshop when a depend child changes.
|
cancel, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, ok, openDialog, setDisplay, setDisplays, setModal, setMode, setStandalone, setViewer
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFather, getName, setParent
public static final int DETECT_SINKS_SOURCES
public static final int DETECT_VORTICES
public static final int DETECT_SADDLES
public void init()
PjWorkshop
init
in class PjWorkshop
public void close()
close
in class PjWorkshop
public void reset()
reset
in class PjWorkshop
public void removeGeometry()
PjWorkshop
removeGeometry
in class PjWorkshop
public void setGeometry(PgGeometry geom)
PjWorkshop
Subclasses frequently overwrite this method but are advised to call this method.
setGeometry
in interface PjWorkshopIf
setGeometry
in class PjWorkshop
geom
- the workshop modifies this geometry.public boolean update(java.lang.Object event)
update
in interface PsUpdateIf
update
in class PjWorkshop
event
- sender of this update.PsObject.setParent(PsUpdateIf)
,
PsObject.getFather()
,
PsObject.addUpdateListener(PsUpdateIf)
public int getVectorFieldIndex()
public void selectVectorField(int vfIndex)
vfIndex
- Select element based vector field of current geometrypublic void setZeroBounds(boolean flag)
public void setZeroBoundsU(boolean flag)
public boolean getZeroBoundsU()
public void setZeroBoundsV(boolean flag)
public boolean getZeroBoundsV()
public boolean isEnabledAutoDecompose()
public void setEnabledAutoDecompose(boolean flag)
flag
- true to enable automatic Hodge decompositionpublic PgVectorField getRotationFree()
minimize()
before using this method.public PgVectorField getDivergenceFree()
minimize()
before using this method.public PgVectorField getHarmonic()
minimize()
before using this method.public PgElementSet getPotentialU()
minimize()
before using this method.public PgElementSet getPotentialW()
minimize()
before using this method.public PgSurfaceGraph getUGraph()
minimize()
before using this method.public PgSurfaceGraph getWGraph()
minimize()
before using this method.public void setVisibleComponent(int index, boolean visible)
public boolean getVisibleComponent(int index)
public void setVisibleGraph(int index, boolean visible)
public boolean getVisibleGraph(int index)
public void setVisibleFeat(int index, boolean visible)
public boolean getVisibleFeat(int index)
public void setDetectionFlags(int flag)
flag
- binary flag; combine the DETECT_... constants with binary OR operator.public int getDetectionFlags()
setDetectionFlags(int)
public void setIconScale(double value)
value
- default is 1.public boolean isShowingDisplay(int dispIndex)
public void showDisplay(int dispIndex, boolean bVisible)
public PvDisplayIf getDisplay(int dispIndex)
dispIndex
- 0-2public void decompose()
A call of minimize() will terminate instantly, if there is already an
unterminated minimization process running at the moment!!! To ensure that
a new minimization is initiated, call stop()
first
and then minimize()
!
public void stop()
update(this)
needs to be called to inform info panel.public static PgPointSet getZExtrema(PgElementSet surface, java.awt.Color min, java.awt.Color other, java.awt.Color max, double eps)
"