|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectspis.Surf.SurfField.SurfField
Class Name : SurfField (generic Surface Field class)
Project ref : SPIS project
File name : SurfField.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 Surface Field class.
All Surface 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.
Similarly to volume fields, an important polymorphism is requested:
- 3D/2D/1D: transparent for the Field, this polymorphism is taken into account at Mesh level
- scalar/vector: implemented by class derivation
- centring (values on surfaces/edges/nodes):
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 surface 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 SurfMesh 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 number | Author (name, e-mail) | Corrections/Modifications |
0.1 | JF Roussel, roussel@onecert.fr | Creation |
Field Summary | |
protected Centring |
cent
centring of the field (values on cells/surfaces/edges/nodes) |
protected java.lang.String |
name
Name of the filed (mostly used for post- processing since the name is carried by the variable in the solver, hence non mandatory field internally to NUM) |
protected SurfMesh |
sm
Surface Mesh on which the field "lives" |
protected float |
time
Time at which this field has been generated (mostly used for post-processing, hence non mandatory field internally to NUM) |
Constructor Summary | |
SurfField(SurfMesh surfMesh,
Centring centring)
Default constructor, centring and volume mesh must be defined |
Method Summary | |
abstract void |
add(SurfField field)
Increments this field by another field (on the spot), which must be of the same subtype |
void |
checkDim(Table table)
Checks the dimension of the passed table is the right one for the mesh and centring of this field |
void |
checkSameMesh(SurfField scalField)
Checks the passed field has same surface mesh. |
void |
checkSameMeshAndCentring(SurfField scalField)
Checks the passed field has same surface mesh and centring. |
void |
checkSameSubtype(SurfField field)
Decrements this field by another field (on the spot), which must indeed be a scalar field |
abstract void |
divide(ScalSurfField scalField)
Divides this field by another scalar field (on the spot) |
Centring |
getCentring()
returns SurfField Centring |
java.lang.String |
getName()
|
abstract SurfField |
getSimilar()
returns a similar SurfField: same subtype and same Centring |
SurfMesh |
getSm()
returns the SurfMesh this SurfField lives on |
float |
getTime()
|
abstract boolean |
isOfSameSubtype(SurfField f)
tests whether the passed field is of similar subtype |
abstract void |
linComb(float a1,
SurfField field,
float a2)
Computes the linear combination a1*this + a2*this and affects it to this field, (the SurfField field must be of same subtype as this) |
abstract void |
mult(float factor)
Multiplies this field by a constant factor (on the spot) |
abstract void |
mult(ScalSurfField scalField)
Multiplies this field by another scalar field (on the spot) |
abstract void |
mult(ScalSurfField scalField,
float factor)
Multiplies this field by another scalar field and a constant factor (on the spot) |
abstract void |
reset()
Sets this field to zero value |
void |
setName(java.lang.String string)
|
void |
setTime(float f)
|
abstract void |
substract(SurfField field)
Decrements this field by another field (on the spot), which must be of the same subtype |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected SurfMesh sm
protected Centring cent
protected java.lang.String name
protected float time
Constructor Detail |
public SurfField(SurfMesh surfMesh, Centring centring)
Method Detail |
public abstract void mult(float factor)
public abstract void mult(ScalSurfField scalField, float factor)
public abstract void mult(ScalSurfField scalField)
public abstract void divide(ScalSurfField scalField)
public abstract void add(SurfField field)
public abstract void substract(SurfField field)
public abstract void linComb(float a1, SurfField field, float a2)
public void checkSameMeshAndCentring(SurfField scalField)
public void checkSameMesh(SurfField scalField)
public void checkDim(Table table)
public abstract SurfField getSimilar()
public abstract boolean isOfSameSubtype(SurfField f)
public void checkSameSubtype(SurfField field)
public abstract void reset()
public Centring getCentring()
public SurfMesh getSm()
public java.lang.String getName()
public float getTime()
public void setName(java.lang.String string)
string
- field name (mostly used for post-processing)public void setTime(float f)
f
- time of field creation (mostly used for post-processing)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |