edu.jhu.cs.cisst.algorithms.optimize.fmg.restrictor
Class RestrictorByStencil

java.lang.Object
  extended by edu.jhu.cs.cisst.algorithms.optimize.fmg.restrictor.RestrictorByStencil
All Implemented Interfaces:
Restrictor

public class RestrictorByStencil
extends java.lang.Object
implements Restrictor

The Class RestrictorByStencil.


Field Summary
static Stencil FULL_WEIGHTING
          the stencil that characterises full weighting.
static Stencil FULL_WEIGHTING_2D
          The Constant FULL_WEIGHTING_2D.
static Stencil HALF_WEIGHTING
          the stencil that characterises half weighting which is halfway between full weighting and straigh injection.
protected  Stencil s
          The stencil.
static Stencil STRAIGHT_INJECTION
          the stencil that characterises straight injection where elements of those elements of the fine grid that are also present in the coarse grid are simply copied from the fine grid to the coarse grid.
protected  IntRange1D totalRange
          The total range.
 
Constructor Summary
RestrictorByStencil(Stencil stencil)
          construct from restriction stencil.
 
Method Summary
 Grid restrict(ConstGrid grid, SolverResolutionLevels levels)
          implements method from Restrictor.
 void restrictProper(Grid coarse, ConstGrid fine, int myNum, int totalNum)
          Restrict proper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s

protected Stencil s
The stencil.


totalRange

protected IntRange1D totalRange
The total range.


STRAIGHT_INJECTION

public static final Stencil STRAIGHT_INJECTION
the stencil that characterises straight injection where elements of those elements of the fine grid that are also present in the coarse grid are simply copied from the fine grid to the coarse grid. This method is not always stable.


FULL_WEIGHTING

public static final Stencil FULL_WEIGHTING
the stencil that characterises full weighting. The stencil for full weighting is the the transpose of the stencil for trilinear interpolation, which is of theoretical importance.


FULL_WEIGHTING_2D

public static final Stencil FULL_WEIGHTING_2D
The Constant FULL_WEIGHTING_2D.


HALF_WEIGHTING

public static final Stencil HALF_WEIGHTING
the stencil that characterises half weighting which is halfway between full weighting and straigh injection.

Constructor Detail

RestrictorByStencil

public RestrictorByStencil(Stencil stencil)
construct from restriction stencil.

Parameters:
stencil - the stencil that defines restriction
Method Detail

restrict

public Grid restrict(ConstGrid grid,
                     SolverResolutionLevels levels)
implements method from Restrictor.

Specified by:
restrict in interface Restrictor
Parameters:
grid - the grid
levels - the levels
Returns:
the grid
See Also:
Restrictor.restrict(edu.jhu.cs.cisst.algorithms.optimize.fmg.grid.ConstGrid, edu.jhu.cs.cisst.algorithms.optimize.fmg.SolverResolutionLevels)

restrictProper

public void restrictProper(Grid coarse,
                           ConstGrid fine,
                           int myNum,
                           int totalNum)
Restrict proper.

Parameters:
coarse - the coarse
fine - the fine
myNum - the my num
totalNum - the total num