jabble
Class Slice

java.lang.Object
  extended by jabble.Slice
All Implemented Interfaces:
java.io.Serializable

public class Slice
extends java.lang.Object
implements java.io.Serializable

A slice in time with its Grid and Fields.

See Also:
Serialized Form

Constructor Summary
Slice(EquationSet equation)
          Creates a new Slice for the given equation, and initializes the fields in the slice based on the fields and grid defined by the equation.
Slice(Grid grid, EquationSet equation)
          Creates a Slice for the given equation and the given Grid (not the one the equation set is defined on).
Slice(Slice slice)
          Creates a new slice by copying the given slice, including copying the values of the fields.
 
Method Summary
 void addField(Field f)
          Includes in the given field in the slice.
 void addIndicator(java.lang.String name, Indicator indicator)
          Adds an indicator that should be computed as part of the Slice.
 java.util.List<Field> getCoordinateFields()
          Returns the list of fields associated to the coordinates, in the order in which the coordinates where defined.
 java.util.List<Field> getDifferentialFields()
          Returns the list of fields associated to the coordinate differentials, in the order in which the coordinates where defined.
 EquationSet getEquationSet()
          Returns the equation set for which the Slice is defined.
 Field getField(java.lang.String name)
          Returns the field that corresponds to the given name.
 java.util.Set<java.lang.String> getFieldNames()
          Returns the names of the fields that are included in the slice.
 Grid getGrid()
          Returns the grid on which the slice is defined.
 Indicator getIndicator(java.lang.String name)
          Returns the indicator with the given name.
 java.util.Set<java.lang.String> getIndicatorNames()
          Returns the names of the indicators defined on the slice.
 Field getScalarField(java.lang.String name)
           
 java.util.Set<java.lang.String> getScalarFields()
           
 Field[][] getTensorField(java.lang.String tensorName)
           
 java.util.Set<java.lang.String> getTensorFields()
           
 Field[] getVectorField(java.lang.String vectorName)
           
 java.util.Set<java.lang.String> getVectorFields()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Slice

public Slice(Grid grid,
             EquationSet equation)
Creates a Slice for the given equation and the given Grid (not the one the equation set is defined on). New fields in the Slice based on the fields and coordinates in the equation.

Parameters:
grid - the grid on which the slice and all fields should be defined on
equation - the equation to use as the definition

Slice

public Slice(EquationSet equation)
Creates a new Slice for the given equation, and initializes the fields in the slice based on the fields and grid defined by the equation.

Parameters:
equation - the equation to use as the definition

Slice

public Slice(Slice slice)
Creates a new slice by copying the given slice, including copying the values of the fields.

Parameters:
slice - the slice from which to copy
Method Detail

addField

public void addField(Field f)
Includes in the given field in the slice.

Parameters:
f - a field defined on the grid slice

getField

public Field getField(java.lang.String name)
Returns the field that corresponds to the given name.

Parameters:
name - the name of the field
Returns:
the field

getEquationSet

public EquationSet getEquationSet()
Returns the equation set for which the Slice is defined.

Returns:
an equation set

getGrid

public Grid getGrid()
Returns the grid on which the slice is defined.

Returns:
the grid on which the slice is defined

getFieldNames

public java.util.Set<java.lang.String> getFieldNames()
Returns the names of the fields that are included in the slice.

Returns:
a set of field names

addIndicator

public void addIndicator(java.lang.String name,
                         Indicator indicator)
Adds an indicator that should be computed as part of the Slice.

Parameters:
name - the name of the indicator
indicator - the indicator

getIndicatorNames

public java.util.Set<java.lang.String> getIndicatorNames()
Returns the names of the indicators defined on the slice.

Returns:
a set of names

getIndicator

public Indicator getIndicator(java.lang.String name)
Returns the indicator with the given name.

Parameters:
name - the name of an indicator
Returns:
the indicator

getCoordinateFields

public java.util.List<Field> getCoordinateFields()
Returns the list of fields associated to the coordinates, in the order in which the coordinates where defined.

Returns:
a list of Fields

getDifferentialFields

public java.util.List<Field> getDifferentialFields()
Returns the list of fields associated to the coordinate differentials, in the order in which the coordinates where defined.

Returns:
a list of Fields

getScalarFields

public java.util.Set<java.lang.String> getScalarFields()

getScalarField

public Field getScalarField(java.lang.String name)

getVectorFields

public java.util.Set<java.lang.String> getVectorFields()

getVectorField

public Field[] getVectorField(java.lang.String vectorName)

getTensorFields

public java.util.Set<java.lang.String> getTensorFields()

getTensorField

public Field[][] getTensorField(java.lang.String tensorName)