Class ShapeWavePacket

java.lang.Object
  extended byShapeFunction
      extended byShapeWavePacket

public class ShapeWavePacket
extends ShapeFunction

ShapeWavePacket -- A Wave Packet function

See Also:
Solution.discretize(ShapeFunction)

Field Summary
 
Fields inherited from class ShapeFunction
amplitude_, position_, wavelength_, width_
 
Constructor Summary
ShapeWavePacket(double amplitude, double position, double width, double wavelength)
          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)
          Evaluates the square of the norm
 Complex getValueC(Mesh mesh, int index)
          Evaluates the 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
 

Constructor Detail

ShapeWavePacket

public ShapeWavePacket(double amplitude,
                       double position,
                       double width,
                       double wavelength)
Creates an instance of the class

Parameters:
amplitude - The wave packet amplitude
width - The localization
position - The absissa
Method Detail

isComplex

public boolean isComplex()
Test if the function is complex

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

getValueC

public Complex getValueC(Mesh mesh,
                         int index)
Evaluates the 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

getValue

public double getValue(Mesh mesh,
                       int index)
Evaluates the square of the norm

Specified by:
getValue 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