spis.Vol.VolField
Class VolField

java.lang.Object
  extended byspis.Vol.VolField.VolField
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ScalVolField, VectVolField

public abstract class VolField
extends java.lang.Object
implements java.io.Serializable

Class Name : VolField (generic Volume Field class)
Project ref : SPIS project
File name : VolField.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 : general abstract Volume Field class.
All Volume Field classes must be derived from this class. Some specific data are only to be defined in the derived classes. The abstract methods defined here must be implemented in the derived classes.
An important polymorphism is requested (4 different directions of specialisation):
- 3D/2D/1D: transparent for the Field, this polymorphism is taken into account at Mesh level
- scalar/vector/vector_stored_as_potential: implemented by class derivation
- centring (values on cells/surfaces/edges/nodes/) and discretised/analytical field: two simpler polymorphisms handled through a centring parameter for simplicity sake
NB: it must be noted that the polymorphism of unstructured or structured meshes, i.e. here of fields living on an unstructured or a structured mesh, was not even mentioned since it is transparent for the field, similarly to the 3D/2D/1D polymorphism. All fields are simply stored as 1D tables and the 3D/2D/1D and structured/unstructured polymorphisms are treated at solver level (methods of the VolMesh class). Solvers on structured meshes can chose to map the 1D storage of a field onto a more intuitive 3D storage (the cost of the mapping is small, or may even be zero if the 3D/1D storage in memory is kept identical).

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
VolField(VolMesh volMesh, Centring centring)
          Default constructor.
 
Method Summary
 void checkDim(Table table)
          Checks the dimension of the passed table is the right one for the mesh and centring of this field
 void checkSameCentring(VolField f)
          checks that both fields have the same centring
abstract  void computeField(PointList pl, Table val)
          Provides the values of the field at a list of arbitrary locations PointList (particle positions).
abstract  void divide(ScalVolField f)
          Multiplies this field by another field (on the spot)
 Centring getCentring()
           
 java.lang.String getName()
           
 float getTime()
           
 VolMesh getVm()
           
abstract  void mult(float x)
          Multiplies this field by a scalar (on the spot)
abstract  void mult(ScalVolField f)
          Multiplies this field by another field (on the spot)
 void setName(java.lang.String string)
           
 void setTime(float f)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VolField

public VolField(VolMesh volMesh,
                Centring centring)
Default constructor.

Method Detail

computeField

public abstract void computeField(PointList pl,
                                  Table val)
Provides the values of the field at a list of arbitrary locations PointList (particle positions).
In the list of points PointList, more than the position may be used , as e.g. the index of the cell containing the point.
The result table val must be of the same type as the field (vector/scalar/…).
This routine basically performs calls to the Interpolate or Gradient routines of VolMesh, depending of the specialisation of the VolField

See Also:
EField#computeField(PointList, Table)

checkSameCentring

public void checkSameCentring(VolField f)
checks that both fields have the same centring


checkDim

public void checkDim(Table table)
Checks the dimension of the passed table is the right one for the mesh and centring of this field


mult

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


mult

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


divide

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


getVm

public VolMesh getVm()

getCentring

public Centring getCentring()

getName

public java.lang.String getName()
Returns:
field name (mostly used for post-processing)

getTime

public float getTime()
Returns:
time of field creation (mostly used for post-processing)

setName

public void setName(java.lang.String string)
Parameters:
string - field name (mostly used for post-processing)

setTime

public void setTime(float f)
Parameters:
f - time of field creation (mostly used for post-processing)