spis.Surf.SurfField
Class VectSurfField

java.lang.Object
  extended byspis.Surf.SurfField.SurfField
      extended byspis.Surf.SurfField.VectSurfField
All Implemented Interfaces:
java.io.Serializable

public class VectSurfField
extends SurfField
implements java.io.Serializable

Class Name : VectSurfField
Project ref : SPIS project
File name : VectSurfField.java
File type : class
Copyright : ONERA, 2 Av. E. Belin, 31055 Toulouse cedex, France http://www.onecert.fr
Status : under development
Creation : 25/08/2003
Modification :

Description : Vectorial Surface Field class.

Versions and anomalies correction :

Version numberAuthor (name, e-mail) Corrections/Modifications
0.1 JF Roussel, roussel@onecert.frCreation


Version:
0.1
Author:
JF Roussel
See Also:
Serialized Form

Field Summary
private  VectTable val
          Field values
 
Fields inherited from class spis.Surf.SurfField.SurfField
cent, name, sm, time
 
Constructor Summary
VectSurfField(SurfMesh surfMesh, Centring centring, VectFunctionOfVect f)
          Constructor defining the field from a passed function.
VectSurfField(SurfMesh surfMesh, Centring centring, VectTable values)
          Basic constructor, defining the table.
VectSurfField(VectSurfField f)
          Copy constructor
 
Method Summary
 void add(SurfField field)
          Increments this field by another vector field (on the spot), which must also be a VectSurfField
 ScalSurfField computeScalProd(float[] vect)
          Computes the scalar product with a fixed vector and returns the result
 ScalSurfField computeScalProd(VectSurfField vectField)
          Computes the scalar product with another vector field and returns the result
 void divide(ScalSurfField scalField)
          Divides this field by another scalar field (on the spot)
 SurfField getSimilar()
          returns a similar SurfField: same subtype and same Centring
 VectTable getTable()
          Provides the values of the field at a the mesh elements it is defined on (surfaces/edges/nodes depending on centring).
 boolean isOfSameSubtype(SurfField f)
          tests whether the passed field is of similar subtype
 boolean isZero()
          Tests whether a Field has zero value (all over the mesh).
 void linComb(float a1, SurfField field, float a2)
          Computes the linear combination a1*this + a2*field and affects it to this field (field must also be a VectSurfField)
 void mult(float factor)
          Multiplies this field by a constant factor (on the spot)
 void mult(ScalSurfField scalField)
          Multiplies this field by another scalar field (on the spot)
 void mult(ScalSurfField scalField, float factor)
          Multiplies this field by another scalar field and a constant factor (on the spot)
 void normalise()
          normalises the vectors (to length 1)
 void reset()
          Sets this field to zero value
 void set(float[] value)
          Sets this field to a uniform value
 void set(VectSurfField inField)
          Sets this field to the same local values as the passed filed (copies the values).
 void substract(SurfField field)
          Decrements this field by another vector field (on the spot), which must also be a VectSurfField
 
Methods inherited from class spis.Surf.SurfField.SurfField
checkDim, checkSameMesh, checkSameMeshAndCentring, checkSameSubtype, getCentring, getName, getSm, getTime, setName, setTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

val

private VectTable val
Field values

Constructor Detail

VectSurfField

public VectSurfField(SurfMesh surfMesh,
                     Centring centring,
                     VectTable values)
Basic constructor, defining the table.
No copies done, pointing only.
This is th default constructor since contrarily to ScalSurfFields the sub type of VectTable must be know and only constructor passing a VectTable (hence a VeloVectTable or a SpaceVectTable) can be written.


VectSurfField

public VectSurfField(SurfMesh surfMesh,
                     Centring centring,
                     VectFunctionOfVect f)
Constructor defining the field from a passed function.


VectSurfField

public VectSurfField(VectSurfField f)
Copy constructor

Method Detail

mult

public void mult(float factor)
Multiplies this field by a constant factor (on the spot)

Specified by:
mult in class SurfField

mult

public void mult(ScalSurfField scalField,
                 float factor)
Multiplies this field by another scalar field and a constant factor (on the spot)

Specified by:
mult in class SurfField

mult

public void mult(ScalSurfField scalField)
Multiplies this field by another scalar field (on the spot)

Specified by:
mult in class SurfField

divide

public void divide(ScalSurfField scalField)
Divides this field by another scalar field (on the spot)

Specified by:
divide in class SurfField

add

public void add(SurfField field)
Increments this field by another vector field (on the spot), which must also be a VectSurfField

Specified by:
add in class SurfField

substract

public void substract(SurfField field)
Decrements this field by another vector field (on the spot), which must also be a VectSurfField

Specified by:
substract in class SurfField

linComb

public void linComb(float a1,
                    SurfField field,
                    float a2)
Computes the linear combination a1*this + a2*field and affects it to this field (field must also be a VectSurfField)

Specified by:
linComb in class SurfField

normalise

public void normalise()
normalises the vectors (to length 1)


computeScalProd

public ScalSurfField computeScalProd(VectSurfField vectField)
Computes the scalar product with another vector field and returns the result

Parameters:
vectField -
Returns:

computeScalProd

public ScalSurfField computeScalProd(float[] vect)
Computes the scalar product with a fixed vector and returns the result

Returns:

getSimilar

public SurfField getSimilar()
returns a similar SurfField: same subtype and same Centring

Specified by:
getSimilar in class SurfField

isOfSameSubtype

public boolean isOfSameSubtype(SurfField f)
tests whether the passed field is of similar subtype

Specified by:
isOfSameSubtype in class SurfField

set

public void set(float[] value)
Sets this field to a uniform value


set

public void set(VectSurfField inField)
Sets this field to the same local values as the passed filed (copies the values).
Same vectDim, mesh and centring requested (checked).


reset

public void reset()
Sets this field to zero value

Specified by:
reset in class SurfField

getTable

public VectTable getTable()
Provides the values of the field at a the mesh elements it is defined on (surfaces/edges/nodes depending on centring).


isZero

public boolean isZero()
Tests whether a Field has zero value (all over the mesh).
NB: only "false" can be returned in the current implementation, but uniformly zero Fields or Tables will certainly be implemented later on, and solvers must use that to improve efficiency.