Class ShapeFunction

java.lang.Object
  extended byShapeFunction
Direct Known Subclasses:
ShapeBox, ShapeCosinus, ShapeGaussian, ShapeNumerical, ShapeOption, ShapeSoliton, ShapeWavePacket

public abstract class ShapeFunction
extends java.lang.Object

Abstract class for a describing initial shapes

See Also:
Solution.discretize(ShapeFunction)

Field Summary
protected  double amplitude_
          The shape's vertical scale
protected  double position_
          The shape's abscissa
protected  double wavelength_
          The shape's shorter scale
protected  double width_
          The shape's horizontal scale
 
Constructor Summary
ShapeFunction()
           
 
Method Summary
abstract  double getSampling(Mesh mesh, int index)
          Returns initial distribution of samplers
abstract  double getValue(Mesh mesh, int index)
          Evaluates the shape on a discrete mesh point position.
abstract  Complex getValueC(Mesh mesh, int index)
          Evaluates the shape on a discrete mesh point position.
abstract  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

amplitude_

protected double amplitude_
The shape's vertical scale


width_

protected double width_
The shape's horizontal scale


position_

protected double position_
The shape's abscissa


wavelength_

protected double wavelength_
The shape's shorter scale

Constructor Detail

ShapeFunction

public ShapeFunction()
Method Detail

isComplex

public abstract boolean isComplex()
Test if the function is complex

Returns:
true if complex function

getValue

public abstract double getValue(Mesh mesh,
                                int index)
Evaluates the shape on a discrete mesh point position.

Parameters:
mesh - The mesh coordinates
index - The mesh index
Returns:
The value or squared norm of the function at the mesh location

getValueC

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

Parameters:
mesh - The mesh coordinates
index - The mesh index
Returns:
The value of the function at the specified mesh location

getSampling

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

Parameters:
mesh - The mesh coordinates
index - The mesh index
Returns:
The initial distribution of samplers