package AMRTools; import BoxTools.BoxLayout; import BoxTools.BoxLayoutData; import BoxTools.LayoutIterator; import BoxTools.BoxedArray; import BoxTools.DataIndex; import BoxTools.Copier; import BoxTools.Util; /** * CoarseAverage is defined on two levels of BoxLayout<\code>, the fine and the * coarse. A CoarseAverage object is used to average a BoxLayoutData<\code> * defined at the fine level to one defined at the coarse level. This algorithm only works on * BoxLayoutData<\code>s with BoxedArray components. * Given a BoxLayoutData<\code> at the fine level, this algorithm first averages it to * its coarsened version defined at the coarse level, then copies the coarsened version to any * BoxLayoutData<\code> defined at same level. A copier should be used to cache the copy * relation between the two levels (which has not beenimplemented yet). * Please refer to the Chombo design document for the details of this algorithm. *

Usage: a CoarseAverage object must be declared local. * @see BoxTools.BoxLayout, BoxTools.BoxLayoutData, BoxTools.LayoutIterator, BoxTools.BoxedArray * and BoxTools.DataIndex. * @see Chombo Specification * @version 1.1 * Modified on Jul 09, 2004. change of syntax of foreach, see BoxTools/foreachLoopTest.ti. * @author Tong Wen, LBNL * @since 1.0 */ template public class CoarseAverage{ private int single m_refRatio=1; //private int single m_nComp; private static final int SPACE_DIM=BoxTools.Util.SPACE_DIM; public template BoxLayoutData