Documentation of 'jvx.vector.PwRotDiv' Java class
PwRotDiv ("JavaView Reference Manual")
"JavaView? v5.03.003"
jvx.vector

Class PwRotDiv

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, PsUpdateIf, PjWorkshopIf


    public class PwRotDiv
    extends PjWorkshop
    This can be used to color an element set or a texture on an element set with respect to certain scalar fields such as rotation and divergence of element based vector fields.
    It cannot yet be used from other classes, though some public (but for now uncommented) methods may prove useful such as computation of the earlier mentioned scalar fields.
    Since:
    JavaView 2.48.005
    See Also:
    Serialized Form
    Author:
    Eike Preuss
    Version:
    09.12.06, 2.00 revised (kp) Moved to jvx.vector from jvx.geom.
    17.06.03, 1.10 revised (ep) Removed createDualElementSet. Use PwModel.dual instead.
    18.12.02, 1.01 revised (ep) Removed some unused things.
    17.12.02, 1.00 created (ep)
    • Constructor Detail

      • PwRotDiv

        public PwRotDiv()
    • Method Detail

      • init

        public void init()
        Description copied from class: PjWorkshop
        Initialize and reset project, stops the running animation if any. Does not reset any registered display nor geometry. They must be reset individually in each subclass.
        Overrides:
        init in class PjWorkshop
      • setGeometry

        public void setGeometry(PgGeometry geom)
        Description copied from class: PjWorkshop
        Assign a geometry on which this workshop operates, and create a backup clone of the geometry. The backup geometry is restored if the workshop is canceled.

        Subclasses frequently overwrite this method but are advised to call this method.

        Specified by:
        setGeometry in interface PjWorkshopIf
        Overrides:
        setGeometry in class PjWorkshop
        Parameters:
        geom - the workshop modifies this geometry.
      • setFieldType

        public void setFieldType(int fieldType)
      • getFieldType

        public int getFieldType()
      • getMaximumValue

        public double getMaximumValue()
      • getMinimumValue

        public double getMinimumValue()
      • makeTexture

        public void makeTexture()
      • setColorExistentTexture

        public void setColorExistentTexture(boolean flag)
        If true and geometry already has a texture, then the intensity of this texture is used and colored.
      • getColorExistentTexture

        public boolean getColorExistentTexture()
      • colorTextureFromScalarField

        public 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. this method is beta and subject to change! Use at your own risk!
      • getVertexRotation

        public static PdVector getVertexRotation(PgElementSet surface,
                                                 int fieldInd,
                                                 PiVector vertIndices,
                                                 PdVector out)
        Compute vertex rotation only at given vertex indices
        Parameters:
        surface - triangulation
        fieldInd - index of element based vector field in surface
        vertIndices - array of vertex indices at which rotation shall be computed
        out - output is put here if non-null
        Returns:
        array of rotation values in same order as in vertIndices; reference to out (if non-null)
      • getVertexRotation

        public static PdVector getVertexRotation(PgElementSet surface,
                                                 int fieldInd,
                                                 PdVector out,
                                                 boolean divArea,
                                                 boolean gaussFalse)
        Computes discrete vertex rotation of piecewise constant vector field.
        Parameters:
        surface - underlying triangulation
        fieldInd - index of vector field in surface, must be element based
        out - output is put here if non-null and correct size
        divArea - weight edge value by one over area of star
        gaussFalse - false: integrate along boundary edges
        Returns:
        one PdVector per element that contains the edge values; same as out (if given)
      • getEdgeRotation

        public static PdVector[] getEdgeRotation(PgElementSet surface,
                                                 int fieldInd,
                                                 PdVector[] out,
                                                 boolean divArea,
                                                 boolean gaussFalse)
        Computes discrete edge rotation of piecewise constant vector field.
        Parameters:
        surface - underlying triangulation
        fieldInd - index of vector field in surface, must be element based
        out - output is put here if non-null and correct size
        divArea - weight edge value by one over area of adjacent elements
        gaussFalse - false: rotation at boundary edge is zero
        Returns:
        one PdVector per element that contains the edge values; same as out (if given)
      • getVertexDivergence

        public static PdVector getVertexDivergence(PgElementSet surface,
                                                   int fieldInd,
                                                   PdVector out,
                                                   boolean divArea,
                                                   boolean gaussFalse)
        Computes discrete vertex divergence of piecewise constant vector field.
        Parameters:
        surface - underlying triangulation
        fieldInd - index of vector field in surface, must be element based
        out - output is put here if non-null and correct size
        divArea - weight edge value by one over area of star
        gaussFalse - false: integrate along boundary edges
        Returns:
        one PdVector per element that contains the edge values; same as out (if given)
      • getEdgeDivergence

        public static PdVector[] getEdgeDivergence(PgElementSet surface,
                                                   int fieldInd,
                                                   PdVector[] out,
                                                   boolean divArea,
                                                   boolean gaussFalse)
        Computes discrete edge divergence of piecewise constant vector field.
        Parameters:
        surface - underlying triangulation
        fieldInd - index of vector field in surface, must be element based
        out - output is put here if non-null and correct size
        divArea - weight edge value by one over area of adjacent elements
        gaussFalse - false: rotation at boundary edge is zero
        Returns:
        one PdVector per element that contains the edge values; same as out (if given)
      • update

        public boolean update(java.lang.Object event)
        Description copied from class: PjWorkshop
        Updates the geometry if this workshop has changed, i.e. if the event is 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.

        Specified by:
        update in interface PsUpdateIf
        Overrides:
        update in class PjWorkshop
        Parameters:
        event - sender of this update.
        Returns:
        true if update was correctly handled by superclass.
        See Also:
        PsObject.setParent(PsUpdateIf), PsObject.getFather(), PsObject.addUpdateListener(PsUpdateIf)
"JavaView? v5.03.003"

"

The software JavaView? is copyright protected. All Rights Reserved.
"

You see the box below because you did not login.