jabble
Class MultigridOperation

java.lang.Object
  extended by jabble.MultigridOperation
Direct Known Subclasses:
Injection

public abstract class MultigridOperation
extends java.lang.Object

An operation performed on two grids of different sizes, typically used in Multigrid and Mesh Refinment algotyhms. This class provides also implementation for typical relaxation and prolongation operations, such as linear and cubic interpolation, and half and full weighting.


Field Summary
static MultigridOperation CUBIC_INTERPOLATION
          Cubic interpolation operations for 1D/2D/3D grids (cubic for 1D, bicubic for 2D and tricubic for 3D, currently not implemented).
static MultigridOperation FULL_WEIGHTING
          Full weighting operation for 1D/2D/3D grids.
static MultigridOperation HALF_WEIGHTING
          Half weighting operation for 1D/2D/3D grids.
static Injection INJECTION
          Injection operation for 1D/2D/3D grids.
static MultigridOperation LINEAR_INTERPOLATION
          Linear interpolation operations for 1D/2D/3D grids (linear for 1D, bilinear for 2D and trilinear for 3D, currently not implemented).
 
Constructor Summary
protected MultigridOperation()
          Creates a new instance of MultigridOperation
 
Method Summary
 void calculate(Field[] coarseFields, Field[] fineFields)
          Calculates the multigrid operations on the given set of fields (paired in the array order).
protected abstract  void calculate(Point finePoint, Point coarsePoint, Field fineField, Field coarseField)
          Calculates the operation at the given point for the given field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CUBIC_INTERPOLATION

public static final MultigridOperation CUBIC_INTERPOLATION
Cubic interpolation operations for 1D/2D/3D grids (cubic for 1D, bicubic for 2D and tricubic for 3D, currently not implemented).


LINEAR_INTERPOLATION

public static final MultigridOperation LINEAR_INTERPOLATION
Linear interpolation operations for 1D/2D/3D grids (linear for 1D, bilinear for 2D and trilinear for 3D, currently not implemented).


FULL_WEIGHTING

public static final MultigridOperation FULL_WEIGHTING
Full weighting operation for 1D/2D/3D grids.


HALF_WEIGHTING

public static final MultigridOperation HALF_WEIGHTING
Half weighting operation for 1D/2D/3D grids.


INJECTION

public static final Injection INJECTION
Injection operation for 1D/2D/3D grids.

Constructor Detail

MultigridOperation

protected MultigridOperation()
Creates a new instance of MultigridOperation

Method Detail

calculate

public void calculate(Field[] coarseFields,
                      Field[] fineFields)
Calculates the multigrid operations on the given set of fields (paired in the array order).

Parameters:
coarseFields - a list of fields on the coarse grid
fineFields - a list of fields on the fine grid

calculate

protected abstract void calculate(Point finePoint,
                                  Point coarsePoint,
                                  Field fineField,
                                  Field coarseField)
Calculates the operation at the given point for the given field. Typically, one has only to implement this method to implement an operator. The two points given correspond to the same point in space, and will use them to read/write the values on the respective fields.

Parameters:
finePoint - the point on the fine grid
coarsePoint - the point on the coarse grid
fineField - the field on the fine grid
coarseField - the field on the coarse grid