spis.Vol.VolField
Class ScalVolField

java.lang.Object
  extended byspis.Vol.VolField.VolField
      extended byspis.Vol.VolField.ScalVolField
All Implemented Interfaces:
java.io.Serializable

public class ScalVolField
extends VolField
implements java.io.Serializable

Class Name : ScalVolField (Scalar Volume Field)
Project ref : SPIS project
File name : ScalVolField.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 : Scalar Volume 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

Constructor Summary
ScalVolField(ScalVolField f)
          Copy constructor
ScalVolField(VolMesh volMesh, Centring cent)
          Default constructor, a new Table is allocated.
ScalVolField(VolMesh volMesh, Centring centring, float value)
          Constructor initialising the field to a constant value.
ScalVolField(VolMesh volMesh, Centring cent, FloatScalTable values)
          Constructor with Table provided. .
ScalVolField(VolMesh volMesh, Centring centring, ScalFunctionOfVect f)
          Constructor defining the field from a passed scalar function.
 
Method Summary
 void add(ScalVolField f)
          Adds another field to this one (on the spot)
 void applyFunc(ScalFunctionOfScal f)
          Applies a function to this field (on the spot)
 FloatScalTable buildExternIndexedTable()
          Builds and returns the values of the field at a the mesh elements it is defined on (nodes/cells/...depending on centring), using external indexing of elements (relevent only for node-centred fields).
 void computeField(PointList pl, Table values)
          Provides the values of the field at a list of arbitrary locations PointList (particle positions).
 void divide(ScalVolField f)
          Multiplies this field by another field (on the spot)
 void equalFunc(ScalFunctionOfScal f, ScalVolField x)
          Applies a function to the argument field and affects the result to this field.
 FloatScalTable getTable()
          Returns the values of the field at a the mesh elements it is defined on (nodes/cells/...depending on centring).
 void linComb(float a1, ScalVolField f, float a2)
          Performs the following linear comination on this field: this = a1 this + a2 f (on the spot)
 void mapToSurfField(ScalSurfField sf)
           
 void mult(float x)
          Multiplies this field by a scalar (on the spot)
 void mult(ScalVolField f)
          Multiplies this field by another field (on the spot)
 void set(float value)
          Sets this field to a constant value
 void set(ScalVolField inField)
          Sets this field to the same local values as the passed filed (copies the values).
 void setTable(FloatScalTable values)
          Sets the field at the mesh elements it is defined on (nodes/cells/...depending on centring).
 void substract(ScalVolField f)
          Substract another field from this one (on the spot)
 
Methods inherited from class spis.Vol.VolField.VolField
checkDim, checkSameCentring, getCentring, getName, getTime, getVm, setName, setTime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScalVolField

public ScalVolField(VolMesh volMesh,
                    Centring cent)
Default constructor, a new Table is allocated.


ScalVolField

public ScalVolField(VolMesh volMesh,
                    Centring cent,
                    FloatScalTable values)
Constructor with Table provided. .
No copies done, pointing only.


ScalVolField

public ScalVolField(VolMesh volMesh,
                    Centring centring,
                    float value)
Constructor initialising the field to a constant value.


ScalVolField

public ScalVolField(VolMesh volMesh,
                    Centring centring,
                    ScalFunctionOfVect f)
Constructor defining the field from a passed scalar function.


ScalVolField

public ScalVolField(ScalVolField f)
Copy constructor

Method Detail

mult

public void mult(ScalVolField f)
Multiplies this field by another field (on the spot)

Specified by:
mult in class VolField

mult

public void mult(float x)
Multiplies this field by a scalar (on the spot)

Specified by:
mult in class VolField

divide

public void divide(ScalVolField f)
Multiplies this field by another field (on the spot)

Specified by:
divide in class VolField

add

public void add(ScalVolField f)
Adds another field to this one (on the spot)


substract

public void substract(ScalVolField f)
Substract another field from this one (on the spot)


linComb

public void linComb(float a1,
                    ScalVolField f,
                    float a2)
Performs the following linear comination on this field: this = a1 this + a2 f (on the spot)


applyFunc

public void applyFunc(ScalFunctionOfScal f)
Applies a function to this field (on the spot)


equalFunc

public void equalFunc(ScalFunctionOfScal f,
                      ScalVolField x)
Applies a function to the argument field and affects the result to this field.


set

public void set(float value)
Sets this field to a constant value


set

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


computeField

public void computeField(PointList pl,
                         Table values)
Provides the values of the field at a list of arbitrary locations PointList (particle positions).
The result table val must be of the same type as the field, i.e. scalar here.

Specified by:
computeField in class VolField
See Also:
EField#computeField(PointList, Table)

mapToSurfField

public void mapToSurfField(ScalSurfField sf)

getTable

public FloatScalTable getTable()
Returns the values of the field at a the mesh elements it is defined on (nodes/cells/...depending on centring).


buildExternIndexedTable

public FloatScalTable buildExternIndexedTable()
Builds and returns the values of the field at a the mesh elements it is defined on (nodes/cells/...depending on centring), using external indexing of elements (relevent only for node-centred fields).
If irrelevent (not node-centred, simply returns the regular table).
Warning: returning a new-built table or the regular table makes the consequences of their modification different: no effect on the present ScalVolField for a new-built table, but a consequence for the regular table.


setTable

public void setTable(FloatScalTable values)
Sets the field at the mesh elements it is defined on (nodes/cells/...depending on centring).
No copy, pointing only.