jabble.stencils
Class Average3DStencils

java.lang.Object
  extended by jabble.stencils.Average3DStencils

public class Average3DStencils
extends java.lang.Object

Stencil library for averages on Fields in 3D grids.


Method Summary
static double upwindAverage(Field field)
          Calculates ( F(x, y, z) + F(x+1, y, z) + F(x, y+1, z) + F(x, y, z+1)
+ F(x+1, y+1, z) + F(x, y+1, z+1) + F(x+1, y, z+1) + F(x+1, y+1, z+1)) / 8
.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

upwindAverage

public static double upwindAverage(Field field)
Calculates ( F(x, y, z) + F(x+1, y, z) + F(x, y+1, z) + F(x, y, z+1)
+ F(x+1, y+1, z) + F(x, y+1, z+1) + F(x+1, y, z+1) + F(x+1, y+1, z+1)) / 8
.

Parameters:
field - The Field on which to calculate the average
Returns:
The averageof the Field at the point defined by StencilUtils.getPoint()