Class ShapeNumerical

java.lang.Object
  extended byShapeFunction
      extended byShapeNumerical

public class ShapeNumerical
extends ShapeFunction

ShapeNumerical -- A function (interpolated) from numerical data

See Also:
Solution.discretize(ShapeFunction)

Field Summary
private  Mesh myMesh
          Numerical function abscissa
private  Solution mySolution
          Numerical function values
 
Fields inherited from class ShapeFunction
amplitude_, position_, wavelength_, width_
 
Constructor Summary
ShapeNumerical(Solution solution)
          Creates an instance of the class
 
Method Summary
 double getSampling(Mesh mesh, int index)
          Returns initial distribution of samplers
 double getValue(Mesh mesh, int index)
          Returns the shape on a discrete mesh point position.
 Complex getValueC(Mesh mesh, int index)
          Evaluates complex shape on a discrete mesh point position.
 boolean isComplex()
          Test if the function is complex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myMesh

private Mesh myMesh
Numerical function abscissa


mySolution

private Solution mySolution
Numerical function values

Constructor Detail

ShapeNumerical

public ShapeNumerical(Solution solution)
Creates an instance of the class

Parameters:
solution - Values defining the shape numerically
Method Detail

isComplex

public boolean isComplex()
Test if the function is complex

Specified by:
isComplex in class ShapeFunction
Returns:
true if complex function

getValue

public double getValue(Mesh mesh,
                       int index)
Returns the shape on a discrete mesh point position. In a future version, this should include a real interpolation, since the mesh coordinates may not coincide with the data !

Specified by:
getValue in class ShapeFunction
Parameters:
mesh - The mesh coordinates. Now Ignored.
index - The mesh index
Returns:
The value of the function at the specified mesh location

getValueC

public Complex getValueC(Mesh mesh,
                         int index)
Evaluates complex shape on a discrete mesh point position.

Specified by:
getValueC in class ShapeFunction
Parameters:
mesh - The mesh coordinates
index - The mesh index
Returns:
The value of the function at the specified mesh location

getSampling

public double getSampling(Mesh mesh,
                          int index)
Returns initial distribution of samplers

Specified by:
getSampling in class ShapeFunction
Parameters:
mesh - The mesh coordinates
index - The mesh index
Returns:
The initial distribution of samplers