public class PwRotDiv extends PjWorkshop
Modifier and Type | Field and Description |
---|---|
static int |
EDGE_DIVERGENCE |
static int |
EDGE_DIVERGENCE_AREA |
static int |
EDGE_ROTATION |
static int |
EDGE_ROTATION_AREA |
static int |
VERTEX_DIVERGENCE |
static int |
VERTEX_DIVERGENCE_AREA |
static int |
VERTEX_DIVERGENCE_NOGAUSS |
static int |
VERTEX_ROTATION |
static int |
VERTEX_ROTATION_AREA |
static int |
VERTEX_ROTATION_NOGAUSS |
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 |
---|
PwRotDiv() |
Modifier and Type | Method and Description |
---|---|
static void |
colorTextureFromScalarField(PgElementSet surface,
java.awt.Color neg,
java.awt.Color zero,
java.awt.Color pos,
double middleVal,
double maxVal,
PdVector[] scalar)
Surface must have element textures.
|
boolean |
getColorExistentTexture() |
static PdVector[] |
getEdgeDivergence(PgElementSet surface,
int fieldInd,
PdVector[] out) |
static PdVector[] |
getEdgeDivergence(PgElementSet surface,
int fieldInd,
PdVector[] out,
boolean divArea,
boolean gaussFalse)
Computes discrete edge divergence of piecewise constant vector field.
|
static PdVector[] |
getEdgeRotation(PgElementSet surface,
int fieldInd,
PdVector[] out)
Computes discrete edge rotation of piecewise constant vector field.
|
static PdVector[] |
getEdgeRotation(PgElementSet surface,
int fieldInd,
PdVector[] out,
boolean divArea,
boolean gaussFalse)
Computes discrete edge rotation of piecewise constant vector field.
|
int |
getFieldType() |
double |
getMaximumValue() |
double |
getMinimumValue() |
static PdVector |
getVertexDivergence(PgElementSet surface,
int fieldInd,
PdVector out)
Computes discrete vertex divergence of piecewise constant vector field.
|
static PdVector |
getVertexDivergence(PgElementSet surface,
int fieldInd,
PdVector out,
boolean divArea,
boolean gaussFalse)
Computes discrete vertex divergence of piecewise constant vector field.
|
static PdVector |
getVertexRotation(PgElementSet surface,
int fieldInd,
PdVector out)
Computes discrete vertex rotation of piecewise constant vector field.
|
static PdVector |
getVertexRotation(PgElementSet surface,
int fieldInd,
PdVector out,
boolean divArea,
boolean gaussFalse)
Computes discrete vertex rotation of piecewise constant vector field.
|
static PdVector |
getVertexRotation(PgElementSet surface,
int fieldInd,
PiVector vertIndices,
PdVector out)
Compute vertex rotation only at given vertex indices
|
void |
init()
Initialize and reset project, stops the running animation if any.
|
void |
makeTexture() |
void |
setColorExistentTexture(boolean flag)
If true and geometry already has a texture, then the intensity of this
texture is used and colored.
|
void |
setFieldType(int fieldType) |
void |
setGeometry(PgGeometry geom)
Assign a geometry on which this workshop operates,
and create a backup clone of the geometry.
|
boolean |
update(java.lang.Object event)
Updates the geometry if this workshop has changed,
i.e. if the event is
this or null . |
cancel, close, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, ok, openDialog, removeGeometry, reset, 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 VERTEX_ROTATION
public static final int VERTEX_ROTATION_AREA
public static final int EDGE_ROTATION
public static final int EDGE_ROTATION_AREA
public static final int VERTEX_DIVERGENCE
public static final int VERTEX_DIVERGENCE_AREA
public static final int EDGE_DIVERGENCE
public static final int EDGE_DIVERGENCE_AREA
public static final int VERTEX_ROTATION_NOGAUSS
public static final int VERTEX_DIVERGENCE_NOGAUSS
public void init()
PjWorkshop
init
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 void setFieldType(int fieldType)
public int getFieldType()
public double getMaximumValue()
public double getMinimumValue()
public void makeTexture()
public void setColorExistentTexture(boolean flag)
public boolean getColorExistentTexture()
public static void colorTextureFromScalarField(PgElementSet surface, java.awt.Color neg, java.awt.Color zero, java.awt.Color pos, double middleVal, double maxVal, PdVector[] scalar)
public static PdVector getVertexRotation(PgElementSet surface, int fieldInd, PiVector vertIndices, PdVector out)
surface
- triangulationfieldInd
- index of element based vector field in surface
vertIndices
- array of vertex indices at which rotation shall be computedout
- output is put here if non-nullvertIndices
; reference to out
(if non-null)public static PdVector getVertexRotation(PgElementSet surface, int fieldInd, PdVector out)
public static PdVector getVertexRotation(PgElementSet surface, int fieldInd, PdVector out, boolean divArea, boolean gaussFalse)
surface
- underlying triangulationfieldInd
- index of vector field in surface
, must be element basedout
- output is put here if non-null and correct sizedivArea
- weight edge value by one over area of stargaussFalse
- false: integrate along boundary edgesout
(if given)public static PdVector[] getEdgeRotation(PgElementSet surface, int fieldInd, PdVector[] out)
public static PdVector[] getEdgeRotation(PgElementSet surface, int fieldInd, PdVector[] out, boolean divArea, boolean gaussFalse)
surface
- underlying triangulationfieldInd
- index of vector field in surface
, must be element basedout
- output is put here if non-null and correct sizedivArea
- weight edge value by one over area of adjacent elementsgaussFalse
- false: rotation at boundary edge is zeroout
(if given)public static PdVector getVertexDivergence(PgElementSet surface, int fieldInd, PdVector out)
public static PdVector getVertexDivergence(PgElementSet surface, int fieldInd, PdVector out, boolean divArea, boolean gaussFalse)
surface
- underlying triangulationfieldInd
- index of vector field in surface
, must be element basedout
- output is put here if non-null and correct sizedivArea
- weight edge value by one over area of stargaussFalse
- false: integrate along boundary edgesout
(if given)public static PdVector[] getEdgeDivergence(PgElementSet surface, int fieldInd, PdVector[] out)
public static PdVector[] getEdgeDivergence(PgElementSet surface, int fieldInd, PdVector[] out, boolean divArea, boolean gaussFalse)
surface
- underlying triangulationfieldInd
- index of vector field in surface
, must be element basedout
- output is put here if non-null and correct sizedivArea
- weight edge value by one over area of adjacent elementsgaussFalse
- false: rotation at boundary edge is zeroout
(if given)public boolean update(java.lang.Object event)
PjWorkshop
this
or null
.
Also propagates update() to superclass with the original argument event.
Some subclasses may register themselves as update listener of the geometry of this workshop. In order to prevent an update loop, this method safely uses isUpdateSender() when updating the geometry.
update
in interface PsUpdateIf
update
in class PjWorkshop
event
- sender of this update.PsObject.setParent(PsUpdateIf)
,
PsObject.getFather()
,
PsObject.addUpdateListener(PsUpdateIf)
"