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

Class PwScalarField

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


    public class PwScalarField
    extends PjWorkshop
    Compute scalar fields on a given geometry. Each field is registered as vector field with vector dimension 1 with the given geometry.
    See Also:
    Serialized Form
    Author:
    Konrad Polthier
    Version:
    11.05.10, 1.10 revised (mn) Added support for element based scalar functions.
    14.11.08, 1.30 revised (kh) Workshop can now be used to analyze fields that have been created outside of the workshop.
    02.02.05, 1.20 revised (kh) Some adjustments to the update of the sliders, coloring modified.
    12.05.04, 1.10 revised (kh) Added coloring of surface and computation of gradient.
    29.02.04, 1.00 created (kp)
    • Constructor Detail

      • PwScalarField

        public PwScalarField()
        Constructor.
    • 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
      • reset

        public void reset()
        Reset workshop and geometry to original state.
        Overrides:
        reset in class PjWorkshop
      • cancel

        public void cancel()
        Description copied from class: PjWorkshop
        Cancel operation of this workshop by resetting the assigned geometry, and finally close this workshop.

        If necessary, the duplicate of the original geometry is restored into the geometry. The update method of the geometry is called.

        Overrides:
        cancel in class PjWorkshop
      • ok

        public void ok()
        Description copied from class: PjWorkshop
        Accept current version of the geometry as new version. Close workshop. The copy of the original geometry is ignored.

        Implementation in this class calls close().

        Overrides:
        ok in class PjWorkshop
      • showOnlyGrayLevels

        public void showOnlyGrayLevels(boolean gl)
        The workshop and can assign colors to the surface according to the value of the scalar field. Here one can switch between full colors and only grey-levels. If set to true grey-levels are shown, it shows full colors if set to false.
      • isShowingOnlyGrayLevels

        public boolean isShowingOnlyGrayLevels(boolean gl)
        The workshop and can assign colors to the surface according to the value of the scalar field. One can switch between full colors and only grey-levels. True - greylevels, false - full colors.
      • setColorMin

        public void setColorMin(double value)
        Sets minimal color value.
        Parameters:
        value - the color value to be set.
      • getColorMin

        public double getColorMin()
        Get minimal color value.
        Returns:
        value of the color.
      • setColorMax

        public void setColorMax(double value)
        Sets maximal color value.
        Parameters:
        value - the color value to be set.
      • getColorMax

        public double getColorMax()
        Get maximal color value.
      • getScalarType

        public int getScalarType()
        Get type of current scalar field.
      • setScalarType

        public void setScalarType(int type)
        Set type of current scalar field.
      • setAdjustColoring

        public void setAdjustColoring(boolean flag)
        Indicate whether to adjust the color sliders when computing a new scalar field.
      • getAdjustColoring

        public boolean getAdjustColoring()
        Get information, whether color sliders are adjusted for new scalar fields.
      • getScalarName

        public java.lang.String getScalarName(int type)
        Get name of given scalar field type.
      • computeScalar

        public boolean computeScalar()
        Compute color of surface and vertices depending on current color criteria.
      • computeScalar

        public boolean computeScalar(PgElementSet geom,
                                     int type)
        Compute color of surface and vertices depending on current color criteria.
      • array2ScalarField

        public static PgVectorField array2ScalarField(PgPointSet domain,
                                                      double[] func,
                                                      PgVectorField scalarField)
        Method converts a function given as an array of doubles into a scalar field (PgVectorField with dimension of vectors equal one) on the specified domain.
        Parameters:
        domain - domain of the function resp. scalar field
        func - double array that specifies a function value for each vertex of the domain
        scalarField - scalar field that will be filled, this argument can be null
        Since:
        JavaView 3.20.002
        Version:
        21.04.04, 1.00 created (kh)
      • scalarField2Array

        public static double[] scalarField2Array(PgVectorField scalarField,
                                                 double[] func)
        Method converts a scalar field into an array of doubles. The i-th element of the array get the value of the scalar field at the i-th vertex of the domain.
        Parameters:
        func - double array that will be filled, this argument can be null
        scalarField - scalar field that specifies a function value for each vertex of its domain
        Since:
        JavaView 3.20.002
        Version:
        21.04.04, 1.00 created (kh)
      • colorMapGray

        public static java.awt.Color colorMapGray(double d)
        Maps (0,1) onto a Color using only gray levels.
      • colorMap

        public static java.awt.Color colorMap(double d)
        Maps (0,1) onto a Color, starting from white to red.
"JavaView? v5.03.003"

"

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

Ads help maintain this website.